How call JAX - WS service db

Hello

I'm new to JDeveloper and I'm having a few problems when calling a jax - ws a function within the db. To ensure that the problem is not my jax - ws, I have implemented a simple jax - ws based on JDeveloper tutorials to test and have found the same problem. However, if I call this same jax - ws monitor JDeveloper of Altova or simply call using a web browser, the w - jax is behaving properly?

JAX - ws contains only a single class. I made use of the JDeveloper to generate the jax - ws. Please see the class and the methods below.

I've also included below the wsdl for this same jax - ws also generated through JDeveloper.

And the last quotation is the function that calls the method of the 'sayHello' in the db class.


The function db is the use of the SOAP_API according to the http://www.oracle-base.com/dba/miscellaneous/soap_api.sql


Function of the error I get when you call the db is:

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00249: invalid external ID declaration
Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 48
ORA-06512: at "MET.SOAP_API", line 153
ORA-06512: at "MET.AA", line 32
31011. 00000 -  "XML parsing failed"
*Cause:    XML parser returned an error while trying to parse the document.
*Action:   Check if the document to be parsed is valid.

= The code around line 153 SOAP_API: =.


FUNCTION invoke(p_request IN OUT NOCOPY  t_request,
                p_url     IN             VARCHAR2,
                p_action  IN             VARCHAR2)
  RETURN t_response AS
-- ---------------------------------------------------------------------
  l_envelope       VARCHAR2(32767);
  l_http_request   UTL_HTTP.req;
  l_http_response  UTL_HTTP.resp;
  l_response       t_response;
