Problem invoking a web service

Hopefully this is an easy one for you gurus...
I couldn't read my WSDL when it was in wrapped document/literal format, so I changed it to unwrapped document/literal, and now my javax.wsdl.xml.WSDLReader has no problem reading it. GREAT! Right?
Well, now when I go to invoke the darn thing I get this exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
I'm trying to invoke the Web Service like this:
Service myService = new Service();
String retval = "";
try {
     myService.setCacheWSDL(true);
     Call myCall = (Call) myService.createCall();
     myCall.setTargetEndpointAddress(endpoint);
     myCall.setOperationName(new QName(endpoint, methodName));
     myCall.setTimeout(new Integer(HdConstants.SERVICE_CALL_TIMEOUT));
     Object myArgs[] = argVals.toArray();
     retval = (String) myCall.invoke(myArgs); .....HELP!!
Thanks,
-Jack
Message was edited by:
snoCarver
Message was edited by:
snoCarver

Hi,
Can anyone help me with this ??
I guess I am not able to send the authorization credentials via the request to the web service invocation.
Plz help ! This is a bit urgent..
Regards,
Shiva Kiran

Similar Messages

  • Problem invoking a web service from soa11g BPEL.

    Hi ,
    I am trying to invoke a web service from soa bpel 11g composite.
    We have the wsdl, wsdl URL of the web service along with the user name , password credentials.
    Initially w/o any WS policy attached and testing the composite, it fails with the below message
    *<fault>*
    *<bpelFault>*
    *<faultType>0</faultType>*
    *<remoteFault>*
    *<part name="summary">*
    *<summary>An Authentication object was not found in the SecurityContext</summary>*
    *</part>*
    *<part name="detail">*
    *<detail>javax.xml.ws.soap.SOAPFaultException: An Authentication object was not found in the SecurityContext</detail>*
    *</part>*
    *<part name="code">*
    *<code>soap:Server</code>*
    *</part>*
    *</remoteFault>*
    *</bpelFault>*
    *</fault>*
    *<faultType>*
    *<message>0</message>*
    *</faultType>*
    *</messages>*
    So I have gone back to the composite and added the WS policy (oracle/wss_username_token_client_policy) by Right clicking on web service -> Configure WS Policy -> Security -> oracle/wss_username_token_client_policy -> OK.
    After this I have added the following binding properties 'oracle.webservices.auth.username' , 'oracle.webservices.auth.password' with the respective values and deployed it again.
    Even then I face the same issue. I have looked into the EM console and found the HTTP username and password properties were blank for this Web service even though the WS policy was attached.
    Later I have tried editing the username pwd from the EM console, only to find out that the composite was now failing in the previous step (an ordinary db adapter with a select statement) even before it reaches the web service invocation.
    If I redeploy the composite, the http username and pwd properties in the EM console are erased and when i test it, it errors out at the web service invocation with the same issue again.
    Any pointers on how to solve this issue ??
    How can I figure out what is the security policy the web service is using ??
    Regards,
    Shiva Kiran

    Hi,
    Can anyone help me with this ??
    I guess I am not able to send the authorization credentials via the request to the web service invocation.
    Plz help ! This is a bit urgent..
    Regards,
    Shiva Kiran

  • Problem invoking RPC web service (Unbalanced ELEMENT)

    Hi folks!
    I am trying to create an RPC web service for an existing (and working) EJB using
    WebLogic 6.1 SP2, but I keep getting the following error message each time I invoke
    any of the available methods from the stateless session bean using a (static)
    test client:
    Exception in thread "main" java.lang.reflect.UndeclaredThrowableException: Error
    at Line:12, token:[SPACE]     (
    )Unbalanced ELEMENT got:head expected:meta
         at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:67)
         at weblogic.xml.babel.parsers.StreamParser.streamParseSome(StreamParser.java:136)
         at weblogic.xml.babel.parsers.BabelXMLEventStream.parseSome(BabelXMLEventStream.java:46)
         at weblogicx.xml.stream.XMLEventStreamBase.hasNext(XMLEventStreamBase.java:135)
         at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:241)
         at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:171)
         at weblogicx.xml.stream.XMLEventStreamBase.startElement(XMLEventStreamBase.java:164)
         at weblogic.soap.codec.SoapMessage.read(SoapMessage.java:86)
         at weblogic.soap.WebServiceProxy.receive(WebServiceProxy.java:480)
         at weblogic.soap.WebServiceProxy.invoke(WebServiceProxy.java:431)
         at weblogic.soap.SoapMethod.invoke(SoapMethod.java:186)
         at weblogic.soap.wsdl.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:27)
         at $Proxy0.testmethod(Unknown Source)
         at Client.main(Client.java:58)
    Does anybody have an idea what might be causing this problem? A search in the
    newsgroup archive suggests that this problem might be related to the WSDL interface
    file, although it is not clear to me how I can change that .wsdl file directly
    as I am using the wsdl.jsp file created using the Remote2WSDL function. Any help
    would be greatly appreciated!
    regards,
    Ekim

    Sorry, have no solution for you, but I can agree we with your observations, that only document literal style services work in a predictable fashion. (In 10.1.3.1.0)
    Message was edited by:
    taylor_tails

  • Problem invoking gogle web service from session bean

    Hello
    I have developed a Web-Client which consumes the google-WebService with Apache Axis. I have generated the corresponding classes with WSDL2Java and the client works without problems. A little code fragment from my client:
    GoogleSearchService service = new GoogleSearchServiceLocator();
              // Now use the service to get a stub to the Service Definition Interface (SDI)
              GoogleSearchPort google = service.getGoogleSearchPort();
             GoogleSearchResult googleSearchResult =  google.doGoogleSearch(GOOGLE_KEY, // java.lang.String key
                           q.toString(), //java.lang.String q
                           0, // int start
                           10, // int maxResults
                           false, //boolean filter
                           "", // java.lang.String restrict      
                           false, //boolean safeSearch              
                           "lang_ja|lang_en", // java.lang.String lr
                           "UTF-8", // java.lang.String ie
                           "UTF-8"); // java.lang.String oeNow I have to put the Web-Client in a SessionBean. Therfore I defined the code of the web-client in a method and put it into a stateless session bean and wrote a client for the session bean. But when the session bean invokes the corresponding method for consuming the google web service, there always occurs the following error:
    [java] Exception in thread "main" java.rmi.ServerError: Unexpected Error; nested exception is:
    [java] java.lang.NoClassDefFoundError: GoogleSearch/GoogleSearchService
    But I have definitely all necessary classes in my classpath, like GoogleSearchService, etc. So all necessary classes are available. And the code to conume the web service als works because as said I tested it with a web-client.
    Has anybody an idea what went wrong here? Is there anything important when I a web service is invoked by a session bean??:(
    regards
    pat

    Has nobdy an idea?? :(( I tried for such a long time but I was not able to fix this problem....:(
    Please help...

  • Problems invoking literal Web Services

    Hi all,
    I'm trying to invoke a document style web service.
    I've succesfully deployed a service using <soap:body use="literal" namespace="MyWebService1"/>
    as for all literal service i've declared it as
    public org.w3c.dom.Element MyService(org.w3c.dom.Element e){...
    in my WSDL i've changed message type from xsd:any or xsd:anyType to an element I've declared in the <types> section, cause BPEL do not accept these kind of types:
    <message name="MyServiceRequest">
    <part name="e" element="tns:MyElement"/>
    </message>
    i've called the service succesfully with a self-written client and then i've tried to invoke it throught a Bpel process... and it fail :(
    I've used a TCP monitor to compare XML envelopes and I've noticed a difference wich let BPEL invocation fail
    with my pure java client the mex produced is:
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:docStyle xmlns:ns1="MyWebService1" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
    <elem>
    <numbers><number>11</number></numbers>
    </elem>
    </ns1:docStyle>
    </SOAP-ENV:Body>
    with BPEL call i get
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:docStyle soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="MyWebService1">
    <numbers xmlns="http://prova/DocStyleService.wsdl">
    <number>45</number>
    </numbers>
    </ns1:docStyle>
    </soapenv:Body>
    </soapenv:Envelope>
    the problem is the encodingStyle one = http://schemas.xmlsoap.org/soap/encoding/
    the other = http://xml.apache.org/xml-soap/literalxml
    but i cannot figure how to change this, how to use the invoke activity to send in literal encoding style!!
    any ideas
    thank Lisa

    Hi Lisa,
    I am having very similar problem :) (RPC web service, but Element as parameter and literal encoding), so if you, or someone else knows the solution, please help...
    regards,
    Vlado

  • Problem invoking EJB web service from Java

    The project has a BPEL project calling embedded Java class and that Java class is invoking EJB WS(Java based).
    The whole project has been developed in Jdeveloper. There is a dependency set between BPEL project and the EJB project.
    The EJB WS has been deployed in the machine where BPEL server is running.
    When I am running the java(embedded in BPEL project) manually in Jdeveloper then it is callig the EJB WS without any issue.
    But when the BPEL is invoking the same Java and which in turn is invoking the EJB WS then it is giving this error in the BPEL Audit file :
    <runtimeFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    java.lang.NoClassDefFoundError
    </code>
    </part>
    - <part name="summary">
    <summary>
    com/formfactor/it/promis/PromisLinkWSSoapHttpPortClient
    </summary>
    </part>
    - <part name="detail">
    <detail>
    [Ljava.lang.StackTraceElement;@1cde909
    </detail>
    </part>
    </runtimeFault
    Note: com/formfactor/it/promis/PromisLinkWSSoapHttpPortClient is the WS end-point.
    To try out I have put EjbWebServices.jar , which has PromisLinkWSSoapHttpPortClient.class, in <SOA_HOME>/bpel/system/classes . But it did not help.
    Can you please let me know what else has to be done?

    Hi,
    Can anyone help me with this ??
    I guess I am not able to send the authorization credentials via the request to the web service invocation.
    Plz help ! This is a bit urgent..
    Regards,
    Shiva Kiran

  • Problem trying to invoke my web service

    Hi there,
    We have just been creating a very simple test web service here, basically to return the square root of the number passed to it.
    I have created this as a PL/SQL web service using JDEVELOPER 9.0.3. Using JDEVELOPER entirely I have successfully created and depoloyed the service, generated the stub and called it without any problems.
    I would now like to test calling the web service outside of Jdeveloper. So using internet explorer I generated the client stub using <url>?proxy_jar, which downloaded a .class file.
    I have tried to write a small java program to use this class to call my web service. and am getting the following errors
    C:\java>java -classpath c:\java class1 81
    Exception in thread main
    java.lang.NoClassDefFoundError: cddev.proxy.class1
    java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[], int, int, java.
    security.ProtectionDomain)
    java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.s
    ecurity.ProtectionDomain)
    java.lang.Class java.security.SecureClassLoader.defineClass(java.lang.String, byte[], int, i
    nt, java.security.CodeSource)
    java.lang.Class java.net.URLClassLoader.defineClass(java.lang.String, sun.misc.Resource)
    java.lang.Class java.net.URLClassLoader.access$100(java.net.URLClassLoader, java.lang.String
    , sun.misc.Resource)
    java.lang.Object java.net.URLClassLoader$1.run()
    java.lang.Object java.security.AccessController.doPrivileged(java.security.PrivilegedExcepti
    onAction, java.security.AccessControlContext)
    java.lang.Class java.net.URLClassLoader.findClass(java.lang.String)
    java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
    java.lang.Class sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String, boolean)
    java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
    java.lang.Class java.lang.ClassLoader.loadClassInternal(java.lang.String)
    This is the java program I am trying to run to invoke the web service.
    package cddev.proxy;
    import java.math.BigDecimal;
    public class class1 {
    public static void main(String[] args)
    try
    Square_rootProxy proxy = new Square_rootProxy();
    System.out.println(proxy.get_square_root(new BigDecimal(args[0])));
    catch(Exception ex)
    System.out.println(ex);
    We are very new to Java here, so it may well be problem there.
    Any help would really be appreciated.
    Gary

    because you have defined package in your class:
    you should have your compiled class file in c:\java\cddev\proxy
    then invoke java -cp c:\java xxxx.class

  • 10g: Invoking a web service asynchronously from BPEL

    Hello,
    I am trying to figure out a good, generic method for making a previously synchronous web service asynchronous and changing the way in which it is invoked from BPEL. I am using SOA Suite 10g (10.1.3.5)
    As I understand, one possible method to achieve this is to use IDeliveryService.post() to deliver the web service's response to the BPEL process. For this route, the standard practice of correlation seems to be to supply a correlation Id when invoking the web service and returning the same correlation id as a part of the web service's response message. However, I want to avoid this since it would mean that all response messages from the web service (10+) would have to be modified to include a correlationId, which is problematic in the special case of this web service. Including a correlationId in the request message is possible, however.
    I have tried the approach of using the conversation Id directly instead of the correlation Id, by reading the value of ora:getConversationId(), passing this to the web service and setting the property CONVERSATION_ID of the response NormalizedMessage to the same value when returning. However, I cannot seem to get this approach right. Is this possible at all?
    An alternative might be to use WS-Addressing, but I do not know if I can make the web service support this - it is written using the EJB WebService-Annotations feature and runs on OC4J as well.
    Do you have any suggestions on how this problem could be resolved?
    Edited by: 901765 on 12.12.2011 06:01

    I have found the following tutorial that implements something similiar to what I am trying to do: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/10g/10135/odiscenario_bpelcallback/odiscenario_bpelcallback.htm#t3
    Because of this, I am now confident that the conversation IDs can be used to achieve correlation. I have implemented the pattern by performing
    an invoke activity on the web service, passing the result of ora:getConversationId() as part of the message. The conversation Id returned is of UUID-Form.
    After the invoke activity, I have added a pick activity to receive the response message supplied by the web service through IDeliveryService.post(...). I can see that the message is received correctly by loooking at the contents of DLV_MESSAGE. However, the pick activity times out every time (after 10m). Looking at DLV_SUBSCRIPTION reveals that the conversation_id for the pick/receive activity is set to a value of the form bpel://localhost/default/MyBpelProcessName~1.0/7610001-BpInv0-BpSeq2.7-2. As far as I know, this should instead be set to the UUID that ora:getConversationId() returned before performing the invoke activity. What is going wrong here?
    Thanks for your help!

  • Error invoking a web service within another web service

    Hi all!
    I have to develop a web service which needs to invoke another web service, thus the first web service is acting as a client of the second one. To get this, the first web service uses the proxy provided by the home page of the second one. However, when the first service invokes the second service, the body within the soap message is modified in such a way that it is not valid for the second service, because some namespaces declarations are added, in spite of the fact that they already exist. Then, I find the following:
    Body of the SOAP request created by the first web service:
    <a:request attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body>Hello</b:body>
    </a:request>
    Body of the SOAP request received by the second web service:
    <a:request xmlns:a="urn:namespace:one"
    attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body xmlns:b="urn:namespace:two">Hello</b:body>
    </a:request>
    I have also tried to run a client using this proxy outside the web service, and everything is ok. So, from my point of view, the problem is when running the proxy inside a web service. I wonder if I have to do something special with this proxy in order to use it within a web service.
    Has anybody run into this situation?
    Could anybody be so kind as to tell me how to solve it or if, on the contrary, it is an oc4j bug, please?
    Thank you very much in advance.
    Inma.

    Hi,
    Thanx it is working now.
    BTW can you give me some urls with info of this kind of setting which i need to do for other kind of integarions in J2EE platform.Sorry if i am asking too much as i am a starter in this technology.

  • Invoking a web service from a java code

    Hello
    I created a simple Web service using JDevlper. It contains two methods
    1) getInf int () {
    return inf;}
    2) void setInf (int a) {
    inf = a;}
    I have deployed it on Oracle Application server. By inserting the address in a browser, I tried both methods and it works correctly.
    Here I am looking how to invoke this web service using a java client and use the method setInf (5 ) / * for example * /.
    I search but I have not found an answer that works :(. I hope you could help me to solve this problem.
    Thank you in advance

    Because you weren't told what to get, perhaps you already have it eh?
    What you want to read up about is JAX-WS, which is the webservice API bundled by default with your JDK (Java 6 and up). You'll find the wsimport tool in the bin directory of your JDK. I recommend you explore that directory and read up about all the executables you can find there, to be more prepared in the future. Know the tools you work with and all that. Most tools have a manual on this website:
    http://www.oracle.com/technetwork/java/javase/tech/index.html
    (under tools and utilities). Not wsimport, that is part of the jax-ws documentation. Better you look for jax-ws tutorials using Google, it will be quicker.

  • Problem constructing a web service request wich does not include namespace

    Hi!
    I'm evaluating Flex 3 for a web development.
    I'm having problems with a web service invocation.
    This is the soap request made with Soap UI:
    <soapenv:Envelope xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:open="
    http://www.openuri.org/">
    <soapenv:Header/>
    <soapenv:Body>
    <open:querySoftware>
    <open:imei></open:imei>
    <open:groupId></open:groupId>
    </open:querySoftware>
    </soapenv:Body>
    </soapenv:Envelope
    <mx:WebService id="giService" wsdl="
    http://..." result="onResult(event)">
    <mx:operation name="querySoftware">
    <imei>1<imei>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    When invoking operation I get this error:
    [RPC Fault faultString="HTTP request error"
    faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent
    type="ioError" bubbles=false cancelable=false eventPhase=2
    text="Error #2032: Error de secuencia. URL: ]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:216
    at
    mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
    at
    mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
    at
    DirectHTTPMessageResponder/errorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\mes saging\channels\DirectHTTPChannel.as:343]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/redirectEvent()
    I see that Flex is making the request like the following
    wichi is not correct according to Soap UI request:
    <querySoftware>
    <imei></imei>
    <groupId></groupId>
    <querySoftware>
    How could I construct the request to include the open:
    namespace?
    Thanks a lot.

    I actually worked through this problem yesterday. This thread
    should help you:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1377262&enterthread=y

  • Invoking a web-service through Aqualogic BPM

    I have seen some posts regarding integration of web-services with BPM but could not solve my problem (as I am very new to BPM, just 2 days old :) ).
    I am trying to integrate with the weather web-service whose WSDL is available at http://wsrp.bea.com/portal/boulder/weather.wsdl
    This is what I did
    1. Created a module in the Catalog
    2. Right-clicked on the created module, Catalogue Component -> Web Service and provided the WSDL
    3. Introspection was done and the External Resoures folder was also populated automatically.
    4. I then created a global activity for invoking this web-service.
    But the problem that I am facing is that what method should I write for the global activity that I have created so that the web-service can be invoked.
    Please reply
    Thanks.

    You just need to call the Web service exposed method from the global activity.
    if your module name is WS. The name of the webservice you catalogued is Weather. The service name which you can see when you expand the Weather. Then you will be able to view the exposed method.
    WS.Weather.WeatherService.getWeather
    Regards
    Right Chord

  • Invoking Asynchronous Web Service from BPEL Process

    Hi,
    I have been working on the BPEL Process Manager for some time and now facing problem in invoking asynchronous web service from a BPEL Process. I have implemented a web service in Java using Axis but wasn't able to invoke it.
    I have gone through all the meterial available on this site but couldn't get any great help.
    Can some one help me in resolving this issue. A pointer to any example or sample material/tutorial will be appreciated.
    thanks
    Farooq

    I do the same thing.
    Take wsdl from axis and save it somewhere.
    Then you can create a standard project in Oracle BPEL PM. Create partnerlink, give a name and click on first icon to take your wsdl. It will add some needed code, you answer always yes. Then you can create receive, assign, invoke, assign and callback or similar and deploy it.
    Try it through BPEL Console...
    Ema

  • Invoking a Web Service from a mobile application

    Hi all,
    I have installed Sun Wireless Toolkit 2.5.2 for CDLC and MTJ.
    I want to invoke a web service from an MTJ Application and I have not a clue of how to start.
    First let me say I am working with RSA (which is over Eclipse)
    My first attempt was creating the web service client and then try to convert it into a mobile application (through the use of MTJ --> Convert to Midlet Project)
    I found 4 errors when doing so:
    First was solved changing the jre to 1.6.
    I am still dealing with the following three:
    * Error preverifying class mipaquete.MiServicioService
    java/lang/NoClassDefFoundError: javax/xml/ws/Service
    * Error preverifying class mipaquete.ObjectFactory
    VERIFIER ERROR mipaquete/ObjectFactory.createMiOperacion(Lmipaquete/MiOperacion;)Ljavax/xml/bind/JAXBElement;:
    Illegal type in constant pool
    * Type mipaquete.MiServicioPortProxy$Descriptor Error preverifying class mipaquete.MiServicioPortProxy$Descriptor
    VERIFIER ERROR mipaquete/MiServicioPortProxy$Descriptor.getDispatch()Ljavax/xml/ws/Dispatch;:
    Illegal type in constant pool
    I only started to solve the first one. I assumed that I have to add the right .jar to manifest file (please let me know if I am wrong). I tried to do by adding the textual classpath rt.jar, however I am not able to give it the right path:
    C:\Archivos de programa\IBM\SDP\runtimes\base_v7_stub\java\jre\lib\rt.jar (even though I split the too long sentence into two and I include an space at the beginning of the second, I still get an error when saving)
    I would appreciate any help
    A) to solve the existing problems
    or
    B) To create a web service client in an EclipseME application through any other method.
    Thank-you very much in advance,
    Guadalupe
    PS Any clue is welcomed!!

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • How to invoke a web service asynchronously using ws-addressing model?

    Hi Gurus,
    We are invoking an external web service asynchronously using Oracle Work Flow Business events using the following mechanism -
    1)Created a web service invoker event to invoke the web service.
    2)Created a subscription that invokes the web service (provided the wsdl address, operation info).
    3)Defined a subscription parameter WFBES_CALLBACK_EVENT with value pointing to a recieve event.
    4)Created a receive event(parameter value for WFBES_CALLBACK_EVENT) and a subscription that directs the response to a custom PL/SQL function to process response.
    so far so good. We were able to invoke the web service and get and process the response.
    Problem: The external web service can take upto 10 hrs to process the request. A time out of 2 hrs is set on the server hosting the external web service. So when the external web service takes more than 2 hrs to process the request and it times out and we get the following error on EBS side -
    'l_error_message:oracle.apps.fnd.wf.bes.InvokerException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html; charset=iso-8859-1'
    Now the external web service providers are suggesting that we are not calling their web service asynchronously and we should use ws-addressing model to do so.
    Is there a way to invoke this web service using ws-addressing model using business events or from PL/SQL or OA middle-tier?
    Regards,
    Sunil
    CMRO Development.
    I am providing here the WSDL of the external web service -
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://service.sdk.webservices.enigma.com" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax21="http://service.sdk.webservices.enigma.com/xsd" xmlns:ns="http://service.sdk.webservices.enigma.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com/xsd" xmlns:ax22="http://service.sdk.webservices.enigma.com">
    <xs:import namespace="http://service.sdk.webservices.enigma.com"/>
    <xs:complexType name="JCGWebServicesException">
    <xs:complexContent>
    <xs:extension base="ax22:Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="JCGServiceReply">
    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="pdfStatus" nillable="true" type="ax21:PdfStatus"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PdfStatus">
    <xs:sequence>
    <xs:element minOccurs="0" name="jobCardID" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="pdfPath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com" xmlns:ax23="http://service.sdk.webservices.enigma.com/xsd">
    <xs:import namespace="http://service.sdk.webservices.enigma.com/xsd"/>
    <xs:complexType name="Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="JCGWebServicesException">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="JCGWebServicesException" nillable="true" type="ax21:JCGWebServicesException"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCard">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="a_WorkpackageFilePath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="a_userName" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCardResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="ax21:JCGServiceReply"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="JCGWebServicesException">
    <wsdl:part name="parameters" element="ns:JCGWebServicesException">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardResponse">
    <wsdl:part name="parameters" element="ns:runJobCardResponse">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardRequest">
    <wsdl:part name="parameters" element="ns:runJobCard">
    </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="JCGServicePortType">
    <wsdl:operation name="runJobCard">
    <wsdl:input message="ns:runJobCardRequest" wsaw:Action="urn:runJobCard">
    </wsdl:input>
    <wsdl:output message="ns:runJobCardResponse" wsaw:Action="urn:runJobCardResponse">
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException" message="ns:JCGWebServicesException" wsaw:Action="urn:runJobCardJCGWebServicesException">
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="JCGServiceSoap11Binding" type="ns:JCGServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="JCGServiceSoap12Binding" type="ns:JCGServicePortType">
    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap12:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap12:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap12:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="JCGService">
    <wsdl:port name="JCGServiceHttpSoap12Endpoint" binding="ns:JCGServiceSoap12Binding">
    <soap12:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    <wsdl:port name="JCGServiceHttpSoap11Endpoint" binding="ns:JCGServiceSoap11Binding">
    <soap:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: sikumar on Jun 22, 2010 1:50 PM

    Bharat,
    You dont need a Business Event setup to invoke a BPEL process from PL/SQL unless you have a special case and you need to process the response from the BPEL process in a separate thread (or in background)..
    For a straight call to BPEL process from PL/SQL, here is a sample script -
    function "MYTEST0" return varchar2 AS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    helpStr varchar2(30000);
    BEGIN
    soap_request:= '<?xml version = ''1.0'' encoding = ''UTF-8''?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="
    http://xmlns.oracle.com/TestWS">
    <env:Body>
    <ns0:TestWSProcessRequest>
    <ns0:input>abc</ns0:input>
    </ns0:TestWSProcessRequest>
    </env:Body>
    </env:Envelope>
    /* the BPEL process name is TestWS */
    http_req:= utl_http.begin_request
    ( 'http://hostname:7777/orabpel/default/TestWS/1.0'
    , 'POST'
    , 'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', 'process');
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    utl_http.read_text(http_resp, soap_respond);
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond);
    resp:= resp.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    helpStr := '';
    i:=0;
    loop
    helpStr := helpStr || substr(soap_respond,1+ i*255,250);
    i:= i+1;
    if i*250> length(soap_respond)
    then
    exit;
    end if;
    end loop;
    return helpStr;
    END;

