Publish PL/SQL as Web Service

I am new to Oracle Web Service. I went through Publish PL/SQL as Web Service tutorial and tested from browser. When I tested by
http://127.0.0.1:8888/PLSQL-PLSQL-context-root/my.CompanyWebService
I got following message:
"Error parsing the WSDL for this endpoint.
oracle.wsdl.internal.WSDLException: oracle.xml.parser.v2.XMLParseException: Start of root element expected."
I was able to display WSDL somehow by
http://127.0.0.1:8888/PLSQL-PLSQL-context-root/my.CompanyWebService?WSDL
I have no clue what is the problem. Please help.
Thanks.
Yi Zhou
[email protected]

Hi,
The problem could be because of wrong JDK version. Looks like you are using JDK1.4.2. Could you try checking with JDK 1.3.x
If you still face problems, specify your environment details and at what stage you are getting the error.
Sujatha.

Similar Messages

  • Publishing pl/sql as web services using axis

    Hello,
    I am a newbie to web services.
    I want to publish pl/sql packages as web services using axis and tomcat. Can you please tell me where to start - I will appreciate any information, links to tutorials and docs. Can you please tell me what I need to deploy and run the services.
    Thank you very much in advance!
    Eka

    Hello,
    The OracleAS Database Web Service is only available for OracleAS using the Oracle Web Service runtime and tools as documented here.
    If you are not using OracleAS or if you want to use another Web Service stack you can still manually program you Web Service manually using JDBC and is features.
    Here a generic article: http://www.onjava.com/pub/a/onjava/2003/08/13/stored_procedures.html
    and you can use advanced features of JDBC and JPublisher if needed:
    Simplifying Database Access
    Regards
    Tugdual Grall

  • Publish PL/SQL with Web Service with errors ...

    Good day, I installed on my pc the example of the following link:
    http://www.oracle.com/technology/tech/webservices/htdocs/series/plsql/index.html
    Unfortunately, when try to perform it on the window where running Oracle9iAS comes restored the following mistake :
    Node started with id=-1716454166
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    java.lang.NullPointerException
    at oracle.jdbc.driver.LRUStatementCache.searchExplicitCache(LRUStatement
    Cache.java:654)
    at oracle.jdbc.driver.OracleConnection.getStatementWithKey(OracleConnect
    ion.java:4347)
    at sqlj.runtime.ExecutionContext$OracleContext.prepareOracleStatement(Ex
    ecutionContext.java:1397)
    at rocco.Company.addemp(Company.sqlj:42)
    at rocco.__CompanySPWrapper.invokeMethod(__CompanySPWrapper.java:73)
    at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:108)
    at oracle.j2ee.ws.RpcWebService.doPost(RpcWebService.java:248)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterC
    hain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:560)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:797)
    at java.lang.Thread.run(Unknown Source)
    and on the JDeveloper window show the mistake:
    C:\jdev\jdk\bin\javaw.exe -ojvm -classpath C:\jdev project\PLSQL\Project1\classes;C:\jdev\jdev\lib\jdev-rt.jar;C:\jdev\sqlj\lib\runtime12.jar;C:\jdev\jdbc\lib\classes12.jar;C:\jdev\jdbc\lib\nls_charset12.jar;C:\jdev\jdev\lib\jdev-rt.jar;C:\jdev\soap\lib\soap.jar;C:\jdev\lib\xmlparserv2.jar;C:\jdev\jlib\javax-ssl-1_2.jar;C:\jdev\jlib\jssl-1_2.jar;C:\jdev\j2ee\home\lib\activation.jar;C:\jdev\j2ee\home\lib\mail.jar;C:\jdev\j2ee\home\lib\http_client.jar mypackage1.RoccoCompanyWebServiceStub
    [SOAPException: faultCode=SOAP-ENV:Server; msg=[SOAPException: faultCode=SOAP-ENV:Server; msg=]]
         void mypackage1.RoccoCompanyWebServiceStub.addemp(rocco.Employee)
              RoccoCompanyWebServiceStub.java:164
         void mypackage1.RoccoCompanyWebServiceStub.main(java.lang.String[])
              RoccoCompanyWebServiceStub.java:59
    Process exited with exit code 0.
    It seems been depicted all correctly, but although this do not succeed to complete the tutorial with the test puts into practice.
    Someone it is able to be me of help.
    Thanks one thousand.
    :-(

    Hi,
    there is a tutorial:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    "Developing a Web Service from a PL/SQL Package"
    I think you need Oracle AS, because you need an instance which "talks" http....

  • Publishing pl/sql as web service without AS or OC4J

    Hi,
    I've read about new Native Web Services in Oracle 11g and I like the idea.
    But how to do similar approach in 10g or even 9.2 database?
    I would like to have database only web service without AS, but I cannot use 11g right now.
    I didn't find any discussion about the new native WS within 11g database. It's great, isn't?
    Libor

    Hello,
    The OracleAS Database Web Service is only available for OracleAS using the Oracle Web Service runtime and tools as documented here.
    If you are not using OracleAS or if you want to use another Web Service stack you can still manually program you Web Service manually using JDBC and is features.
    Here a generic article: http://www.onjava.com/pub/a/onjava/2003/08/13/stored_procedures.html
    and you can use advanced features of JDBC and JPublisher if needed:
    Simplifying Database Access
    Regards
    Tugdual Grall

  • Publishing Application Modules as Web Services runs into error

    Hello,
    I want to create a web service based upon and ADF BC Application (in other words, based upon a data control).
    I want to expose the ADF BC Application functionality (DML, calling of procedures) via Web Service.
    I read in the Developers Guid for Forms4GL Developers, parapragh 33.4 (Publishing Application Modules as Web Services), how this can be done:
    How to Enable the J2EE Web Service Option for an Application Module
    To enable your application module as a web service:
    1. Enable a custom Java class for your application module and add to it one or more
    custom methods that you want to appear on the web service interface.
    2. Open the Application Module editor and on the Client Interface tab, select one or
    more custom methods to appear on the client interface.
    3. With the Application Module editor still open, on the Remote panel, select
    Remoteable Application Module, select J2EE Web Service in the Available list
    and shuttle it to the selected list.
    4. Then click OK to save your changes.
    When I follow this series of actions I get the following error:
    Failed to validate method
    oracle.javatools.parser.java.v2.classfile.ClClass$ClMethod@3146a021
    java.lang.IllegalStateException: Failed to validate method oracle.javatools.parser.java.v2.classfile.ClClass$ClMethod@3164a021 whether it is publishable
         at oracle.jbo.dt.jdevx.JdvWebServicePlatform2.getMethodPublishableStatus(JdvWebServicePlatform2.java:254)
         at oracle.jbo.dt.objects.JboWebServicePlatform.generateWebServiceCode(JboWebServicePlatform.java:308)
         at oracle.jbo.dt.objects.JboWebServicePlatform.createServer(JboWebServicePlatform.java:100)
         at oracle.jbo.dt.objects.JboDeployPlatform.createRemoteClass(JboDeployPlatform.java:2077)
         at oracle.jbo.dt.ui.module.AMSaveRemoteThread.doGeneration(AMRemotePanel.java:671)
         at oracle.jbo.dt.ui.module.AMSaveRemoteThread.run(AMRemotePanel.java:658)
    Who has any ideas?
    Regards Leon Smiers

    repost

  • Publishing a stateless java web service

    Hi All,
    Two questions:
    1 - Does Oracle still support publishing java web services (stateless and stateful) just by declaring it in the web.xml file? I see that there are instructions on how to do this in an old whitepaper but any recent programmer documentation does not have it.
    2 - I tried declaring a java class as a web service in the web.xml and it seems to do something (ie., when I go to the URI, there is actually the wsdl, and the various methods that can be invoked). However, when invoking one of the methods (which should just return "Hello World" without any processing at all), I get the following exception. Any ideas?
    javax.servlet.ServletException
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:632)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:292)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:606)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:312)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Thanks,
    Johnny

    hello Jonathan
    In Jdev903 doc it is given that (pl/sql web service)
    Limitations
    On Oracle9i Database release 2, when a stored procedure or function of the same name and the same package name is accessible in more than one schema, then the SQLJ translator invoked during publication of PL/SQL web services will fail. In order to resolve this problem, ensure that packages to be published are visible only in one schema, and that no other packages in other schemas share the same name.
    The problem u explained come into the same category.Which database version u r using ? .
    regards
    Mangesh

  • Unable to publish WBEi object as Web Service in BOBJ 4.0

    We have an issue when publish WEBi object (say a table) as Web service with following error message:
    The server sent HTTP status code 503: Service Unavailable.
    Click on the Details button, here are details:
    com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 503: Service Unavailable     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown Source)     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown Source)     at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown Source)     at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown Source)
         at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
         at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
         at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
         at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
         at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
         at $Proxy56.getDaaWSList(Unknown Source)
         at com.businessobjects.extension_point.InfoStoreHelper.getDaaWSList(InfoStoreHelper.java:122)
         at com.businessobjects.extension_point.reportpanel.PublicationWarningPage$RetrieveDaaWSWorker.doInBackground(PublicationWarningPage.java:265)
         at com.businessobjects.extension_point.reportpanel.PublicationWarningPage$RetrieveDaaWSWorker.doInBackground(PublicationWarningPage.java:245)
         at javax.swing.SwingWorker$1.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at javax.swing.SwingWorker.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    When I try to add a new web service host (actual hostname) in the Manage Web Services Hosts screen within the wizard, the url value ( e.g. http://hostname:8080/dswsbobje) also has the same message. i.e., "The server sent HTTP status code 503: Service Unavailable."
    The Publish service in http://hostname:8080/dswsbobje/services/listServices is active. When I goto pagehttp://hostname:8080/dswsbobje/services/Publish?wsdl, I see following contents:
      <?xml version="1.0" encoding="UTF-8" ?>
    + <definitions targetNamespace="http://publish.dsws.businessobjects.com/2007/06/01" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://dsws.businessobjects.com/2007/06/01" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s0="http://publish.dsws.businessobjects.com/2007/06/01">
    Also in CMS, AdaptiveProcessingServer under Connectivity Services is enabled and running.
    Is there any additional setting required to make this "publishing as Web Service" available?
    Thanks a lot for your help!
    Bill

    Hi,
    What happens if you test your same workflow directly on the local BIP server ?   (i.e. by-passing proxy, firewall etc)
    Also, please Patch up to the latest version  (4.0 SP02 Patch2.11)  as there was an issue with WRC BI web Services previously.
    Regards,
    H

  • How to enable MSDOS program to be called from Oracle PL/SQL procedure ( Web Service )?

    Hello,
    Dealing with the time demanding procedure where power user is interactively execute sequence
    of steps of procedure:
    1. pl/sql procedure for preparing data in some table
    2. java program that read data from the table and creating input txt file for MSDOS program
    3. MSDOS program is autonomous component that reads input txt file and make
        output txtfile.
        MSDOS program is closed component, can not be modified
    4. java program that insert txtfile into Oracle table.
    5. Steps 1 to 4 are executed in interations driven with select on some table.
    Trying to prepare re-design the procedure  and not sure about which technologies to use ?
    The goal is that whole procedure would be implemented in pl/sql procedure and this way could be executed
    so as from power user from command line as from controlled application on any type of the client.
    So if that MSDOS program would be transformed as Web Service offered on  some MSWin server in the intranet.
    Then PL/SQL procedure would communicate ( call this web service ) and do all the job and at the end
    send status of completion and report through e-mail to the issuer of the procedure?
    Not sure what technologies should I use on Oracle RDBMS server on Linux to communicate with MSWin Web service which is running MSDOS program ?

    > Hi TOM,
    This is not asktom.oracle.com.
    > Can Possible to do in Oacle Pl/Sql...?
    Yes it can be done. Simply consult the applicable manuals that contains all of the details on how to do it. The manuals are:
    - Oracle® Database Application Developer's Guide - Large Objects (refer to Chapter 6 section on Using PL/SQL (DBMS_LOB Package) to Work with LOBs)
    - Oracle® Database PL/SQL Packages and Types Reference (refer to the chapter on DBMS_LOB)

  • Does BI Publisher 11g Support Restful Web Services as Data Set

    Hi,
    Could you tell me if BI Publisher 11g supports the REST API or is SOAP based API required for web services defined as data sets.
    Thanks in advance,
    Jean

    There are External API's which only do JSON outputs. Can this be integrated into a Report? If not, Is there a Enhacement to Add RESTful returning JSON or XML for a Dataset?

  • Adding C# Soap Header to a client that calls BT2010 Orchestration published as a WCF Web Service

    I've added code from this reference to my orchestration (that is published as a WCF webservice):
    Accessing SOAP Headers in Orchestrations.
    I have a C# client that I was previously using before I was using any of the SOAP Headers.  I've been looking at dozens of blogs, and find the answers to anything related to SOAP Headers most confusing (and often specific to unique cases). 
    I'm using BT2010.  How can I add username, password, and a custom header called "ApplicationID" to my existing C# program and pass it to the orchestration/web service?
    Thanks,
    Neal

    Neal,
    The BizTalk WCF Service Publishing Wizard does not include custom SOAP header definitions in the generated metadata. To publish metadata for WCF services using custom SOAP headers, you should manually create a Web Services Description Language (WSDL) file.
    You can use the externalMetadataLocation attribute of the
    <serviceMetadata> element in the Web.config file that the wizard generates to specify the location of the WSDL file. The WSDL file is returned to the user in response to WSDL and metadata exchange (MEX) requests instead of the auto-generated WSDL.
    The following XML data shows an example of a part of the WSDL file defining custom SOAP headers:
    <wsdl:operation name="Request">
    <soap12:operation soapAction="http://Microsoft.Samples.BizTalk.NetTcpAdapter/OrderProcess/IOrderProcess/Request" style="document" />
    <wsdl:input name="Order">
    <soap12:header message="i0:Order_Headers" part="SalesAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output name="OrderConfirmation">
    <soap12:header message="i0:OrderConfirmation_Headers" part="PaymentAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    Refer:
    SOAP Headers with Published WCF Services
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Error running the PL/SQL consuming web services  demo

    I downloaded and installed the PL/SQL code from:
    http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    on Oracle 9i version 2 (on both Windows and Solaris) which can be used to consume simple web services. However, I got the following error running the local time demo:
    select time_service.GET_LOCAL_TIME('19104') from dualORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "XN.DEMO_SOAP", line 84
    ORA-06512: at "XN.TIME_SERVICE", line 13
    It appears to occur upon doing this:
    resp.doc.getstringval()
    It seems to mean eith resp or resp.doc is null. BTW, the following:
    select utl_http.request('www.oracle.com') from dual
    works fine, so does the web service URL. Please
    help me get this work!
    Thanks a lot!

    I downloaded and installed the PL/SQL code from:
    http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    on Oracle 9i version 2 (on both Windows and Solaris) which can be used to consume simple web services. However, I got the following error running the local time demo:
    select time_service.GET_LOCAL_TIME('19104') from dualORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "XN.DEMO_SOAP", line 84
    ORA-06512: at "XN.TIME_SERVICE", line 13
    It appears to occur upon doing this:
    resp.doc.getstringval()
    It seems to mean eith resp or resp.doc is null. BTW, the following:
    select utl_http.request('www.oracle.com') from dual
    works fine, so does the web service URL. Please
    help me get this work!
    Thanks a lot!

  • BIWS - Publish block as a web service - prompt selection missing

    Hello,
    we are running sap Bo 4.0 sp 2 pach 6.
    I have encountered a strange problem with Publish as a Web Service Wizzard.
    I created a simple webi report with a vertical table based on Bex Query, the bex query has 2 mandatory prompts date: and company code:
    Webi pics up these prompts and asks for them every time i do a refresh, as you would expect.
    Now i want to publish my vertical table as a web service. I can`t, because the Publish content wizard does not see these prompts, so every time i refresh i get an error.
    I tried a different approach:
    Created the same webi report only this time going through an old universe (.unv) based on the same Bex query.
    This time Publish as a Web Service Wizard works fine, it picks up the mandatory prompts and allows a normal refresh.
    This seems like a bug, has anyone else encountered this? Maybe there is a SAP note for this? I can`t seem to find it though.

    I have the same problem.
    The only workaround I tried is to remove the prompt entirely, and add the date and company code as a free characteristic. When you build webi query, you can find date and company code on your object browser and add them into query filter. BIWS will capture the prompt.
    May not work if you have restricted key figure with prompt. And I am not sure about the performance as well though, it may bring everythign and filtering is being done in BO side. But I think BW is smart enough to fire up query to only bring selected result.

  • Publish query as a web service

    Hi,
    Actually my requirement is that I need a url to import in the datamanager, so that i can import my bi query in the xcelsius.
    I hav got all the BO enterprise tools available witjh BO XI 3.1 & SAP integration kit installed.
    For this in the universe designer i have & created a universe/ Connection & my BI query is visible in the universe pane. Can anybody guide me how to publish or get the url? or from here how do I proceed to get my BI query in xcelsius?
    Thanks in advance,Shreesh

    Hi,
    to generate the URL, you need a web service that can be created with "query as a web service".
    If you already have the universe built, then you will find a very good & detailed guidance here:
    /people/ingo.hilgefort/blog/2008/09/04/businessobjects-and-sap-part-10--xcelsius-with-universe-and-query-as-a-webservice
    Regards
    Victor

  • Publishing ODi scenario as Web Service

    Hi
    I could use ODI invoker Service to invoke ODi scenario from SOap UI, or BPel and other Tools
    The ODI invoker service invokes the SCENARIO & returns the session number for the Scenario triggered. But the issue is it will not wait for the scenario to complete.
    What I need is the status for the scenario after it is done....anyone can suggest how is it possible.
    Other way around is
    If its possible to publish scenarios as web services????

    Hi Setting Sync Mode to 1 helped .Thanks. But there is one issue :
    For Hard errors it returns the repsosne as false ( Failed) but for scenarios with data errors or unique constraint errors it returns a true.. is tehre a way to handle that.
    Anothe rquestion related to publishing the scenario as service is:
    Added Application server: AXIS2, and used "SKM Oracle" Knowledge module on a datastore(table) to generate and deploy webservice
    I get this error
    java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
         at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
         at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
         at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
         at com.sunopsis.dwg.dataservices.WSDLGenerator.d(WSDLGenerator.java)
         at com.sunopsis.dwg.dataservices.AbstractWSGenerator.m(AbstractWSGenerator.java)
         at com.sunopsis.dwg.dataservices.AbstractWSGenerator.b(AbstractWSGenerator.java)
         at com.sunopsis.dwg.dataservices.WSGenerationTask.a(WSGenerationTask.java)
         at com.sunopsis.graphical.b.c.b(c.java)
         at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
         at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
         at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
         at java.lang.Thread.run(Thread.java:619)

  • Error running demo PL/SQL consuming web services

    I downloaded and installed the code from:
    http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    on Oracle 9i version 2 (on both Windows and Solaris).
    But I got the following error running the local time
    demo:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "XN.DEMO_SOAP", line 72
    ORA-06512: at "XN.TIME_SERVICE", line 13
    ORA-06512: at line 2
    The error occurs on this line:
    http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
    Can anybody tell me what I do wrong? Thanks a lot!
    Also, is there any alternative ways to consume web services
    using PL/SQL only? Many thanks!
    Henry X.

    Mike,
    Thanks so much for your help. I tried your code just now.
    Same error:
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "XN.DEMO_SOAP", line 50
    ORA-06512: at "XN.DEMO_SOAP", line 83
    ORA-06512: at "XN.TIME_SERVICE", line 27
    ORA-06512: at line 7
    Let me post the code I am using. Note that
    I removed the code for using proxy in time_service.
    Henry
    -- code for calling the time_service
    DECLARE
    ZIPCODE VARCHAR2(200);
    v_Return VARCHAR2(200);
    BEGIN
    ZIPCODE := '94065';
    v_Return := TIME_SERVICE.GET_LOCAL_TIME(ZIPCODE => ZIPCODE);
    DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
    END;
    -- code for the package demo_soap
    CREATE OR REPLACE PACKAGE demo_soap AS
    TYPE request IS RECORD (
    method VARCHAR2(256),
    namespace VARCHAR2(256),
    body VARCHAR2(32767));
    TYPE response IS RECORD (
    doc xmltype);
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request;
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2);
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response;
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2;
    END;
    CREATE OR REPLACE PACKAGE BODY demo_soap AS
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request AS
    req request;
    BEGIN
    req.method := method;
    req.namespace := namespace;
    RETURN req;
    END;
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2) AS
    BEGIN
    req.body := req.body ||
    '<'||name||' xsi:type="'||type||'">'||value||'</'||name||'>';
    END;
    PROCEDURE generate_envelope(req IN OUT NOCOPY request,
    env IN OUT NOCOPY VARCHAR2) AS
    BEGIN
    env := '<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body><'||req.method||' '||req.namespace||'
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    req.body||'</'||req.method||'></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    END;
    PROCEDURE show_envelope(env IN VARCHAR2) AS
    i pls_integer;
    len pls_integer;
    BEGIN
    i := 1; len := length(env);
    WHILE (i <= len) LOOP
    dbms_output.put_line(substr(env, i, 60));
    i := i + 60;
    END LOOP;
    END;
    PROCEDURE check_fault(resp IN OUT NOCOPY response) AS
    fault_node xmltype;
    fault_code VARCHAR2(256);
    fault_string VARCHAR2(32767);
    BEGIN
    fault_node := resp.doc.extract('/soap:Fault',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/');
    IF (fault_node IS NOT NULL) THEN
    fault_code := fault_node.extract('/soap:Fault/faultcode/child::text()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    fault_string := fault_node.extract('/soap:Fault/faultstring/child::text()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    raise_application_error(-20000, fault_code || ' - ' || fault_string);
    END IF;
    END;
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response AS
    env VARCHAR2(32767);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp response;
    BEGIN
    generate_envelope(req, env);
    -- show_envelope(env);
    http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(env));
    utl_http.set_header(http_req, 'SOAPAction', action);
    utl_http.write_text(http_req, env);
    http_resp := utl_http.get_response(http_req);
    utl_http.read_text(http_resp, env);
    utl_http.end_response(http_resp);
    resp.doc := xmltype.createxml(env);
    resp.doc := resp.doc.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    -- show_envelope(resp.doc.getstringval());
    check_fault(resp);
    RETURN resp;
    END;
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2 AS
    BEGIN
    RETURN resp.doc.extract('//'||name||'/child::text()',
    namespace).getstringval();
    END;
    END;
    -- code for the package time_service
    CREATE OR REPLACE PACKAGE time_service AS
    FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2;
    END;
    CREATE OR REPLACE PACKAGE BODY time_service AS
    -- Location of Web service definition
    -- http://www.alethea.net/webservices/LocalTime.asmx?WSDL
         FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2 IS
                   req demo_soap.request;
                   resp demo_soap.response;
         BEGIN
              req := demo_soap.new_request('LocalTimeByZipCode',
              'xmlns="http://www.alethea.net/webservices/"');
              demo_soap.add_parameter(req, 'ZipCode', 'xsd:string', zipcode);
              resp := demo_soap.invoke(req,
              'http://www.alethea.net/webservices/LocalTime.asmx',
              'http://www.alethea.net/webservices/LocalTimeByZipCode');
              RETURN demo_soap.get_return_value(resp, 'LocalTimeByZipCodeResult',
                        'xmlns="http://www.alethea.net/webservices/"');
         END;
    END;

Maybe you are looking for