Calling ABAP Web Service on the system with two application servers

Hello all,
I try to figure out, how to setup a web service in the TC WSCONFIG in the multi application server environment.
Basically the requirement is that when WSClient calls my WS, it should not care about accessibility of one or another application server. In other words the WS's URI should contain the IP/domain name of "SAP Web Dispatcher" or other component, which handles the loadbalancing.
I think it could be done in ICM within WSCONFIG transaction, but I'm completely lost inside the setup. Also I was not able to find proper helpsap page with the description.
Is there a WEBLOG or any other document how to setup this ?
Thank you for your help in advance.
Regards
Tom

Hello,
You do not have anything to do in SAP transactions.
The HTTP load balancing is the SAP Web dispatcher job.
Just install and configure the web dispatcher. Follow HELP.SAP.COM, it is well explained.
We use this config to load balance 200 000 web servce calls/day on 5 abap application servers.
Regards,
Olivier

Similar Messages

  • Calling an Abap Web Service from IBM WebSphere with a MYSAPSSO2 Cookie

    Hello,
    I have the following problem :
    I have to develop a proof of concept between IBM Web Sphere 5.1 and SAP AS JAVA 7.0.
    I have created an IBM sevlet in Web Sphere, I use a specific redirect from an SAP AS Java to call it, this way I can have a SAP Logon Ticket, and I manage to call an ABAP module function with JCO with SSO.
    Scenario 1 : browser  + authentication --> AS Java redirect servlet MYSAPSSO2 cookie -> IBM WebSphere servlet JCO -> Abap module function (ECC5)
    This scenario works fine.
    I have to do the same scenario with a Web Service and I don't know what to do.
    I try to use jax-rpc handlers but I don't know how to pass my cookie from my servlet to my handler.
    Scenario 2 : browser + authentication --> AS Java redirect servlet MYSAPSSO2 cookie -> IBM WebSphere servlet JCO -> Abap Web Service (ECC5)
    Has someone already done that  ?
    Regards,  Julien.

    Julien,
    Why are you using 5.1....go for 6.0 and its cake walk, i have integrated WebSphere 6.0 with R/3 uysing xi.....in a week.
    Scenario changed to:--
    Browser+ authentication --> WebSphere AS servlet request --> XI --> RFC/bapi --> abap webService
    Hope that helps
    Regards
    Ravi

  • Calling a web service in external system from SRM

    Hi folks,
    A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how I'll get a return. Please let me know in detail.
    Thanks,
    Prem

    Prem,
    Hi. You can call the service via HTTP protocol. Pass them values (SET_DATA), and receive a response (GET_DATA), via xml/html.
    In your code you would need to create the xml data to pass them, and evaluate the returned xml.
    Process...
    Data setup
    1) Create the XML to send them
    Working with the external service
    2) Open the HTTP connection
    2a) cl_http_client=>create_by_url (IF_HTTP_CLIENT)
    2b) lr_client->authenticate
    3) Call the to send them the XML
    3a) lr_client->request->set_data
    3b) lr_client->send
    4) Call the lr_client->receive to return the response
    5) Close the connection lr_client->close
    Data evaluate
    6) Evaluation the returned XML and process.
    Hope this helps
    Cheers
    Rob
    Code example below.. (There are loads of SAP examples depending on which release you are on).
    Process the call to the HTTP client - logic copied from RSHTML01     *
    Open IF_HTTP_CLIENT
      call method cl_http_client=>create_by_url
        exporting
          url                = l_url
        importing
          client             = lr_client
        exceptions
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          others             = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                   with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          raising oops.
      endif.
    Authenticate the user
      if not g_int_type-usr is initial.
        move: g_int_type-usr      to l_user,
              g_int_type-password to l_password.
        call method lr_client->authenticate
          exporting
            username = l_user
            password = l_password.
      endif.
    Allow for Cookies
      lr_client->propertytype_accept_cookie = lr_client->co_enabled.
    Set the server protocol
      select single gsval into l_server_protocol
        from z77s0
          where grpid = c_grpid
          and   semid = c_server_protocol.
      if sy-subrc eq 0
      and not l_server_protocol is initial.
        move l_server_protocol to l_st_server_protocol.
        call method lr_client->request->set_header_field
          exporting
            name  = '~server_protocol'
            value = l_st_server_protocol.
      endif.
      Send out the XML
      Set body to XML data
        lr_client->request->set_data( g_xxml ).
        save_xml( i_role = cl_xml_document=>c_role_oreq ).
        l_request_length = xstrlen( g_xxml ).
      If Data is sent through then we need certain flags set
        lr_client->request->set_header_field(
                                   name = 'Content-Type'
                                   value = zcl_tem_bsp=>c_xml_content ).
        call method lr_client->request->set_header_field
          exporting
            name  = '~request_method'
            value = 'POST'.
      Set length of string to the header fields
        if not l_request_length is initial.
          move l_request_length to l_st_request_length.
          lr_client->request->set_header_field(
                                    name = 'content-length'
                                    value = l_st_request_length ).
        endif.
      Send the request
        call method lr_client->send
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            http_invalid_timeout       = 4
            others                     = 5.
        check_for_error 'Send'.
      Receive the response
        call method lr_client->receive
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            others                     = 4.
        check_for_error 'Receive'.
      Determined returned XML or HTML
        g_xxml = lr_client->response->get_data(  ).
      Determine the header fields for failure validation
        if lr_client->response->get_header_field( '~status_code' )
              between 200 and 299.
          save_xml( i_role = cl_xml_document=>c_role_ires ).
        else.
          l_status_code =
            lr_client->response->get_header_field( '~status_code' ).
          l_descript_1 =
            lr_client->response->get_header_field( 'error' ).
          l_descript_2 =
            lr_client->response->get_header_field( 'errortext' ).

  • Calling abap web service from webdynpro

    hi,
    i have a problem in that i am trying to call an ABAP web service published from r/3 in webdynpro. when i browse to the url generated by the r/3 application server it asks for my r/3 user name and password (not to be confused with http proxy user name and password). now when i enter it, i can see the generated wsdl without a problem. pressing escape gives me the standard 401 error.
    please note this is the r/3 username and password which i am required to enter. when i try to get to the webservice in webdynpro. here is my code:
      public void wdDoInit()
        //@@begin wdDoInit()
        try
              Request_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1 reekvesta = new Request_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1();
              reekvesta._setPassword("userid");
              reekvesta._setUser("password");
              wdContext.nodeRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1().bind(reekvesta);
              wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().setWfKunnr("0000000011");
              wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().modelObject().execute();
              wdContext.nodeResponse().invalidate();
        catch(Exception e)
              IWDMessageManager msgMrg = wdThis.wdGetAPI().getComponent().getMessageManager();
              String msg = e.getLocalizedMessage();
              if ((msg==null) || (msg.length()==0))
                   msg = e.getMessage();
              msgMrg.reportException(msg,true);         
        //@@end
    i have also tried it this way:
      public void wdDoInit()
        //@@begin wdDoInit()
        try
              Request_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1 reekvesta = new Request_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1();
    wdContext.nodeRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1().bind(reekvesta);     wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().modelObject()._setUser("userid");     wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().modelObject()._setPassword("password");
    wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().setWfKunnr("0000000011");
    wdContext.currentRequest_YYMJ_WS_TEST1_DEF1_yymjServiceWebTest1Element().modelObject().execute();
              wdContext.nodeResponse().invalidate();
        catch(Exception e)
              IWDMessageManager msgMrg = wdThis.wdGetAPI().getComponent().getMessageManager();
              String msg = e.getLocalizedMessage();
              if ((msg==null) || (msg.length()==0))
                   msg = e.getMessage();
              msgMrg.reportException(msg,true);         
        //@@end
    in both instances i get the error:
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (407) Proxy authorization required
    please note
    1. i am trying to test this on my local sap j2ee server, on my workstation. i am not deploying this as of yet to the portal.
    2. i do have access to r/3.
    3. the r/3 application server is in our corporate intranet, and therefore excluded from being looked up by our proxy.
    4. our proxy DOES require a username and password. i added my user name and password to the webservice container section of the visual administrator, and excluded the r/3 server from the proxy list.
    what am i missing?

    Zafar,
    Check the endpoint in generated WSDL. Probably there is a host name that is not in "exclude list" for proxy settings (like IP vs host name, or FQDN vs short host name).
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Call ABAP Web Service with Java code only

    Hi all,
    First of all, I am writing script in Adobe form but am not using the one in SAP.
    I am trying to call the web service and process the result with script open (i.e. no dataconnection created), because I am trying to do that in a dialog.
    I can call a non-SAP web service without problem, but I am not able to call a simple web service with only a single string input, anyone have any example?
    Here is the SOAP for input:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:Z_RFC_GET_STAFF_BANK_INFO>
             <A_STAFF_ID>0123456</A_STAFF_ID>
          </urn:Z_RFC_GET_STAFF_BANK_INFO>
       </soapenv:Body>
    </soapenv:Envelope>
    Here is my code to call:
         var cURL = "http://some-host-name:port/sap/bc/srt/wsdl/bndg_DEDB492BB032E7F1B09F001CC4FBCEC9/wsdl11/allinone/ws_policy/document?sap-client=300";
         var response = SOAP.request(
              cURL: cURL,
              oRequest: {
                   "urn:sap-com:document:sap:rfc:functions:Z_RFC_GET_STAFF_BANK_INFO": {
                        A_STAFF_ID: "0123456"
    Regards
    Bill

    Hello I have the same problem, were you able to execute the WS through the JS code now?
    I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
    I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
    var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
    var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
    try {
    // Create request structure, read Input out of text field
    var request = {
              "urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
    SOAP.wireDump = true;
    // Call web service using SOAP object
    var response = SOAP.request ({
            cURL: WSUrl,
            oRequest: request
    //        cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
    try {
        var myProxy = SOAP.connect(WSUrl);
        var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
        xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
    // Display the response in the console:
       console.println("Result is " + result);
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
    Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
    Any suggestions?
    Many thanks,
    G.
    Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM

  • Calling ABAP Web Service at https destination

    Hi!
    I have created an ABAP Proxy that calls an external web service at an http destination. When trying the same for a service at an https destination I get the error message <b>
    HTTP error (return code 110, message ""</b> when specifying the URL for the WSDL file. I tried one of Thomas Jungs blogs on HTTPS services (/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https), but here he says that "When we begin to get differences (From http setup) is in the setup of the Logical Port". Am I missing something? Some configuration to be done?
    Thanks for your input!
    -Ole
    Message was edited by:
            Ole Mugaas

    Hi!
    Do you mean trying to access the WSDL through an already defined HTTP connection? My problem arises when trying to enter the URL to the WSDL during proxy generation...

  • Issues with sharing a single OID with two Application servers (9.0.4)

    We have two installations of 9.0.4 Application Servers and both share the same OID. We use Oracle Portal for deploying our jsp applications.
    All users in the OID are sync'ed from Microsoft Active Directory.
    Application Server 1 is for an application X
    Application Server 2 is for an application Y
    We create groups in the portal of Application Server 1 specifically for Application X. DEF_GROUP1 is default group for all applications in application X
    DEF_GROUP1 has a default page - Page 1. DEF_GROUP 1 does not exist in Application server 2
    We create groups in the portal of Application Server 2 specifically for Application Y. DEF_GROUP2 is default group for all applications in application Y
    DEF_GROUP2 has a default page - Page 2
    DEF_GROUP2 does not exist in application server 1
    We have users who access both application X and applicaiton Y
    For a user "JOHN" we assign DEF_GROUP1 in the user profile on the portal in Application Server 1
    When we go to the user profile of "JOHN" on application server 2, we find that DEF_GROUP1 is a default group in the user profile of user "JOHN"
    If we change it DEF_GROUP2, then the default group on the portal of application server 1 automatically changes to DEF_GROUP2.
    Why is this so ? We would like to have a different default group for the same user in the two portal repositories. ?
    Can any one provide some insight into this issue ?

    Basically I started to develop this system inside Oracle AS and then when it came time to passing a request to a new page, it crapped out on me on the App. Server. So instead of trying to fix the problem there and then I continued to develop outside Portal and inside Jdeveloper. After a week or two once all my stuff worked perfectly I try and take it back into Portal but only the first JSP of all my Portlets would show up, because as soon as I would submit a form and the action directed me to a new page and Portal would be lost/confused. Obviously I shouldn't have done it that way but none the less...
    So now I'm reading through the documentation you pointed me towards and it seems I have to qualify my parameters and then "attach" them to the url which the form will pass to the actioned page. I'm importing numerous classes (...urlUtils, etc) in order to qualify the parameters and then build this url without affecting any parameters currently present that my portlet does not own.
    What I'm rambling towards here is all this separation of logic and presentation and the whole nine, implies different people can develop different parts of a 'system' mostly independant of one another...so in my situation I shouldn't in huge trouble yet, since underlying everything is a working system. My issue is with oracle and the App Server. If I take my code which works great outside of the App. Server and I fully qualify parameters and make sure my form actions are constructed using the UrlUtils in order to fully qualify them as well, and then I make sure page parameters are mapped to the proper portlet parameter values....should my system work on the App Server (assuming everything is done properly)....or am I still missing something.

  • Consuming ABAP Web Service in Non SAP system

    Hi
    I have created an ABAP web service form the RFC and configured it in the SOAMANAGER. I have tested it in Web Service Navigator using the URL and it is working fine.
    Now I am trying to access it from the Non SAP system using Java Code. I am able to access the WSDL using the URL from the step 1 but not able to receive any output when providing inputs.
    So I am not sure if I am missing any configuration on the Provider System (SAP) or on the Consumer system (Non SAP) to access the web service. As far I have not configured anything on the consumer system. Please let me know how to consume the web service in the Non SAP system.
    Thank you,
    Rohit

    not necessarily an answer to your question, but i find that when creating SAP web services, before we create the code for consuming them, I always test them with the SOAPUI package. with this test suite you can import the WSDL, and run individual tests, seeing the input, output, exceptions, etc. This is a good way to check the connection, the flow and the service logic, before writing any code. This will also let you know whether it is a WS issue, or an issue with your code.
    just a thought, from someone who has been there...
    http://www.soapui.org is where you can find the SOAPUI. It helped me out a lot.
    Dave

  • ABAP Web Service with XI and SOAP

    Hi everybody!
    What we are trying to implement is the following szenario:
    SAP ERP HCM
    SAP XI (Netweaver 2004s)
    Our customers shall call a Web Service on the HCM system over the XI system transmitting 2 parameters (IDs) and get back a xml document with a list of hr related information.
    This is how we started (or want to go on) with the outside-in method:
    1. set up data types and message interface in XI integration repository
    2. generate a proxy in HCM with the transaction SPROXY and implement the service
    3. set up a communication scenario in XI integration directory using the SOAP adapter
    But there are some questions left:
    - how many message interfaces must be set up for the described scenario?
    - is the SOAP-adapter the correct adapter for that scenario?
    - how do we send back the xml information list?
    - is synchronous communication correct?
    - how can we test that scenario?
    We are new to XI and SOA so we'd appreciate any help. thanks in advance!

    how many message interfaces must be set up for the described scenario?
    You would need two message interfaces. One for the outbound for the sender and one for the inbound for the receiver. There should be request and response message types for each message interface since this is a synchronous scenario.
    is the SOAP-adapter the correct adapter for that scenario?
    SOAP adapter is correct for the web service scenario
    how do we send back the xml information list?
    You will need to design the XML information list in the Integration Repository on the message interface.
    how can we test that scenario?
    You can use third party Soap UI Client such as SOAP UI Client or XML Spy to try calling the webservice.

  • Publish Abap Web Service in ICF virtual host

    Hello
    We have configured our abap aplication server with two virtual host in SICF
    one the default_host that listen in http 8080 port and other virtual host that
    listen in http 8090 port.
    We need define some ABAP web services that listen in default_host:8080  and other virtual host in virtualhost2:8090.
    We define de web service with SE80 wizard and then create the configuration end point
    with SOAMANAGER.
    Our problem is that soamanager ever create the entrie of endpoint in sicf transaction, under default_host:8080 service tree not under virtualhost2 service tree. and so we can not call
    the web service like http://virtualhost2:8090/sap/bc.... because don't exist, only exist
    http://defaul_host:8080/sap/bc....
    we try to copy the entry of the tree under virtualhost2 in the proper place of the tree,
    but when call the webservice with soaui the system report the error:
         No Web service configuration for this access path: ""
    i can see that there are entries in the table SRT_CFG_SRV_ASGN that are related with this
    problem, because assign the url of the endpoint of the ws to virtual host, but i don't
    know how the system generate this entries.
    someone know how call ABAP web service with icf virtual host?
    thanks
    regards
    diego

    Hi Trevor
    For test purpose i can do it works.
    The key point is create the proper entry in the table SRT_CFG_SRV_ASGN that refer to the correct VIRTUAL_HOST.
    When you genreate the endpoint of the service with soamanager, the system generate an entrty in this table with the fiel VIRTUAL_HOST = 0, you can copy this entry and change only two fields.
    VIRTUAL_HOST = <the number of your virtual host>
    HASH --> you can calculate this field with the FM CALCULATE_HASH_FOR_CHAR, in the parameter DATA contatenate the content of the fiels VIRTUAL_HOST and URL (be careful with the upercase), this function module return you the hash.
    (First you have to replicate the icf tree that soamanager create under your virtual host tree)
    With this configuration i can call to my WS over the virtaual host, using soaui.
    I hope this can be useful for you.
    Regards
    diego

  • DCA-40000: internal error when calling a web service

    Hello,
    I would like to call a web service in Oracle UCM with basic authentication (CheckInUniversal). In JDeveloper 11.1.1.2 I can specify username and password for the WS at design time and the JSPX runs fine.
    Now I have added some piece of code into a managed bean (CheckInBean) to use a specific username and password at runtime. When I run the page I get a DCA-40000 with the following error stack:
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: The Web Service call failed due to an internal error.
    oracle.adf.model.adapter.AdapterException: DCA-40000: The Web Service call failed due to an internal error.
         at oracle.adfinternal.model.adapter.webservice.WSDataControl.invokeOperation(WSDataControl.java:270)
         at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:430)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:257)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1625)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2141)
         at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:467)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:730)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
         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.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at integration.view.CheckInBean.execute(CheckInBean.java:134)
         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.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.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.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    With debugger I found that it happens when the iterator CheckInUniversalResultIterator is called.
    HTTP Analyzer shows that there are only empty SOAP messages sent to UCM but the correct values are present in the the bean.
    Here is the code of the bean:
    package integration.view;
    import java.util.HashMap;
    import java.io.*;
    import java.util.Properties;
    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    import javax.el.MethodExpression;
    import javax.el.ValueExpression;
    import javax.faces.application.Application;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    import oracle.adf.model.BindingContainer;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCDataControl;
    import oracle.adfinternal.model.adapter.webservice.WSDataControl;
    import oracle.adfinternal.model.adapter.webservice.security.SecurityModel;
    // import oracle.binding.BindingContainer;
    import oracle.webservices.model.Port;
    public class CheckInBean extends SecurityModel {
    private String fileName;
    private String fileContent;
    private HashMap primaryFile;
    String mSavedCSFKey = null;
    public CheckInBean() {
    public void setFileName(String fileName) {
    this.fileName = fileName; }
    public String getFileName() {
    return fileName;
    public void setFileContent(String fileContent) {
    this.fileContent = fileContent;
    public String getFileContent() {
    return fileContent;
    public void setPrimaryFile(HashMap primaryFile) {
    this.primaryFile = primaryFile;
    public HashMap getPrimaryFile() throws IOException {
    FacesContext facesCtx = FacesContext.getCurrentInstance();
    Application app = facesCtx.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesCtx.getELContext();
    // gets the value from the managed bean
    fileName = elFactory.createValueExpression(elContext, "#{pageFlowScope.ReportBean.reportName}", Object.class).getValue(elContext).toString();
    System.out.println(fileName);
    // puts the file name and the content into a hash map
    HashMap hashMap = new HashMap();
    hashMap.put("fileName",fileName);
    System.out.println(fileName);
    hashMap.put("fileContent",getFileInBytes(ReportBean.reportPath, fileName));
    return hashMap;
    private static byte[] getFileInBytes(String reportOutputPath, String fileName) throws IOException {
    File file = new File(reportOutputPath,fileName);
    System.out.println(reportOutputPath + "+" + fileName);
    InputStream inputStream = new FileInputStream(file);
    // Get the size of the file
    long size = file.length();
    System.out.println("Size of the file: "+ size);
    // Check that size is not larger than Integer.MAX_VALUE
    if (size > Integer.MAX_VALUE) {
    System.out.println("File too large !!");
    return null;
    // Read the bytes into the byte array
    byte[] byteArray = new byte[(int)size];
    System.out.println("New Byte Array");
    int offset = 0;
    int byteRead = 0;
    while ((offset < byteArray.length)
    ((byteRead=inputStream.read(byteArray, offset, byteArray.length-offset)) >= 0)){
    byteRead = offset + byteRead;
    System.out.println(byteRead);
    inputStream.close();
    return byteArray;
    public void execute(ActionEvent aev) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application app = fctx.getApplication();
    ExpressionFactory expF = app.getExpressionFactory();
    ValueExpression ve = expF.createValueExpression(fctx.getELContext(), "#{bindings}", DCBindingContainer.class);
    DCBindingContainer cont = (DCBindingContainer)ve.getValue(fctx.getELContext());
    DCDataControl dc = cont.findDataControl("CheckInECM");
    if(dc.getAdaptedDC() instanceof WSDataControl)
    WSDataControl wsdc = (WSDataControl)dc.getAdaptedDC();
    wsdc.getProvider().setSecurityModel(this);
    // execute the data control method, that was bound to this
    // button's action listener.
    MethodExpression me = expF.createMethodExpression(fctx.getELContext(),
    "${bindings.CheckInUniversal.execute}", Object.class,
    new Class[0]);
    me.invoke(fctx.getELContext(), null);
    // public BindingContainer getBindings() {
    // return (BindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    // override security properties for any policy on the current port
    // before the method execution.
    public void initSecurity(Port thisPort) {
    super.initSecurity(thisPort);
    System.out.println(thisPort.hashCode());
    Properties callP = (Properties)this.getCallProperties(thisPort);
    callP.put("javax.xml.ws.security.auth.username", "sysadmin");
    callP.put("javax.xml.ws.security.auth.password", "welcome1");
    mSavedCSFKey = (String)callP.remove("csf-key");
    this.saveCallProperties(thisPort, callP);
    // Restore the config at the end of the request.
    public void clearSecurityParameters(Port thisPort) {
    super.clearSecurityParameters(thisPort);
    Properties callP = (Properties)this.getCallProperties(thisPort);
    callP.remove("javax.xml.ws.security.auth.username");
    callP.remove("javax.xml.ws.security.auth.password");
    //put back the saved csf key as default...
    callP.put("csf-key", mSavedCSFKey);
    this.saveCallProperties(thisPort, callP);
    }

    If you could enclose your code inside tag it will improve readability for us.
    Anyways, first thing that I could think of is - what is the scope of your managed bean..? If its in request scope can you try changing it to higher scope level (session scope or page view scope).
    regards,
    ~K                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Calling a Web Service from Mobile - UI options

    Hi Team,
    I have a scenario where the backend SAP functionality is exposed as a web service and we need to call it online from a mobile handheld device (Symbol with Pocket PC client 2003, IE browser 4.0). Is it possible to call this web service from the handheld? Do we have to write the web service call on the J2EE stack using NetWeaver developer studio?
    Also, what UI technology is recommended for showing the data from the web service call. The idea is to get some user input on the handheld, and then post a transaction via the web service on SAP. I discussed with some of my colleagues and they recommend to use JSP/Servlets for this. Does anybody has a better idea, (the JSP/Servlets does not seem correct). Should we use native XSLT or something else.
    Please note that the Mobile Web Dynpro has limitations on the UI side and the "onEnter", "setFocus" does not work, specifically on the netweaver 2004s release. The backend ERP system we have is 2004s and I'm trying to make a web service call from a NW 2004 client.
    Any ideas or pointers will be appreciated and points awarded. Thanks for your time.

    Hi Sanjay!
    Yes, To call a WebService you will have to write your Own Application using NWDS.I donot have any specific recommendation for the UI Technology to be used.
    Usage of "OnEnter" and "SetFocus" with NW2004s has certain limitations below.
    "OnEnter" is not a supported feature as of now especially for WD applications on Handheld Devices.
    "SetFocus" will work on IE6.0 Standard Desktop Browser with WAS7.0 SP06 and i believe it will work in hand held devices if your using WAS7.0(NW2004s)SP8 and you are using the latest Symbol Device that has Windows Mobile 5.0 OR Windows CE.NET 5.0.I understand that there could be some limitations with the OS and the IE you are currently running in the device.
    Let me know your views.
    Thank You
    Gisk

  • Proxying ABAP Web Service on NW CE

    Hi,
    Assume that we have a Web Service created in ABAP System and can be accessed anywhere.
    We want to publish this web service to external 3rd party companies but don't want them to access directly SAP R/3 System.
    One way is to create another Webservice on CE and call ABAP Web Service from there and also publish this CE Web Service.
    But I remember that it is possible to create a Web Service Proxy on CE for anther Web Service.
    Could you help me to choose the best option and also if there are sample solutions
    regards

    Hello,
    I think you must create a Web Service proxy client and expose this client as a Web Service.
    For creating your Web Service you must follow the outside-in approach:
    1.Import the WSDL document from your ABAP system.
    2.Generate the Java bean skeleton based on the imported WSDL.
    This is the link to the help documentation:  http://help.sap.com/saphelp_nwce10/helpdata/en/46/935a636110581de10000000a1553f7/frameset.htm

  • DNS problem when calling a web service

    Hi,
    when I try to call a web service from the Studio I get the following error message:
    return code: 503
    Network Error
    Network Error (dns_server_failure)
    Your request could not be processed because an error occurred contacting the DNS server.
    The DNS server may be temporarily unavailable, or there could be a network problem.
    Looks not like an OBPM problem, but I can access the web service via SoapUI and I can access it from an OBPM enterprise installation on a server here in the network. The problem is only when I try to access the service from OBPM Studio. I also tried accessing a local web service, also does not work.
    Does anyone have a hint, what it could be? Thanks for your help!
    Regards
    Matthias

    No, it is in my local LAN, so it should work without proxy (and in SoapUI it also works without Proxy). But nevertheless I tried it also with a proxy, but unfortunately without success.
    Regards
    Matthias

  • Call a Web Service from within an e-Sourcing script

    Hi Guys
    I would like to know wether anyone has successfully been able to call a Web Service from within an
    e-Sourcing script? If you have, can you please share your experience and code?
    Thank You

    Hi Faaiez -
    As with any use of Web Services, however, you should carefully consider the security issues that may come up. How, for example, will the Web Service server validate that the Web Service client (E-Sourcing) is properly authenticated? Will password information be included in the web service call? You will find that it is very easy to make a web service call, but I would encourage you to carefully consider security before implementing a productive solution.
    Web service calls can be made using raw Java web service APIs from the open source Axis library which is included with E-Sourcing; this approach is slightly more difficult to code, but very dynamic. Web service calls can also be made using proxies. In one solution that I worked on, we generated java proxies for the web service, compiled those proxies into a Jar file, and included that jar file as a custom jar in E-Sourcing. Let me provide a few more details on each of these approaches.
    Using raw java web service APIs that are part of the Service and Call classes, I prototyped a web service call to Googles sample spell checker web service. Here is the code:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    String endpoint = "http://api.google.com/search/beta2";
    Service  service = new Service();       
    Call call = (Call) service.createCall();       
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );       
    call.setOperationName( "doSpellingSuggestion" );       
    call.setOperationName(new QName("urn:GoogleSearch", "doSpellingSuggestion"));       
    call.addParameter("key", XMLType.XSD_STRING, ParameterMode.IN);       
    call.addParameter("phrase", XMLType.XSD_STRING, ParameterMode.IN);       
    call.setReturnType( XMLType.XSD_STRING );       
    String ret = (String) call.invoke( new Object[] { "googlekey", doc.getDocumentDescription()} );       
    doc.setDocumentDescription(ret);
    This block of code does a very simple thing...it calls the Google "doSpellingSuggestions" web service with two parameters: a key provided by Google, and a string for which the spelling suggestions should be generated. I used the current document description as my sample string for the web service and I put the results back into the document description - remember, this is just showing how you can call the web service, not doing anything really intelligent or useful from a business perspective
    There is nothing special to E-Sourcing about the above code...this is really just using the Axis java classes to call a web service.
    The second approach that can be used is to generate Java proxies for the web service calls. The open source Axis library includes a tool called "wsdl2java". Using the WSDL for the web service, you can generate Java proxies. Java classes will be generated by the tool; these Java classes will then need to be compiled and included in E-Sourcing as a custom jar. Once they are part of the E-Sourcing deployment, they can be called like any Java API. If you were to examine the generated code, you would notice that it looks a lot like the raw web service code shown above...the generated classes really just provide a simpler interface to the same functionality.
    You can see this information and other E-Sourcing information at my blog at: http://www.sunshinesys.com/
    Rob

Maybe you are looking for