Urgent: The PL/SQl web service call fails with XML parsing

Hello

I try to call a WebService from PL/SQL (using the SOAP and UTL_HTTP Protocol built in package). I use Oracle 9i. I'm calling from pl/sql block, created in java web service method invocation.
I get the below response as a SOAP protocol object, but I could not able to parse the SOAP.
Could you please provide values for FirstName, LastName, and ErrorDescription


declare
request_env varchar2 (32767).
v_xml XMLTYPE.
l_user_first_name varchar2 (100);
l_user_last_name varchar2 (100);
l_error_value varchar2 (100);

Start
response_env: =' < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
< soapenv:Body >
< UserInfoObjResponse xmlns:axis2ns1 = "http://www.test.com/services" >
< axis2ns1:FirstName > first name out < / axis2ns1:FirstName >
< axis2ns1:LastName > last exit name < / axis2ns1:LastName >
< axis2ns1:ErrorDescription / >
< / UserInfoObjResponse >
< / soapenv:Body >
< / soapenv:Envelope > ';

dbms_output.put_line (' length to ask:' | length (response_env));
dbms_output.put_line (' ask: ' | response_env);

v_xml: = XMLTYPE (response_env);

-SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') IN the varchar2 (100) of l_user_fast_name; FROM DUAL;

dbms_output.put_line ('l_user_first_name: ' | l_user_first_name);
dbms_output.put_line ('l_user_last_name: ' | l_user_last_name);
dbms_output.put_line ('l_error_value: ' | l_error_value);
end;

NS is a string that contains the declaration of namespaces.

Look at line 7:

ns varchar2(200) := 'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis2ns1="http://www.test.com/services"';

Max
http://oracleitalia.WordPress.com

Tags: Database