Maybe you are looking for

  • Protect Password In Runtime of Forms 6i

    Hi, We have a requirement where in which we wouldnt want to give the userid and password in Runtime shortcut. Our customers feel that its a compromise to the security. We are trying to start the runtime by a bat file i.e start ifrun60.exe module=a.fm

  • Optimize the query as it takes long time

    hi dear please help to optimize thi sql and take more than 45minits to return out put. This has to be optimize at lease 3-4 mints. SELECT DISTINCT(ce.event_source) AS mobile_no FROM CUSTEVENTSOURCE ce,CUSTHASPACKAGE cp WHERE (cp.package_id =119 AND c

  • 30EA1: PLS-00172 when compiling package body

    Hi there, I'm having a strange bug when compiling a package body in SQL Developer 3.0 EA1, while the same package body compiles well in production version (2.1). The error code returned is Error: ORA-06550: line 1, column 64: PLS-00172: string litera

  • Table for MRP results

    Dear all, Is there any table in which the results of MRP run are stored? I want to pick up some of the data for a report. Thank you, Shrenik

  • 64 bit chaos!

    Can someone out there direct me to a link where I can see exactly which toolkits are offered in 64 bit format? It seems like some toolkits are in 64 bit (Vision, Advanced Signal Processing)... but others are not. Specifically, I am wondering about: -