BEGIN
  generate_envelope(p_request, l_envelope);
  show_envelope(l_envelope, 'Request');
  l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.1');
  UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
  UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
  UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
  UTL_HTTP.write_text(l_http_request, l_envelope);
  l_http_response := UTL_HTTP.get_response(l_http_request);
  UTL_HTTP.read_text(l_http_response, l_envelope);
  UTL_HTTP.end_response(l_http_response);
  show_envelope(l_envelope, 'Response');
  l_response.doc := XMLTYPE.createxml(l_envelope); -- <<<<<<<<<< Line 153
  l_response.envelope_tag := p_request.envelope_tag;
  l_response.doc := l_response.doc.extract('/'||l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/child::node()',
                                           'xmlns:'||l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"');
  check_fault(l_response);
  RETURN l_response;
END;
-- ---------------------------------------------------------------------


================================================ Java class================================

package wizard;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;

@WebService(name = "MyWebService1", serviceName = "MyWebService1", portName = "MyWebService1Port")
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
public class HelloService {
    public HelloService() {
        super();
    }


    @WebMethod
    public String sayHello (@WebParam(name = "arg0") String s) {
             return "Hello " + s;
        }
}

======================================================= WSDL  file ================

<?xml version="1.0" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. -->
<definitions targetNamespace="http://wizard/" name="MyWebService1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://wizard/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <types>
    <xsd:schema>
      <xsd:import namespace="http://wizard/" schemaLocation="MyWebService1_schema1.xsd"/>
    </xsd:schema>
  </types>
  <message name="sayHello">
    <part name="parameters" element="tns:sayHello"/>
  </message>
  <message name="sayHelloResponse">
    <part name="parameters" element="tns:sayHelloResponse"/>
  </message>
  <portType name="MyWebService1">
    <operation name="sayHello">
      <input wsam:Action="http://wizard/MyWebService1/sayHelloRequest" message="tns:sayHello"/>
      <output wsam:Action="http://wizard/MyWebService1/sayHelloResponse" message="tns:sayHelloResponse"/>
    </operation>
  </portType>
  <binding name="MyWebService1PortBinding" type="tns:MyWebService1">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="sayHello">
      <soap12:operation soapAction=""/>
      <input>
        <soap12:body use="literal"/>
      </input>
      <output>
        <soap12:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="MyWebService1">
    <port name="MyWebService1Port" binding="tns:MyWebService1PortBinding">
      <soap12:address location="http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port"/>
    </port>
  </service>
</definitions>

======================================================= DB Function  ================

create or replace FUNCTION AA
(
  PARAM1 IN VARCHAR2
) RETURN VARCHAR2 AS


  l_request   soap_api.t_request;
  l_response  soap_api.t_response;
  l_return    VARCHAR2(32767);

  l_url          VARCHAR2(32767);
  l_namespace    VARCHAR2(32767);
  l_method       VARCHAR2(32767);
  l_soap_action  VARCHAR2(32767);
  l_result_name  VARCHAR2(32767);

BEGIN


  l_url         := 'http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port/';
  l_namespace   := 'xmlns="http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port?WSDL"';
  l_method      := 'sayHello';
  l_soap_action := 'http://192.168.1.107:7101/Webservices-Wizard-context-root/MyWebService1Port/sayHello';
  l_result_name := 'return';

  l_request := soap_api.new_request(p_method       => l_method,
                                    p_namespace    => l_namespace);


  soap_api.add_parameter(p_request => l_request,
                         p_name    => 'arg0',
                         p_type    => 'xsd:string',
                         p_value   => PARAM1);                                             


  l_response := soap_api.invoke(p_request => l_request,
                                p_url     => l_url,
                                p_action  => l_soap_action);


  l_return := soap_api.get_return_value(p_response  => l_response,
                                        p_name      => l_result_name,
                                        p_namespace =>  NULL);
                                       
  return l_return;      

END AA;

I would appreciate if you could point me in the right direction about this number when you call the jax - ws feature in the comic book?

Thank you

Daniel

Found the solution. I had not noticed that the jax - ws and the SOAP_API according to the http://www.oracle-base.com/dba/miscellaneous/soap_api.sql spoke different version of SOAP. JAX - ws used SOAP12HTTP_BINDING while I understand that SOAP_API is SOAP 1.1

Tags: Database

Similar Questions

  • My native BB app, how to connect to the remote URL and call a Web service method to retrieve the XML base result using Eclipse Version 3.7.2

    Hello

    I am new to the development of native applications from BB using JDE. I'm testing Simulator. From my native BB app, I connect a remote URL and call a Web service method to extract some basic result XML.

    I need to write a login code remote URL to achieve? If so, how?

    So, how can I use this connection object to call the Web service from this URL remotely.

    Please help me out of it...

    Many thanks in advance...

    What i am doing is, On clicking the "Login" button i want to call the webservice method like below mentioned code...
    Here WaveServices is a class and getAllCinemas() is a static method inside which a webservice method call is made..
    
    loginButtonField.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field paramField, int paramInt) {
                    WaveServices.getAllCinemas();
                }
            });
    

    Indeed, the question was raised and answered here:

    http://supportforums.BlackBerry.com/T5/Java-development/from-my-native-BB-application-how-to-connect...

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

  • How to call a custom service Oracle11g UCM in Java to another component code custom?

    I have two Oracle UCM UCMComponent1 and UCMComponent2 components. UCMComponent1 has several custom services. My requirement is that I want to call UCMComponent1 service customized in the java method UCMComponent2.

    Anyone have an idea how I can do this service personalized in the Java method call? I know how to call the existing service of the Complutense University of MADRID in Java method.

    Thank you!

    No difference to call a standard service.  Apply the same methodology.  Provide the parameters expected for the service and call it.

  • HOW URL WSDL Web Service: Web Service call in the workflow

    have a 1 step, Web service workflow: call the Web Service.  I wish I could pass a string parameter to the url of the endpoint for the parameter of the URL of the WSDL in the Web service settings dialog box as oppose to the transmission of the actual url (http://machine/some_service.svc?wsdl).

    The reason is that we are moving the workflow between environments DEV, TEST, etc., we do not want to reopen the workflow in each env and update the DEV, TEST endpoint.

    I tried the following without success

    1. create a parameter of type String devURL

    2 by default, set the value on http://machine/some_service.svc?wsdl

    3 Goto service web appeal stage and set the URL of the WSDL to the /process_data/@devURL

    I get the error:

    java.io.FileNotFoundException: \process_data\@devURL

    at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:94)

    at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:103)

    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity (unknown Source)

    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion (unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse (unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse (unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse (unknown Source)

    at org.apache.xerces.parsers.DOMParser.parse (unknown Source)

    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (unknown Source)

    at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)

    at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)

    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)

    to org.apache.axis.wsdl.gen.Parser$ WSDLRunnable.run (Parser.java:361)

    at java.lang.Thread.run(Thread.java:595)

    I don't think that the URL of the WSDL parameter can even accept a parameter as the username + password settings.

    Is this possible?  OR if not, how can this be achieved?

    Under the Service Web Options change 'The Option' use 'variable' instead of 'literal '. Then click the Green + and it will create a variable of type WebServiceSettingBean.

    You can use a setValue before the stage of web service to set this variable.

    Jasmine

  • Just got yet another call for "Windows Service Station"

    Just got yet another call for "Windows service station', saying: I was hacked and my computer sends windows warning messages and if I didn't follow his instructions all my data would be deleted... An Indian-sounding guy named Sam... I played along and got a phone number, saying: I would like to remind him he said 0808 1890111 which is a UK addiction hotline...

    I played along 'Sam' gave me an extremely long code to type in something on the windows event viewer... I know it's a scam and we have these calls often 3 times a week for a few years now. I play at the same time or am quite rude and tell them to be ashamed of themselves, depending on my mood... I really wish that they would go, but I can't this blocks 'any number' because it is off the coast.
    Any suggestions on how to remove our number and the name of their list (I asked the scammers do, but they don't notice).

    Certainly a SCAM, you have made the right choice. Never to give them information and never leave access to your PC.

    It is difficult, if not impossible to remove your number from a list of scam once its on it. And it's hard to know how they got it in the first place. It could be a list simple phone book. Recording with things like Telephone Preference Service (United Kingdom) and asking to be made "Red" (BT - UK) can make it harder for them to get a number in the first place, but once they have it probably wont help. It can stop any other do however.

    There are devices like Call Blocker, which can be programmed for their calls not ring your line, but it depends on what number they release when they call. If their number is "held" and then some providers have a service to stop calls "deductions number' to ring your line. ACR service (BT - Uk).

    PS - the links above are a few examples of our services/devices to the United Kingdom for more information.

  • Call the Checkout service on button click in sieble iframe

    How call checkout on click of a button in siebel iframe link (Sibel UCM integration) after having selected content.

    Thanks and greetings

    Priya Verma

    Solved after you create a resource file url and call service checkout directly from here by the way of ddocname and has been in the url.

    Thank you

    Priya Verma

  • Using CFHTTP to call a web service

    We use a CF5 server and will not update to MX anytime soon. I need to call a web service and understand that I can do that with CFHTTP. Can someone direct me to any docs or give me examples of how to do that?

    Answered my own question. The problem I had was returning complex data types. CFHTTP. FILECONTENT actually returned as WDDX MX web service, so I was able to use the CFWDDX tag to transform a structure of SOAP in a CF structure, and it works perfectly.

  • Call a web service in java (JDeveloper)

    Hello everyone,

    I'm working on a project for my studies of computer science (@University of Freiburg, Germany).
    I want to call another student web service. I need the other web service as input for my own calculation. (Customer Lifetime Value j4i :)) Unfortunately, I couldn't find tutorials or other help in the web. So I hope you guys could help me.

    Basically, I'm looking for a small piece of code in java or a tutorial, that calls a web service to exsiting. Code Java would be particularly useful, since my work is written in java (and later deployed by JDevelloper as a web service). I found a few tuts on service control over the sites of the Oracle, but I do not know how to work with the ctrl files either.

    Greetings,
    Sebastian

    http://www.Oracle.com/technology/OBE/obe11jdev/11/WS/WS.html#T5

  • Calling a web service using SSL from a client that runs as a web application.

    I have the keystore containing the certificates to call a web service through a two-way ACE by using SSL. If I create a stand-alone java application and using the following parameters, I'm able to hit the web service:

    System.setProperty("javax.net.ssl.keyStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
    System.setProperty ("javax.net.ssl.keyStorePassword", "changeit");
    System.setProperty("javax.net.ssl.trustStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
    System.setProperty ("javax.net.ssl.trustStorePassword", "changeit");

    Also, if I use these same 4 lines of code in my web application to call the web service, I successful as well.

    The problem is, in the real world, you can't hardcode your keystore/truststore path access and password in your application like this.

    What is the right way to configure these client parameters? I do somewhere in the logical Web administration console? I tried to configure the Keystore and SSL tabs for my server using the administration console, but he can't seem to find the private key file. I get an exception that is prohibited by the web service as soon as I leave the System.setProperty lines.

    The tab of keystore, I use a Custom Keystore and Java Standard Trust store. My custom identity keystore path is C:/bea/JDK150~1/jre/lib/security/SFCRM.jks, type jks keystore, and I updated the password changeit. On the SSL tab, I've specified the alias of the private key to use for the web service as well as the password (there is no password, so I put in changeit, the keystore password).

    It does not work. I even tried using a Custom Keystore and trust stores custom and by setting the C:/bea/JDK150~1/jre/lib/security/SFCRM.jks path for both. Still does not work.

    I have a feeling that these tabs are intended for the configuration server SSL only.

    How to set the path of the keystore for customers running as web apps on my web server of logic?

    SSL-> advanced

    Use server certificates:

    "Determines whether the customer should use server certificates/keys as the identity of the client during the initialization of a connection via https."

  • I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT &amp; T service, but has no service now since I switched to Verizon?

    I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT & T service, but has no service now since I switched to Verizon?

    Note: I'm able to get two phones to ring with an incoming call, but the 5s consist not out. Whenever I dial a number, it says call failed.

    Do not dial a number. Try to choose a contact in the contacts App and tapping on telephone button.

    That said, I don't think that outgoing calls work on continuity since another iPhone. given that the iphone is designed to make calls through its own service.

    Document to support that you just did not mention calls from a secondary iPhone at all, it points to Mac, iPad and iPod touch, which leads me to believe that it won't work.

    It runs from devices such as iPads and Macs, who have no other way to place a cell call.

  • How to enable web services and search for printer email address

    I am trying to sign up for the monthly INK from HP.  As part of the application, they ask me a CODE.  However, I can't CODE because I am advised that my Web services are not enabled.  How to enable Web services so that I can complete my application?  Thanks for any help you can offer me.

    Hello

    What model of printer you have?

    Assuming your eprint-enabled printer, please follow the steps below to connect to web services and get your email from the printer.

    To find printers e-mail you need to enable web services from the front panel of the printer. It is normally a button on the front panel or an option in a menu.

    The printer will be connected to your WiFI network, and once the device is activated, it should display a page with a code composed of letters and numbers. It is the e-mail address of printers (when you add a @hpeprint.com to it).

    Once you have this, go ahead and configure a connected HP account and register the printer to your account. This will allow you to manage settings of the ePrint printer but also to track the history of the work.

  • The trial period with Apple music, now charge them me; How to cancel this service?

    Aiinstalle trial 'Music from Apple' now they are charging me, how to cancel this service?

    Disable the automatic renewal.  View, change or cancel your subscription - Apple Support

  • How to disable location services

    Can you tell me how to disable location services I El Capitan?  Is it necessary for something else that the program card?  Thank you.

    System-> Security & Privacy-> privacy preferences

  • How to get XP service pack 3 whan it is no longer available for download?

    How to get XP service pack 3 whan it is no longer available for download?

    Clark

    It is here http://www.microsoft.com/en-gb/download/details.aspx?id=24

Maybe you are looking for

  • Mac App Store: The Apple ID, you have entered could not be found...

    I just upgraded to Sierra and get this error when I try to upgrade all the apps in the Mac App Store: The Apple, ID you entered could not be found or your password is incorrect. Please try again The password is correct, as I can check my account with

  • calendar, given to conspire

    Hi allI'm working on my degree work and I need help with a few problems. I want to try to acquire data from my system using Labview instead of matlab /simulink. I need only a simple function to acquire and plot the data. I have my system connected to

  • No D: drive

    When I click on 'My Computer' CD-ROM D: drive does not show. When I check the hardware is said that the drive is fine. When I push the button to insert a disc, it does not open. System Restore does not go enough distance to when he worked.

  • Anyone know of any compatibility issues with Windows 8 and RV series routers?

    I have a small network with a laptop computer, Windows 8, Windows XP desktop computer and a network MyBookLiveDuo storage device. I have sharing enabled between these devices. Everything worked well on a network switch. I replaced the switch with the

  • BlackBerry Smartphones BB calendar

    Hello, when I bought my BB Curve 8320 CD was empty.  Through this group, I could download v4.5 of Control Panel.  Is their way of use/download the calendar of BB to the computer?  I like the calendar, but it would be easier to use on the computer for