Similar Questions

  • Basic questions about the PL/SQL web services and data source names

    Hello

    I've successfully generated a web service for a procedure from PL/SQL packaged JDeveloper 11.1.1.3.0).

    The following code was generated in the base class for web services:
     __dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/dbconnectionDS");
    However in the weblogic server, the data source name is jdbc/Gisele for deployment fails in a first time.

    What is the recommended procedure to solve this problem? The obvious solution is to manually change the source - that's what I did and it worked fine. However if I re - generate the web service I won't lose my change. Is there a better way to do it?

    Another question - in the web.xml file that is generated, there is a resource-ref to the data source. I was hoping that change the data source name it would help, but it didn't work. What is - it used to in this context?

    Thank you
    Luis

    I forgot to add, so in case some time later and you want to update the connection to your service details, all you have to do is to add the following entry in your weblogic.xml:
    .

    JDBC/ref_name_from_web. XML
    JDBC/new_jndi_name

    .
    And in this way, you will not have to change any code level to point your web service to another connection.

    Vishal-

  • PL/SQL web service

    What application server can I deploy web services PL/SQL for? Can I use Oracle WebLogic or Apache Tomcat? In addition, security is important. Should I also the Oracle SOA Suite to run these web services?

    Thank you.

    Andy

    andychow wrote:

    Based on the following pages, it says we can publish web services from PL/SQL to certain kinds of application server. I have the application development Oracle APEX and wide writing PL/SQL packages. However, I don't know much about the web service and architecture that I need to get there.

    It's a roundabout way to create a web service of the IMO. It encapsulates calls to PL/SQL in Java code in order to define a web service. That is not necessary and approach classic head-up-DOS of Java fanbois.

    If an HTTP call are possible directly in PL/SQL, so why not do? So why put a layer of major and complex Java (usually on a separate platform of h/w too) between the appellant and the PL/SQL to provide a web service interface? How is it better?

    Fewer moving parts means less complexity and improve performance. Less performance problems and problems. Easier to code and maintain.

    Reality: it is not necessary for the external moving parts create a WebService from PL/SQL. And to do this, the Apache/mod_plsql or EPG of XDB is required to provide the very basic communication interface layer (at the protocol level) between the appellant and the PL/SQL web service procedure.

  • [MAF - AMPA] How the custom/override error after the failure of the asynchronous Web service call?

    Hi Experts,

    I am looking for a best practice to make the error handling in the MAF.

    Currently my application is using AMPA and call the REST service.

    However, I would like to know how to handle this kind of error

    1. the device is not connected to the network (can we personalized it?)

    error2.png

    2. the device is connected to the network but cannot call service

    error1.png

    3 and the other exceptions of the asynchronous call to the AMPA

    In addition, how to mark a method call in the exception handler?

    referring to this http://multikoop.blogspot.com/2014/02/adf-handling-exceptions-from_14.html in ADF tf we mark as exception handler.

    Best regards

    Hendry

    Hendry,

    You have several options. It depends on how you want to handle exceptions:

    -If you just want to hide the mistakes of web service end-user call, you can set the showWebServiceInvocationErrors property in the persistence - mapping.xml to false (you want to generally this set to false, by putting your application in production, the default value is true, because during development, it is more convenient to directly see the errors of appeal WS)

    -If you want to display a custom error message, you can create a subclass of RestJSONPersistenceManager, register for this subclass using the property "remotePersistenceManager" in persistence - mapping.xml and override the handleInvokeRestServiceError method.

    It depends also how you want to process POST/PUT/DELETE requests that fail. Do you want the AMPA runtime register this request as pending for the runtime synchronization action automatically tries to return the claim later? Or you just want to display an error message to the end-user with a text like "try again later?

    Steven Davelaar,

    Oracle Mobile A-team.

  • Make a REST Web service call. Error code: 401 Access to the requested resource is not allowed

    Hi all

    I'm having a hard time finding ways to Rest Web service calls.

    I tried this runs directly through the browser and I get an error.

    http:localhost:8080/r EST/bean/atg/userprofiling/ProfileServices/loginUser? [email protected] & arg2 = password

    13:18:20, 613 [RestSecurityServlet] error code: 401

    Access to the requested resource is not allowed: / atg/userprofiling/ProfileServices

    1. atg.rest.RestException: access to the requested resource is not allowed: / atg/userprofiling/ProfileServices

    at atg.rest.processor.RestSecurityProcessor.checkAccess(RestSecurityProcessor.java:546)

    at atg.rest.processor.RestSecurityProcessor.handleGetRequest(RestSecurityProcessor.java:313)

    at atg.rest.processor.RestSecurityProcessor.doRESTGet(RestSecurityProcessor.java:199)

    at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:417)

    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:260)

    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)

    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)

    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:264)

    at atg.rest.servlet.HeadRestServlet.service(HeadRestServlet.java:130)

    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)

    Documentation, I understand that I need to create a session, the session is needed to access the secure components since this

    method specific 'ProfileServices.loginUser' was declared as non-secure, restSecurityConfiguration.xml

    In addition, there are two different ways in which I can connect

    1. 1. with the help of RestSession.createSession providing the user name and password.
    2. 2. or by using ProfileServices.loginUser or ProfileFormHandler

    Can someone please clarify

    If you call the REST web service from a Java client, you can create a RestSession object using the createSession method. But in your case you seem to be invoking it with an HTTP request, which, by default, would be considered a GET request by application of the REST of the ATG. So either a GET, he would try to get a property "loginUser" of the component/atg/userprofiling/ProfileServices (based on your URL) that would always fail.

    To call the method ProfileServices loginUser() with your argument, you need to tell the system to the REST of the ATG to process your incoming request not GET, but as a demand that you can do to atg-rest-http-method of the parameter control in your application like this

    http:localhost:8080/rEST/bean/atg/userprofiling/ProfileServices/loginUser? [email protected]& arg2 = password & atg-rest-http-method = POST

    It should work in this way, your restSecurityConfiguration.xml is correct.

  • EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    Hi K jtm,.

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Forum. You can follow the link to your question:
    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • Is it possible to recover all the virtual machines in a cluster in a single web service call?

    I tried to retrieve the list of all virtual machines in a cluster to a single web service call, but to no avail. It seems that there is no direct web service API to achieve this goal. Alternative options must first recover the hosts or data warehouses in the cluster and then recover virtual machines from there. But still, if anyone has an idea how we can do this please let me know. All help information will be greatly appreciated.

    It is possible, if you use the PropertyCollector.

    (It is usually the answer to questions of the form "Is it possible to retrieve the X in a single web service call").

    Call"propertycollector.retrievecontents:

    http://www.VMware.com/support/developer/VC-SDK/visdk41pubs/ApiReference/vmodl.query.PropertyCollector.html#retrieveContents

    allows you to retrieve a whole bunch of stuff in a single call, which you then have to go through and interpret.

    A snippet of code Java VI is not-really-tested to find virtual machines in a ComputeResource (cluster) is attached.

  • 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

  • Results of long-term with the web service call process

    I'm starting a long-lived process that dragged out variables using a .net web service call. I would like to be able to get these output variables. I find all of the features in the JobManager service to do this... y at - it another way to do this? I am not above querying the Livecycle database...

    Thank you

    Mike

    It will work only after that the process is 'complete'.. then you need to check the status... .and when that is complete, then you can check the results.

    Paul

  • Error SSE2 optimization in the deployment of Web Services

    I'm migrating from 2010 to 2011 SP1 web service [because web services 2010 SP1 were buggy]. At first, I could build and deploy the code very well. Now, I get the following deployment error:

    LabVIEW error: (Hex 0xFFFEFA45) LabVIEW Web Services: call to create a VI reference failed. The target does not support SSE2 optimization. Disable SSE2 optimization in the Advanced dialog box of the Web Service Properties page before continuing.

    Based on the online documentation, my hardware can support SSE2 - but no matter, I disabled it anyway. The error message persists. This message means anything this SSE2 optimization is enabled and is not supported? Based on the text of the error, it seems that turning off optimization should probably fix the problem...


  • Data is encrypted for web service calls?

    I wrote a small JME (J2ME) application for a BlackBerry handheld device. This application calls web services to accomplish its mission. I am using the advantage of the specifications of Web Services, J2ME (JSR 172) supported by Blackberry JDE 4.3 +. I use Java Wireless Toolkit 2.2 from Sun to generate stubs and other support classes. I am able to invoke web services and also get the correct answers to it.

    After recalling some documents and websites, I understand that any communication that happens between your handheld and BES is encrypted (3DES or AES).

    Is the question that I have, if the data between the computer pocket and BES/MDS previously described WebService invocation are also encrypted? I have a question to cause that communication here is initiated by the device.

    Can someone please let me know the answers? Thanks in advance.

    If you are using MDS: Yes. Between the MDS and the webservice: No.
    If you use another link, as direct tcp, wifi etc.: No.

  • The consumption of web services and paging data.

    Hi all

    I am building an ADF application where I need to make web service calls to two different external systems. Each of them say return 50 records. On the user interface, I want to display 10 records at a time. Also, I need check duplicate records.

    What is the best approach in this case. Will I call the web services and generate the data in a temporary table and ADF - BC allows to display these data on the user interface. In this case set the data of a given user will be a challenge. Or will I programatically create 100 your and use them to display data on the UI (tabular) with paging option.

    Help, please!

    Yes, the pagination of POJO would be appropriate.

  • How to pass the name of user and password to BPEL of the java proxy web service?

    Hi all

    Environment: SOA Suite 11g

    I use basic http authentication in my SOA services using a strategy of "oracle/wss_http_token_client_policy. Now, I need to call these SOA web services from a java proxy.

    Please let me know how this can be done.

    Thanks in advance

    Have you tried the messages below?

    BPEL to invoke the secure with HTTP Basic authentication Web service
    Call a BPEL process using the HTTP Basic authentication

    http://docs.Oracle.com/CD/E21764_01/Web.1111/e13713/owsm_appendix.htm#CHDBAHBI

    Thank you
    Vijay

  • Oracle PL/SQL Web service - dynamic parameters... possible?

    Oracle 11.2.0.3 - newbie on web services!

    Currently we have a pl/sql web service takes 2 static parameters and return a response of varchar2.

    Asked me today if it is possible for a web service in a dynamic set of parameters and return a set of results. It's as if I have to pass the web service a table with two columns and return an array from a column.

    For example:
                        Input                          Output
              1 2                             3
              3 4                             7 
              5 6                            11
    of course in XML output. Is it possible?

    p.s. I posted this in OC4J also - no response so the re-post!

    Parameters related to the procedures. Web services require XML messages.

    Where are the settings? You cannot pass a dynamic number of parameters in a procedure, but you can pass a structured as a parameter type that can contain multiple values, either a table/collection type or document XML itself.

    All package values in the XML file and pass it to the web service.

    If this isn't answering your question, please post more information, with some sample data and code. Read the FAQ: {message identifier: = 9360002}

  • hidden field fill with xml - Web service call

    Hello world

    I developed a web service, my web service method expects an xml string.

    I have a new data connection, which is my wsdl file...

    Now, my challenge is how to fill in this field with the xml of my form, so that my my method can manupulate it.

    Secondly, the same button that calls my web service for the e-mail form once the web service has been called, send the form in PDF format.

    You'll really appreciate your help.

    ACE

    You can use the command to populate a field with the XML of the form below.

    FieldName.rawValue = xfa.data.saveXML ("pretty");

    To run the Web service and then send an email

    1. first place binding the Web service Execute button and make it invisible / hidden

    2. place a normal button on the form and in the writing code click event to call the Web service and then send the e-mail.

    Call the click event of the button webservice

    WebserviceExecuteButton.execEvent ("click");

    Send an email

    event.target.submitForm ({cURL: "mailto:" + strToAddress + "?"}) subject = "+ strSubject +"& body ="+ strMessage, cSubmitAs:"PDF", cCharset:" utf - 8 "});"

    Replace the names with your form variables in the above line.

    Thank you

    Srini

