[b]Help in calling web services method[/b]

i doing at client side now. iwish to call the method which provide by axis.
here is my code....
import hotel.*;
//normal servlet package import
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import java.text.*;
import java.net.*;
import java.util.Date;
public class GetWs extends HttpServlet
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
          WsSoapBindingStub binding;
          int i     =     1;
          binding =     (WsSoapBindingStub) new WsServiceLocator().checkID();
          String test = "";
          test = binding.checkID(i);
          PrintWriter out=response.getWriter();
          out.println("hihi"+binding);
          out.close();
     public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
          doGet(request, response);
i face the cant find checkID() method in line:
binding =     (WsSoapBindingStub) new WsServiceLocator().checkID();
thanks and hope will get help soon.

Hi,
I think you have not imported all the classes required for Axis Client as Service and Call. Please specify in details you problem.. I think its an issue regarding classpath..anyways mail me more info on [email protected].. please specify ur name in subject line..
Happy coding

Similar Messages

  • TimeoutException - when calling web services method that opens a PDF

    I am updating a legacy program which uses Adobe Acrobat 7.0 Professional.  The idea is that the client will call web service methods, which handle opening a PDF, reading from or writing to the PDF, saving if necessary, and closing.  It then returns the data (if reading) to the client.
    The only issue with this that I'm having is that the client will pause for about 60 seconds, and throw a TimeoutException.
    I know that the method on the web services end is working, because I wrote a quick driver which calls the very same method, but it executes normally, and works perfectly.
    My question is basically, is there anything that would cause the client to hang/freeze when calling the web services method to do this task? Everything is running on my workstation, and I've debugged to see that the filename being passed is the same in both tests.
    Thanks!

    Thank you, I somehow missed seeing that subforum. I reposted it in that forum instead. This thread can be deleted/closed. Thanks!

  • Calling Web Service Methods in  Web Dynpro

    1. Created a Bean with get & set methods..Created a portal Service around it
    2. Created a Web Service and checked the same using EP Web Checker
    3. Created a Web Dynpro app having two screens (First one for setting String value and second  for getting string value)
    4. Configured the Web Service in the model...I can see the Request and Response in the Context...Mapped the request to first view and Response to Second View
    How do I call the Web Service method to Set the Paramter and how do I extract the value from the response?
    Rgds

    Hello Gulshan,
    Did you check this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing an email web service - 6_0_.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing the car rental web service - 7.htm
    Best regards, Maksim Rashchynski.

  • Serialization error when calling web service method

    Hi,
    In JDeveloper 10.1.3.1, I'm working on an EJB that will be deployed as a web service. There is a method in the EJB that is defined to return a generic Object, but in the implementation, it really returns one of several possible specialized bean objects. I can deploy the EJB successfully to IAS 10.1.3.1.
    I created a web service proxy from the wsdl that was generated from deploying the EJB. Using the proxy, I try to call the EJB method and cast the method's return value to the bean object I know should be returned. However, I get an error like this:
    java.rmi.ServerException:
    start fault message:
    Internal Server Error (serialization error: no serializer is registered for (class com.test.TestBean, null))
    :end fault message
    Does anyone know how this serialization error can be resolved? If I change the web service method signature to return the bean object that is actually being returned (instead of Object), then it works fine. But I want to be able to define the method to return a generic Object because I plan to make the method flexible enough to return several different types of bean objects. Whenever the client calls the method, it will know what is the actual object being returned and I had planned to cast the return value to its actual class.
    Thanks for any ideas.

    Well, I think so... I've followed all the steps, and my merged WSDL file seems like the one in page 12...
    Any suggestion, please?
    Thank you,

  • Cannot call web service methods -  ClassCastException

    Hello,
    my WD application is consuming an adaptive web service.
    In the wdDoInit() of my custom controller I call the method "Request_GetProject"...
    This has worked fine until I modified my web service and reimported it into my wd project. (I am using to different DCs, one for the model and one for the rest of the project).
    Now, if I try to deploy the application I get following error:
       java.lang.ClassCastException
        at com.pr.ods.ws.Response_GetProject.geGetProjectResponse(Response_GetProject.java:60)
        at com.pr.ods.wdp.IPublicODSCustom$IRP_GetProjectResponseNode.doSupplyElements(IPublicODSCustom.java:29211)
        at com.sap.tc.webdynpro.progmodel.context.Node.supplyElements(Node.java:406)
        at com.sap.tc.webdynpro.progmodel.context.Node.getElementList(Node.java:345)
        at com.sap.tc.webdynpro.progmodel.context.Node.getChildNodeInternal(Node.java:1178)
        ... 52 more
    Do you have any idea why this error occurs?
    Edited by: RoM_12 on Mar 26, 2010 12:29 PM

    Hi Friend,
    I think you are refering to a wrong structure/table name when the exception is thrown. Same structure/table names can exist for more than one model. Please just bring the cursor of the structures to view the exact fully qualified name for the structure on hover.
    Regards,
    Tushar S

  • Calling web service method.Stuck in while loop

    I am implementing a board game using asp.net web service. Players connect to this web service and play.
    Once player click on a cell in board it should be written to web service and other players board repaint according to that click.Writtting to web and reading is working, but the switch player method in below do not work.It stuck in the while loop.Even other player has played this player do not identify he has played it wait in the loop.
    private void switchPlayer(String player){
            try { // This code block invokes the ServiceSoap:switchPlayer operation on web service
                webservice.Service service = new web.Service_Impl();
                webservice.ServiceSoap serviceSoap = service.getServiceSoap();
                while(serviceSoap.switchPlayer(player)!="aPlayer"){
                   System.out.println("It's oppenents turn");//Stuck here
                    //remote player already exists?
              //   readLabel();
                System.out.println("It's my turn");//don't come here even player b played
                       }  catch(Exception ex) {
                // TODO handle custom exceptions here
              }

    Does some one knows url of similar type game
    designing.I would suggest that you get your basics right before going into that stuff.

  • Calling a asynchronous web service method

    I am designing a game using web services(asp.net)
    one player write to array and waite till other modify that
    array.Assume i am player 1 and wait till player 2 modify array
    in web service.Writing to array part is working.But reading part
    is not working .I implement asynchronous call to web service
    call reLabelAsync and pass argument 1.That means i am player 2
    modify the array and return to my program onces other player(player 1)
    modify the array.And modify my program according his updates.
    private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {                                    
    jLabel1.setText("O");//this my player
    // jProgressBar1.setIndeterminate(true);
    writeArra(2,1);//this is working
    reLabelAsync(1);
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    public void reLabelAsync(int player){
    // Call Web Service Operation(async. callback)
    as.Service service = new as.Service();
    as.ServiceSoap port = service.getServiceSoap();
    // TODO initialize WS operation arguments here
    javax.xml.ws.AsyncHandler<as.ReLabelResponse> asyncHandler = new javax.xml.ws.AsyncHandler<as.ReLabelResponse>() {
    public void handleResponse(javax.xml.ws.Response<as.ReLabelResponse> response) {
    // java.awt.EventQueue.invokeLater(new Runnable() {
    // public void run() {
    String s;
    try {
    // TODO process asynchronous response here
    s = response.get().reLabelResult();
    s=removeTags(s);//this to remove tags.working
    System.out.println(s);
    if (s=="1"){
    jLabel1.setText("X");//update my program
    else{
    jLabel2.setText("X");//update my program
    } catch(Exception ex) {
    // TODO handle exception
    jProgressBar1.setIndeterminate(false);
    can some one please help me. I try to call asynchronous method in loop.
    I think it's the way to do this. But it didn't work.Thanks..

    Looking a bit at your history here... this is the fourth go around at least for dancing around this question.
    To summarise the advice given to you previously "Please stop blathering on about asynchonous blah blah and start by sending and recieving a message correctly"
    You really seem way over your head here. An empty catch block is a bad bad bad sign. You can run before you can walk and right now you're having problems crawling.

  • URGENT: Getting app module service method result and calling web service??

    We have a .jar from another vendor that allows us to interact with an FOP rendering process. This .jar has methods that allow us to pass several parameters which results in the creation of the PDF which is stored in the database.
    We need to create the XML, which we've done, via view objects and a method in our application module. The developers at this point, have placed the code to call the service method into the model code that generates the XML. The actual .jar file for this is in the viewcontroller area.
    Is this a "reasonable" approach? ( that is, importing view object jar in model)
    The web service needs to have several parameters sent to it, most of which are configured in the web.xml. They are now being passed via a data action to the model's service method.
    Shouldn't the data action be written more like the following - note: some questions in here as well...
    public void onShowPdf( DataActionContext ctx )
    // note, you can get here from 5 different places in the application and we need to be able to retrieve the bindings from these separate places for proper generation... how??
    AppModule am = (AppModule) getAm();
    String strXML = am.getXML(...);
    // get web.xml values from session context...
    PDFArchiver stub = new PDFArchiver();
    stub.generate( send prms here );
    // the next page just needs to have 3 of the parameters exposed from this page to yield the results of the generated pdf (retrieve from db)
    // what would be the best way to get the parameters over there?
    } // onShowPDF
    after this data action, it simply forwards to the next page, which has a frame to display the pdf with an [ok] button at the bottom. The pdf is rendered via a Servlet.
    one last question...
    Right now, the service method was dropped on the data action, and it is automatically invoked ( we've bound the 8 parameters to it by over-riding initializeMethodParameters). If we were to switch it so the method RETURNED the XML, how would we get the results back while INSIDE A DATA ACTION? I could see if we called it by invoking a service method from the app module instance, but how do you do it in the lifecycle of the data action??
    Whew, that's all the questions for now.
    Any help, again, would be GREATLY appreciated.

    Most of the items in this previous post have been addressed. The one problem that remains is that we use a servlet to display the PDF. The servlet reads 3 parameters from the URL to send to a service method that reads and streams the PDF to the browser.
    HOWEVER, the user can view source and then paste parameters into the URL and view whatever he wants. So:
    1. How can we prevent the servlet parameters from being seen inside the source? OR, how can we simply prevent the user from invoking the view pdf servlet with other parameters?
    2. We've temporarily, written a data action (displayPDF) which has no service method. In the findForward data action, we grab the bindings that the servlet needs from other pages (4 different binding containers), then invoke the service method and write the data to the response object. This seems to work. So, our page has an iframe with the src="displayPDF.do".
    Again, should this be done another way? Seems strange to have a data action that "acts like a servlet"...
    Thanks for feedback.

  • Calling Oracle Report InSide Web Service Method

    Is there way to call oracle reports inside one of my web service method.
    If yes kindly let me know how we can do this and some documents related to this.
    Thanks
    Robert

    Oracle reports does have a Web API when reports are run from the application server. As a result one way to do what you are asking is to write a Web service that use java.net.URL to invoke the Reports Service Web interface:
    http://otn.oracle.com/products/reports/htdocs/getstart/docs/A92102_01/pbr_run.htm#1005598
    As I understand it, this interface itself is actually being exposed as a Web service in a future release of Oracle9iAS Reports ... I don't know if this is a Oracle9iAS Reports 9.0.4 feature or beyond that. You might try asking on the Reports forum:
    Reports
    Mike.

  • Help using a web service.

    Ok to Start off I havent used java for a while now, but was asked to create a small program that can enter and pull items from a database and send them to a web service. Trouble is I am not familiar with this type of operation. I cant seem to find a good tutorial out there that has helped me so here I go. My WSDL is http://wservicecrt.cerner.com/SRWeb/...SR_INVOKE.wsdl and I will need to take information gathered by the database portion of my program and send it to this web service. There is a class called ProSr that will contain all of the information I need to send to the service.
    here is the code i use to call the service.
    System.out.println("create");
            try { // Call Web Service Operation
                desktopapplication1.INVOKEINVOKEHttpService service = new desktopapplication1.INVOKEINVOKEHttpService();
                desktopapplication1.INVOKE port = service.getINVOKEINVOKEHttpPort();
                // TODO initialize WS operation arguments here
                desktopapplication1.SR serviceRequest = new desktopapplication1.SR();
                javax.xml.ws.Holder<java.lang.String> serviceRequestNumber = new javax.xml.ws.Holder<java.lang.String>();
                javax.xml.ws.Holder<java.lang.String> serviceRequestId = new javax.xml.ws.Holder<java.lang.String>();
                javax.xml.ws.Holder<java.lang.String> serviceRequestIntegrationId = new javax.xml.ws.Holder<java.lang.String>();
                serviceRequest.setSummary("Testing SR Creation");
                serviceRequest.setStatus("Open");
                serviceRequest.setClientMnemonic("UNIV_MO");
                serviceRequest.setSeverity("3: Moderate Impact");
                serviceRequest.setContactLoginId("SW019489");
                serviceRequest.setSource("Proactive Intervention");
                serviceRequest.setSubstatus("Unassigned");
                serviceRequest.setOwner("SW019489");
                serviceRequestNumber.value = "";
                serviceRequestId.value = "";
                serviceRequestIntegrationId.value = "";
                ups.setServiceRequest(serviceRequest);
                port.upsert(serviceRequest, serviceRequestNumber, serviceRequestId, serviceRequestIntegrationId);
            } catch (Exception ex) {
                // TODO handle custom exceptions here
        }code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Here is the error code i'm receiving
    com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect
            at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121)
            at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142)
            at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
            at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
            at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
            at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
            at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
            at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
            at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
            at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
            at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
            at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
            at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
            at $Proxy32.upsert(Unknown Source)
            at desktopapplication1.DesktopApplication1View.Create(DesktopApplication1View.java:772)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
            at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.net.ConnectException: Connection refused: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:525)
            at java.net.Socket.connect(Socket.java:475)
            at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
            at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
            at sun.net.www.http.HttpClient.New(HttpClient.java:306)
            at sun.net.www.http.HttpClient.New(HttpClient.java:323)
            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:839)
            at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
            at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:904)
            at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:109)
            ... 46 moreand here is my WSDL file
    <?xml version="1.0" encoding="UTF-8" ?>
    - <wsdl:definitions name="INVOKE_INVOKEHttp_Service" targetNamespace="http://SR_LIB/INVOKE/Binding" xmlns:Port_0="http://SR_LIB/INVOKE" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:this="http://SR_LIB/INVOKE/Binding" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:import location="INVOKE.wsdl" namespace="http://SR_LIB/INVOKE" />
    - <wsdl:binding name="INVOKE_INVOKEHttpBinding" type="Port_0:INVOKE">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="UPSERT">
      <soap:operation soapAction="" />
    - <wsdl:input name="UPSERTRequest">
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output name="UPSERTResponse">
      <soap:body use="literal" />
      </wsdl:output>
    - <wsdl:fault name="Fault">
      <soap:fault name="Fault" use="literal" />
      </wsdl:fault>
      </wsdl:operation>
    - <wsdl:operation name="Query">
      <soap:operation soapAction="" />
    - <wsdl:input name="QueryRequest">
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output name="QueryResponse">
      <soap:body use="literal" />
      </wsdl:output>
    - <wsdl:fault name="Fault">
      <soap:fault name="Fault" use="literal" />
      </wsdl:fault>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="INVOKE_INVOKEHttpService">
    - <wsdl:port binding="this:INVOKE_INVOKEHttpBinding" name="INVOKE_INVOKEHttpPort">
      <soap:address location="http://wservicecrt.cerner.com:9080/SRWeb/sca/INVOKE" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>Can anyone help me out or give me some advice?

  • Access denied Error while calling Web Service form Infopath Form 2010.

    Hi Dear All,
    I have been facing an error while calling an GetUserProfileByName() web service method from InfoPath 2010 from.
    i have FBA(Forms Base Authentication )configured . After Infopath form published to site collection when i select an user from people picker control i want to get Email Id of Selected user for that i am calling getUserProfileByName() Web Method, but 
    i am getting Access denied error code 500.
    Any Help would be more than welcome.
    Thanks.

    Hi,
    Greetings. Please check 
    Check the IE settings. Click Internet Options> Security>Custom level. Make sure that the ‘Access data source across domains’ is enabled. Make sure that you have permission to the web service and to the content which the web service tries to modify.
    For more information, please refer to this site:
    "Access is denied." error in Infopath 2007 form + ASMX: http://us.generation-nt.com/answer/access-denied-error-infopath-2007-form-plus-asmx-help-65808252.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Using utl_dbws to call web service

    We're calling a web service using utl_dbws and getting a response but the problem is the parameters. I haven't been able to find much documentation about how to use the utl_dbws package and have only one example to work from so could do with some expert help.
    The following code calls the webservice:
    procedure call_web_service(p_application_key in number,
    out_success_message out varchar2)
    is
    v_service utl_dbws.service;
    v_call utl_dbws.call;
    v_service_qname utl_dbws.qname;
    v_port_qname utl_dbws.qname;
    v_operation_qname utl_dbws.qname;
    v_string_type_qname utl_dbws.qname;
    v_return anydata;
    v_send_data anydata;
    v_return_string varchar2 (100);
    v_return_length number;
    v_parameter_string varchar2(32767);
    v_params utl_dbws.anydata_list;
    v_interview_xml xmltype;
    v_policy_number varchar2(14);
    -- return parameters
    v_interviewId varchar2(1000);
    v_statusType varchar2(1000);
    v_error_reason varchar2(1000);
    begin
    message_handler.set_module_name('ostp_to_xpb.call_web_service');
    message_handler.set_current_process('retrieve generated xml');
    begin
         select upload_xml, extractvalue(upload_xml, '/interview/externalReferenceNumber') policy_number
         into v_interview_xml, v_policy_number
              from xpb_upload_data
         where application_key = p_application_key
              and extractvalue(upload_xml, '/interview/externalReferenceNumber') is not null;
    --dbms_output.put_line('xml retrieved');
         exception
         when no_data_found then     
              v_success_message := 'No xml found for application_key = '||p_application_key;
              raise v_procedure_error;
         end;
         message_handler.set_current_process('call web service');
    -- create service
    v_service_qname := utl_dbws.to_qname (null, 'xpertBridge');
    v_service := utl_dbws.create_service (v_service_qname);
    -- create call
    v_port_qname := utl_dbws.to_qname (null, 'xpertBridgePort');
    v_operation_qname :=
    utl_dbws.to_qname
    ('http://m0154ukdox1/xpertBridgeEDSLV/services/xpertBridge',
    'orcaAppUpload'
    v_call := utl_dbws.create_call (v_service, v_port_qname, v_operation_qname);
    -- set endpoint
    utl_dbws.set_target_endpoint_address
    (v_call,
    'http://m0154ukdox1/xpertBridgeEDSLV/services/xpertBridge'
    -- set type of input and output parameters
    v_string_type_qname :=
    utl_dbws.to_qname ('http://www.w3.org/2001/XMLSchema', 'string');
    utl_dbws.add_parameter (v_call,
    'orcaXml',
    v_string_type_qname,
    'ParameterMode.IN'
    utl_dbws.add_parameter (v_call,
    'interviewId',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.add_parameter (v_call,
    'status',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.add_parameter (v_call,
    'errorReason',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.set_return_type (v_call, v_string_type_qname);
    -- convert xmltype to string for call
    select xmlserialize(document v_interview_xml)
    into v_parameter_string
    from dual;
    v_params (1) := anydata.convertvarchar(v_parameter_string);
    -- call
    v_return := utl_dbws.invoke (v_call, v_params);
    -- values which can be returned are Success / MessageError / ApplicationError
    v_return_string := v_return.accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_return_string, 'No success message returned'));
    -- retrieve out parameters
    v_interviewId := v_params(2).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_interviewId, 'No interviewId returned'));
    v_statusType := v_params(3).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_statusType, 'No status type returned'));
    v_error_reason := v_params(4).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_error_reason, 'No error reason returned'));
    -- release call
    utl_dbws.release_call ( v_call );
    -- release services
    utl_dbws.release_service ( v_service );
    message_handler.set_module_finish;
    exception
    when others then
    out_success_message := message_handler.formatted_error_message;
    end call_web_service;
    Here is an excerpt from the WSDL relating to the call being made:
         <xs:element name="orcaAppUpload">
                        <xs:annotation>
                             <xs:documentation xml:lang="en">Message payload XML</xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="orcaXml" type="xs:string"/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
                   <xs:element name="orcaAppUploadResponse">
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="interviewId" type="xs:string">
                                       <xs:annotation>
                                            <xs:documentation xml:lang="en">Interview identifier used to access the interview from UI</xs:documentation>
                                       </xs:annotation>
                                  </xs:element>
                                  <xs:element name="status" type="tns:StatusType"/>
                                  <xs:element name="errorReason" type="xs:string" minOccurs="0">
                                       <xs:annotation>
                                            <xs:documentation xml:lang="en">Only included if an error has occured </xs:documentation>
                                       </xs:annotation>
                                  </xs:element>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
                   <xs:simpleType name="StatusType">
                        <xs:restriction base="xs:string">
                             <xs:enumeration value="Success"/>
                             <xs:enumeration value="MessageError">
                                  <xs:annotation>
                                       <xs:documentation xml:lang="en">MessageError arises if the request payload was
    rejected by xpertBridge. This might be because it does not validate against the
    expected schema. Alternatively, a business rule is not satisfied.</xs:documentation>
                                  </xs:annotation>
                             </xs:enumeration>
                             <xs:enumeration value="ApplicationError">
                                  <xs:annotation>
                                       <xs:documentation xml:lang="en">ApplicationError would indicate application or system
    error or exception occured in xpertBridge while processing the request.</xs:documentation>
                                  </xs:annotation>
                             </xs:enumeration>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:schema>
         <wsdl:message name="orcaAppUploadReq">
              <wsdl:part name="orcaAppUpload" element="tns:orcaAppUpload"/>
         </wsdl:message>
         <wsdl:message name="orcaAppUploadResp">
              <wsdl:part name="orcaAppUploadResponse" element="tns:orcaAppUploadResponse"/>
         </wsdl:message>
         <wsdl:portType name="xpertBridgePort">
              <wsdl:operation name="orcaAppUpload">
                   <wsdl:documentation>Upload (typically paper) application from ORCA/Ingenium</wsdl:documentation>
                   <wsdl:input message="tns:orcaAppUploadReq"/>
                   <wsdl:output message="tns:orcaAppUploadResp"/>
              </wsdl:operation>
         </wsdl:portType>
    etc.
    The error being returned is the following:
    ostp_to_xpb.call_web_service.call web service.ORA-29532: Java call terminated by uncaught Java exception: unexpected element name: expected=interviewId, actual=status
    Initially I started the params at params(0) but when I received the response above I thought it might solve the problem by starting at 1 - try anything :-) but still had the same response.
    I'm now out of ideas!

    UTL_DBWS is not part of XDB, XDB is more about being the web service, rather than calling a web service. Here's an example of using UTL_HTTP to test a XML DB Database Native Web Service which may help
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 17 08:23:14 2009
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    SQL> spool password.log
    SQL> --
    SQL> connect sys/oracle as sysdba
    Connected.
    SQL> --
    SQL> def USERNAME=DBNWS
    SQL> --
    SQL> def PASSWORD=DBNWS
    SQL> --
    SQL> def HOSTNAME=&1
    SQL> --
    SQL> DROP USER &USERNAME CASCADE
      2  /
    old   1: DROP USER &USERNAME CASCADE
    new   1: DROP USER DBNWS CASCADE
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to DBNWS identified by DBNWS
    Grant succeeded.
    SQL> begin
      2    dbms_network_acl_admin.drop_acl('localhost.xml');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for &HOSTNAME', '&USERNAME', true, 'connect');
      3    dbms_network_acl_admin.assign_acl('localhost.xml', '&HOSTNAME');
      4  end;
      5  /
    old   2:   dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for &HOSTNAME', '&USERNAME', true, 'connect');
    new   2:   dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for localhost', 'DBNWS', true, 'connect');
    old   3:   dbms_network_acl_admin.assign_acl('localhost.xml', '&HOSTNAME');
    new   3:   dbms_network_acl_admin.assign_acl('localhost.xml', 'localhost');
    PL/SQL procedure successfully completed.
    SQL> COMMIT
      2  /
    Commit complete.
    SQL> GRANT XDB_WEBSERVICES TO &USERNAME
      2  /
    old   1: GRANT XDB_WEBSERVICES TO &USERNAME
    new   1: GRANT XDB_WEBSERVICES TO DBNWS
    Grant succeeded.
    SQL> GRANT XDB_WEBSERVICES_OVER_HTTP TO &USERNAME
      2  /
    old   1: GRANT XDB_WEBSERVICES_OVER_HTTP TO &USERNAME
    new   1: GRANT XDB_WEBSERVICES_OVER_HTTP TO DBNWS
    Grant succeeded.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> create or replace function GET_SQRT (INPUT_VALUE number) return number
      2  as
      3  begin
      4    return SQRT(2);
      5  end;
      6  /
    Function created.
    SQL> select GET_SQRT(2)
      2    from dual
      3  /
    GET_SQRT(2)
    1.41421356
    SQL> VAR URL VARCHAR2(4000)
    SQL> --
    SQL> BEGIN
      2    :url :=   'http://&USERNAME:&PASSWORD@&HOSTNAME:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/GET_SQRT';
      3  end;
      4  /
    old   2:   :url :=   'http://&USERNAME:&PASSWORD@&HOSTNAME:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/GET_SQRT';
    new   2:   :url :=   'http://DBNWS:DBNWS@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/DBNWS/GET_SQRT';
    PL/SQL procedure successfully completed.
    SQL> print url
    URL
    http://DBNWS:DBNWS@localhost:80/orawsv/DBNWS/GET_SQRT
    SQL> --
    SQL> set long 100000 pages 0 lines 256
    SQL> --
    SQL> select     httpuritype( :url || '?wsdl' ).getXML() from dual
      2  /
    <definitions name="GET_SQRT" targetNamespace="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" xmlns="http://schemas.xmlsoap.org/wsdl/
    " xmlns:tns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
    schemas.xmlsoap.org/wsdl/soap/">
      <types>
        <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" elementFormDefault="qualified">
          <xsd:element name="SNUMBER-GET_SQRTInput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="INPUT_VALUE-NUMBER-IN" type="xsd:double"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="GET_SQRTOutput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="RETURN" type="xsd:double"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:schema>
      </types>
      <message name="GET_SQRTInputMessage">
        <part name="parameters" element="tns:SNUMBER-GET_SQRTInput"/>
      </message>
      <message name="GET_SQRTOutputMessage">
        <part name="parameters" element="tns:GET_SQRTOutput"/>
      </message>
      <portType name="GET_SQRTPortType">
        <operation name="GET_SQRT">
          <input message="tns:GET_SQRTInputMessage"/>
          <output message="tns:GET_SQRTOutputMessage"/>
        </operation>
      </portType>
      <binding name="GET_SQRTBinding" type="tns:GET_SQRTPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_SQRT">
          <soap:operation soapAction="GET_SQRT"/>
          <input>
            <soap:body parts="parameters" use="literal"/>
          </input>
          <output>
            <soap:body parts="parameters" use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="GET_SQRTService">
        <documentation>Oracle Web Service</documentation>
        <port name="GET_SQRTPort" binding="tns:GET_SQRTBinding">
          <soap:address location="http://localhost:80/orawsv/DBNWS/GET_SQRT"/>
        </port>
      </service>
    </definitions>
    SQL> set serveroutput on
    SQL> --
    SQL> DECLARE
      2    V_SOAP_REQUEST      XMLTYPE := XMLTYPE(
      3  '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      4          <SOAP-ENV:Body>
      5                  <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
      6                          <m:INPUT_VALUE-NUMBER-IN>2</m:INPUT_VALUE-NUMBER-IN>
      7                  </m:SNUMBER-GET_SQRTInput>
      8          </SOAP-ENV:Body>
      9  </SOAP-ENV:Envelope>');
    10    V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
    11    V_REQUEST           UTL_HTTP.REQ;
    12    V_RESPONSE          UTL_HTTP.RESP;
    13    V_BUFFER            VARCHAR2(1024);
    14  BEGIN
    15
    16    V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
    17    UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
    18    V_REQUEST.METHOD := 'POST';
    19    UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
    20    UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
    21
    22    V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
    23    LOOP
    24      UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
    25      DBMS_OUTPUT.PUT_LINE(V_BUFFER);
    26    END LOOP;
    27    UTL_HTTP.END_RESPONSE(V_RESPONSE);
    28  EXCEPTION
    29    WHEN UTL_HTTP.END_OF_BODY THEN
    30      UTL_HTTP.END_RESPONSE(V_RESPONSE);
    31  END;
    32  /
    old   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
    new   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GET_SQRTOutput xmlns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <RETURN>1.41421356237309504880168872420969807857</RETURN>
    </GET_SQRTOutput>
    </soap:Body>
    </soap:Envelope>
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> --
    SQL>
    SQL>

  • Error in BPM application in calling web service

    Hello,
    I have created a BPM application with 3 steps first 2 are human steps and third one is automated step which calls web service interface via WSDL (external system).
    On third step my process goes to failure and has below error.
    any help.
    com.sap.glx.core.kernel.api.TransitionException: An exception occurred while executing the script "_Vehicle_Insurance_Proposal_Process:AUTOMATED_ACTIVITY_Enter_Contract_into_Alice(
          com.sap.glx.adapter.BPMNAdapter:Token_0_Vehicle_Insurance_Proposal_Process_fe3c0f2f9854595480f1540a14a9dff8 token,
          com.sap.glx.adapter.BPMNAdapter:Instance_0_Vehicle_Insurance_Proposal_Process_fe3c0f2f9854595480f1540a14a9dff8 parent,
          com.sap.glx.adapter.internal.ContainerAdapter:Context_0_DO_Context_fe3c0f2f9854595480f1540a14a9dff8 context_0){
      exit=new com.sap.glx.adapter.BPMNAdapter:Exit();
      exit:addParameter(token);
      exit:addParameter(parent);
      exit:addParameter(context_0);
      exit:onActivation("4A953ED620341B80924811DECB86002170E8BE7E", parent, token);
      delete exit;
      controller=new com.sap.glx.adapter.internal.ExceptionAdapter:ExceptionController();
      controller:setContext(token);
      delete controller;
      callscope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_0_Vehicle_Insurance_Proposal_Process_fe3c0f2f9854595480f1540a14a9dff8(parent);
      call=new com.sap.glx.adapter.UnifiedConnectivityAdapter:Call_0_Enter_Contract_into_Alice_fe3c0f2f9854595480f1540a14a9dff8(callscope);
      request=callscope:instantiate("urn:sap-com:document:sap:soap:functions:mc-style", "4A96538007F4ED1192ED11DECAA6002170E8BE7E");
      mapper=new com.sap.glx.adapter.internal.Transformer:DataMapper();
      yves_in=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_out=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_out:setData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebService", request, "834EAE2B040BBEAC78BAF131CDC66B6B");
      mapper:map("4A953ED620341B83924811DE8E24002170E8BE7E_fe3c0f2f9854595480f1540a14a9dff8", yves_in, yves_out);
      request=yves_out:getData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebService", "834EAE2B040BBEAC78BAF131CDC66B6B");
      delete yves_in;
      delete yves_out;
      delete mapper;
      call:setInputData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebService", request);
      response=callscope:instantiate("urn:sap-com:document:sap:soap:functions:mc-style", "4A96538007FC190192ED11DE98EE002170E8BE7E");
      call:setOutputData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebServiceResponse", response);
      call:invoke();
      response=call:getOutputData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebServiceResponse");
      mapper=new com.sap.glx.adapter.internal.Transformer:DataMapper();
      yves_in=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_out=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_in:setData("urn:sap-com:document:sap:soap:functions:mc-style", "$urn:sap-com:document:sap:soap:functions:mc-style:ZTstWebServiceResponse", response, "834EAE2B040BBEAC78BAF131CDC66B6B");
      data=context_0:getData();
      scope=new com.sap.glx.adapter.internal.TypeRegistry:GenericScope(null, "D344D8196275E4C40D7D4B131B0136BB");
      copy=scope:copy(data);
      delete scope;
      yves_out:setData("sap.com/glx/", "$sap.com/glx/:DO_Context", copy, "D344D8196275E4C40D7D4B131B0136BB");
      mapper:map("4A953ED620341B85924811DEBFFC002170E8BE7E_fe3c0f2f9854595480f1540a14a9dff8", yves_in, yves_out);
      data=yves_out:getData("sap.com/glx/", "$sap.com/glx/:DO_Context", "D344D8196275E4C40D7D4B131B0136BB");
      context_0:setData(data);
      delete yves_in;
      delete yves_out;
      delete mapper;
      delete call;
      delete callscope;
      token:state=3;
    com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:69)
    com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:241)
    com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:118)
    com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
    com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:116)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAs(Subject.java:337)
    com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:114)
    com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    java.security.AccessController.doPrivileged(Native Method)
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169)
    Regards,
    Naeem

    Hello,
    I have found some Debug entries into my log file when this BPM process executes and go in Suspend mode. I do not understand the error. But this Begun entries have Green symbol which I understand there should not be any problem. But then why my process goes to Suspend mode??? If you like then I can also provide this Debug entry message from log file in order to get the idea about this problem.
    I use Logical destination on automatic BPM step. Which has WSDL link. This wsdl link I have test into WS Navigator which works fine. But I am wondering why it is not working in my BPM process?????
    does any one has idea what to do?
    Regards,
    Naeem

  • How do i call web services from SAP ABAP

    Hello,
    Ian working with .net team. they are using sap .net Connector to connect SAP. But my job is In SAP side when Purchase Requisition is created, I have to call web services from ABAP and i have to pass the Purchase Requisition number to web service(.net Program). Please help me how to call web services from ABAP and how to pass value. Any one help me with example.
    Thanks
    RaviKumar

    Hi Ravi,
    If you can call EJB from ABAP and from EJB call Web service which you want to call. I am giving code to write in EJB business method processFunction.
    public void processFunction(Function function) {
       IRepository repository;
       repository = new Repository("TestRepository");
       JCO.MetaData fmeta = new JCO.MetaData("ZTEST_EJB");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0,  
       JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0,
       JCO.EXPORT_PARAMETER, null);
       fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0,
       JCO.EXPORT_PARAMETER, null);
       repository.addFunctionInterfaceToCache(fmeta);
       JCO.ParameterList input  =
       function.getImportParameterList();
       JCO.ParameterList output =
       function.getExportParameterList();          
       JCO.ParameterList tables =
       function.getTableParameterList();
      if (function.getName().equals("ZTEST_EJB")) {
                        output.setValue(input.getCharArray("REQUTEXT"),"ECHOTEXT");
    output.setValue("This is a response " + table.getString("E_NAME") +" " + output.getName(1), "RESPTEXT");
      else if (function.getName().equals("STFC_STRUCTURE")) {
      JCO.Structure sin  = input.getStructure("IMPORTSTRUCT");
      JCO.Structure sout = (JCO.Structure)sin.clone();
      try {
          System.out.println(sin);
       catch (Exception ex) {
           System.out.println(ex);
                        output.setValue(sout,"ECHOSTRUCT");
    output.setValue("This is a response from Example5.java","RESPTEXT");
    }//if
    Here REQUTEXT, ECHOTEXT are import parameter and RESPTEXT is the Export parameter of Function module ZTEST_EJB in SAP.
    Here from this bisuness method you can call web service which you want and give back the result of webservice to ABAP F.M.
    Regards,
    Bhavik

  • Fails to check out an application module error calling web service

    I am using the ServiceFactory code to invoke the TerritoryProposalPublicServiceImpl.findProposals web service method. Weird thing is it invokes the service method for the first time, second time it throws the following error. Please help
    Jul 20, 2011 11:43:59 AM oracle.jbo.client.svc.Proxy invoke
    SEVERE:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.jbo.client.svc.Proxy.invoke(Proxy.java:64)
    at oracle.jbo.client.svc.ADFProxyInvocationHandler.invoke(ADFProxyInvocationHandler.java:54)
    at $Proxy38.findProposals(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.jbo.client.svc.ServiceProxyInvocationHandler.invoke(ServiceProxyInvocationHandler.java:58)
    at $Proxy39.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territoryImport.model.Importer.getProposalFromTarget(Importer.java:439)
    at oracle.apps.sales.territoryMgmt.territoryImport.model.Importer.main(Importer.java:76)
    Caused by: javax.ejb.EJBException: EJB Exception: ; nested exception is:
    oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null; nested exception is: oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:96)
    at $Proxy48.findProposals(Unknown Source)
    ... 15 more
    Caused by: oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at oracle.jbo.service.errors.ServiceExceptionHelper.extractServiceException(ServiceExceptionHelper.java:612)
    at oracle.jbo.server.svc.ServiceImpl.extractServiceException(ServiceImpl.java:1014)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2399)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2323)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl.findProposals(TerritoryProposalPublicServiceImpl.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy222.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Exception in thread "main" oracle.jbo.service.errors.ServiceException: JBO-30003: Application pool oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.TerritoryProposalPublicService fails to check out an application module due to the following exception:: null
    at oracle.jbo.service.errors.ServiceExceptionHelper.extractServiceException(ServiceExceptionHelper.java:612)
    at oracle.jbo.server.svc.ServiceImpl.extractServiceException(ServiceImpl.java:1014)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2399)
    at oracle.jbo.server.svc.ServiceImpl.find(ServiceImpl.java:2323)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl.findProposals(TerritoryProposalPublicServiceImpl.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.jbo.server.svc.ServiceContextInterceptor.removeCurrentADFContext(ServiceContextInterceptor.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy222.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl.findProposals(Unknown Source)
    at oracle.apps.sales.territoryMgmt.territories.territoryService.applicationModule.server.TerritoryProposalPublicServiceImpl_wqbnfu_TerritoryProposalPublicServiceImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi Frank,
    This is the service impl class TerritoryProposalPublicServiceImpl for our product's application module "TerritoryProposalPublicServiceAM".
    I added a new service method in this AM. I am using ServiceFactory class to call this method "findProposals()", first time when i run the code it invokes the service correctly, second time it fails throwing this errors.
    I found the place where it is getting exception, these are all frame works classes
    ServiceImpl.invokeCustom() -> calls acquireResources() method -> Calls ServiceConfiguration.getRootApplicationModule(this.getApplicationModuleDefName(), this.getConfigurationName()); -> Calls getApplicationModule()
    Exception is thrown from the line in bold
    Properties props = SDOValueStoreHelper.INSTANCE.getAppModuleSessionProperties();
    props.put(ServiceSessionImpl.SESSION_APPMODULE_NAME, pool.getName());
    props.put(ServiceSessionImpl.SESSION_TRANSACTION_ID, id);
    SessionCookie sess = pool.findOrCreateSessionCookie(id, id, props);
    sess.setEnvInfoProvider(envInfo);
    SDOValueStoreHelper.INSTANCE.setSessionEnv(sess);
    sess.setEnvironment(ServiceSessionImpl.SESSION_APPMODULE_NAME, pool.getName());
    sess.setEnvironment(ServiceSessionImpl.SESSION_TRANSACTION_ID, id);
    appModule = sess.useApplicationModule();
    //bug9215734,
    appModule.getTransaction().setBundledExceptionMode(true);
    Please see if you can figure out why sess.useApplicationModule() not able to find application module.

Maybe you are looking for

  • Suspend / Sleep not working anymore

    Hi all, for some short time now, my Mac Mini (Intel) doesn't go to suspend anymore. When I try to put it to sleep with the remote control, it powers down as expected but immediatly powers on again. I tried to look in the logs (sudo dmesg) and all I c

  • Adobe Acrobat 9 Pro Installation help?

    I have the Adobe Creative Suite 3 Design Premium for Mac. I installed InDesign, Photoshop, Illustrator, Flash, and Dreamweaver with no problems about a year ago. I realized that I never installed Acrobat... On the front cover it says "Install softwar

  • Cd-rom for Mac and Windows

    Hi there, I want to make an hybrid cd-rom for both, Mac and Windows, and I am using the fscommand code in the first frame of my actions: fscommand("fullscreen","false"); // returns the player to normal menu view. fscommand("allowscale","false"); //se

  • Images in gallery now dark and dull

    I added some new photos to my iWeb photo gallery, but when published, they look much darker and duller on the page slideshow, both in Safari and Firefox, and reds especially look horrible. The original photos were saved down to sRGB so they'd look th

  • Call text element and command in smart forms

    Hi, I have create a smart form that have one text element and one command. The command is for do a page break. I have seen that you can call the smart form from a program doing: 1.-'SSF_FUNCTION_MODULE_NAME' 2.-call function fm_name That is not ok fo