Maybe you are looking for

  • Cannot connect to apple tv for Mac OS Sierra

    Hello I upgraded my Macbook Pro (Mid 2012 retina) to Sierra de MacOS. When I am trying to connect to apple tv by clicking on the AirPlay icon and click on my Apple TV it asks me to insert a password! Apple TV displays an access code and I use it but

  • What happened to the 'Identity Switch' feature under the file tab?

    Under the old version, I was able to change his identity (I must have for this download add on) so that I could open both my purchase and sale of the IDS at the same time on eBay. They have done away with this feature?

  • HP Pavilion p7 - 1027c: do I need a cooling fan upgrade?

    So I'm going to buy a new graphics card, the Geforce GTX 750 ti and a new power supply 430 Watt. Given that my cooling fan computer stocks is built for my computer which runs on 250 watts with integrated graphics, simply to cool my new card and power

  • "iPhone cannot be used because it requires a newer version of iTunes" even though I have the latest version of iTunes?

    Yesterday, I bought an iPhone 6s and decided to restore it via iTunes. This then is the message "iPhone cannot be used because it requires a newer version of iTunes" came. So I installed the latest version, but the message still came, even if I had t

  • error code 8024200

    I am installing service pack 2 for vista as I said who will solve the problems I'm having watching the media recently installed internet Explorer 8. I'm unable to install service pack 2 due to an error 8024200. Can someone please help! ??