Calling Web Service of SAP R/3 in SAP PI

Dear Experts,
We have a Web Service in R/3 which is generated from the RFC(Function Module). We have consumed that in PI for some requirements where the application has no direct access to R/3.
But when we are calling the Service from PI, the result tables are coming blank. The same Web Service of R/3 is working in DOTNET application and getting the data.
There are no errors, the authorizations checks are through, but the data is coming blank.
Please help
thanks and regards,
Ravi Siddam

Ravi,
We have tried the same from SOAP UI client also and it is not working,
same result as PI. But I repeat the Service is working from DOTNET applications.
If it is not working in SOAP UI then it will not work in PI also. I suggest you to re-import the WSDL in you .net application and check.
Regards,
Ramesh

Similar Messages

  • Calling Web Service from SAP

    Dear All,
    How can we call web service from SAP?
    Thanks in Advance,
    Ramana

    HI kcr,
    pls see this link
    http://****************/Tutorials/Others/ValidateEmailID/Webservice.htm
    write this program
    REPORT zvalidate_email.PARAMETERS: p_mail(100) LOWER CASE.                 " E-Mail id to be verifiedDATA: http_client TYPE REF TO if_http_client .DATA: w_string TYPE string ,
          w_result TYPE string ,
          r_str    TYPE string .DATA: result_tab TYPE TABLE OF string.START-OF-SELECTION .
      CLEAR w_string .
      CONCATENATE
      'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email=' p_mail
    INTO
      w_string .  CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url                = w_string
        IMPORTING
          client             = http_client
        EXCEPTIONS
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          OTHERS             = 4.  CALL METHOD http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.  CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.
      CLEAR w_result .
      w_result = http_client->response->get_cdata( ).  REFRESH result_tab .
      SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .  READ TABLE result_tab INTO r_str INDEX 2.
      IF r_str+44(1) = 't'.
        WRITE:/ 'Valid email address'.
      ELSE.
        WRITE:/ 'Invalid email address'.
      ENDIF.Output:
    thanks
    karthik

  • Is it possible to call web service from ABAP SAP 4.6 c..If yes how

    Hi Friends,
    Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
    Thanks in Advance.
    Murali Krishna K
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PM

    Olivier CHRETIEN wrote:>
    > Hi Terry,
    >
    > So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
    >
    > How much abap code lines do you have for a web service call ?
    > Do you have to code the call specifically for each different web service ?
    > Are you able to use the WSDL ?
    >
    > Nice job if you have coded your own private SOAP runtime !
    >
    > But I don't think this is an easy solution for everybody...
    >
    > Regards,
    >
    > Olivier
    Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication.  So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic.  Here's some sample code:
      DEST = 'SAPHTTPA'.
      TRANSLATE HOST TO LOWER CASE.
      MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
      CONCATENATE HOST MYURL INTO MYURL.
      REQUEST_HEADERS-DATA = 
                  'Content-type: application/x-www-form-urlencoded'.
      APPEND REQUEST_HEADERS.
      CLEAR REQUEST_HEADERS.
    *........Convert Order Number to External Format........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ORDER
           IMPORTING
                OUTPUT = ORDER.
    *........Convert Item Number to External Format.........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ITEM
           IMPORTING
                OUTPUT = ITEM.
    *........Convert Material Number to External Format.....................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = MATERIAL
           IMPORTING
                OUTPUT = MATERIAL.
      CONCATENATE 'sOrder=' ORDER
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sItem=' ITEM
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sMaterial=' MATERIAL
                  INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CALL FUNCTION 'HTTP_POST'
           EXPORTING
                ABSOLUTE_URI          = MYURL
                RFC_DESTINATION       = DEST
                BLANKSTOCRLF          = 'X'
           TABLES
                RESPONSE_ENTITY_BODY  = RESPONSE_BODY
                REQUEST_ENTITY_BODY   = REQUEST_BODY
                RESPONSE_HEADERS      = RESPONSE_HEADERS
                REQUEST_HEADERS       = REQUEST_HEADERS
           EXCEPTIONS
                CONNECT_FAILED        = 1
                TIMEOUT               = 2
                INTERNAL_ERROR        = 3
                TCPIP_ERROR           = 4
                DATA_ERROR            = 5
                SYSTEM_FAILURE        = 6
                COMMUNICATION_FAILURE = 7
                OTHERS                = 8.
      CHECK SY-SUBRC = 0.  "more appropriate msg goes here
      LOOP AT RESPONSE_BODY.
        IF RESPONSE_BODY+0(7) <> '<string' AND
           RESPONSE_BODY+0(8) <> '</string' AND
           RESPONSE_BODY+0(5) <> '<?xml'.
          SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
          TRANSLATE FIELD_NAME TO UPPER CASE.
          CASE FIELD_NAME.
            WHEN 'HEIGHT'.
              HEIGHT = FIELD_VALUE.
            WHEN 'WIDTH'.
              WIDTH = FIELD_VALUE.
            WHEN 'LENGTH'.
              LENGTH = FIELD_VALUE.
            WHEN 'WEIGHT'.
              WEIGHT = FIELD_VALUE.
            WHEN 'QTY'.
              QTY = FIELD_VALUE.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Hope this helps...
    Terry
    Edited by: Terry West on Feb 4, 2008 3:08 PM

  • 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

  • How to call WEB Service From SAP

    Hi Friends,
    How to call WEB Service From SAP.
    Thanks in advance,
    Murali Krishna K

    Hi,
    if you mean calling a web service in Web Dynpro ABAP, see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d7/951b42f828df2ce10000000a1550b0/frameset.htm">documentation</a>, if you mean calling a web service in general, this is not the correct forum. This here is the Web Dynpro ABAP forum, for general questions on ABAP, use the ABAP forum.
    Regards, Heidi

  • It it possible to call web service from SAP 4.6 c..If yes how

    Hi Friends,
    It it possible to call web service from SAP 4.6 c..If yes how
    Thanks in Advance.
    Murali Krishna K

    It is not possible to directly call a web service from SAP 4.6c.
    Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
    So as described above, the solution is indeed to make use of PI(XI) for this.
    Rgds,
    Karim

  • How to call WEB Service From SAP 4.6 c

    Hi Friend,
    How to call WEB Service From SAP 4.6 c Report
    Thanks in advance.

    It is not possible to directly call a web service from SAP 4.6c.
    Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
    So as described above, the solution is indeed to make use of PI(XI) for this.
    Rgds,
    Karim

  • Call a web service in an interactive form within SAP

    hi experts
    I need to call a Web service into an interactive form within SAP, but to do so fails to press on the button that calls the Web service, the strange thing is that if I keep the PDF in my PC, then open that PDF download button works correctly if I am doing something wrong?, you can do what I need?.
    Greetings.

    Hi asdasdasdasd1,
    not sure if I fully understand your problem but it sounds like you are trying to execute your Web Service in the preview tab of LiveCycle Designer. When you do this, features of the Reader Extension Rights are not available so you will have to generate the form via the ADS and test the WS on the generated rendition as you have done.
    Let me now if this helps.
    Regards,
    Ben.

  • Calling web services from SAP

    Hi,
    Calling WEB services from SAP and Please any one give idea to implement using ABAP. What the technology being used when
    SAP connecting with ex: .net environment i.e Tight coupling environment.
    Kindly advise me what techniques need to adopt to make this possible and i am new to this process.
    Thanks,
    Raghu.

    Hi,
    It is better to open this thread in the ABAP development forum.
    So, you can find the information about calling web services in the document, below;
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4?QuickLink=index&overridelayout=true
    Best regards,
    Orkun Gedik

  • Calling Web Services between two SAP systems.

    Hi Experts,
    I am trying to trigger a web service  created in one of the SAP system from a different R/3 system through WDA.
    Kindly help me out on what are the configurations to be done like linking two systems (do i require this?) etc..
    I have successfully obtained the WSDL file, but could not use it in my second system. It says , it encountered an error. I wonder if i am required to do any configurations.
    All suggestions are welcome.
    Thanks and Regards,
    Anto.

    Hi Antony,
    By Proxy Object, I meant Class to consume WebService in your second system.
    Lemme summarize, what you have done and lemme know where I am wrong.
    System A.
    You exposed an RFC enabled Func Module or BAPI as a webservice.
    After this you have checked it using WSADMIN, and you have tested this as well.
    And finally you saved the WSDL file of this Web Service.
    System B.
    you create a Proxy Object as specified in the link I provided.
    you create the RFC destination n did the Logical Port Configuration  as per that link.
    Now you can use this proxy class any where , in any abap code.
    you can use this in WDA as well.
    But before doing so, I would suggest to write a test report as suggested in the link and test if your webservice is working fine.
    Now please tell me where did you do the things differently.
    Regards
    Pushkar

  • Calling Web service From R/3

    Hi ,
    we have a requirement, where we have to call a web service in Biz talk from SAP and compile the received data in R/3 as a report.
    has any one worked on such a requirement, could you please provide your inputs on the same.
    Thanks,
    Raghavendra

    [Calling Web service From R/3|http://forums.sdn.sap.com/search.jspa?threadID=&q=CallingWebserviceFromR/3&objID=f50&dateRange=all&numResults=15]

  • Calling web service from ABAP - version 4.6C

    Hi,
    I would like to know how to call a web service from ABAP. Version is 4.6C. Any help would be greatly appreciated.
    Thank you,
    Rekha

    Hi Rekha,
    Please go through these..
    call web service using ABAP
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/da0710b6560a4e80fb94f3f712dfc0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/frameset.htm
    Hope these help you!
    cheers,
    Prashanth

  • Calling web Service from the Custom Adapter.Is it Possible?

    Hi Experts,
                    I am having requirment in which i have to cal com.sap.aii.mapping.lookup.LookupService for calling web Service from the Custom Adapter.Is it Possible?
    Regards,
    Rajesh.D

    Hi Rajesh..
    Just looking the problem in another angle.. if there is no constraint that you have to use XI specific API to call the web service, why dont you use usual Java API used for calling a web service inside you custom adapter (I have Microsoft background.. donno exactly how it is done in Java,, but in .NET kind of a language it is possible). SInce your adapter is in Java itself and is capable of calling web service.. collect or lookup the data whatever you want and validate...
    Just a thought..
    VJ

  • How to call web service using J2SE 1.3?

    Dear All,
    i have developed a web service by jdev 10.1.3 (JAX-RPC with web service security
    enabled).
    i generate the ws proxy (jdev 10.1.3) and run it with wsclient_extended.jar (required JDK 1.4.1 or above??).
    but one of my client say he has to use J2SE 1.3.x (as OS=AIX 4.3 that without J2SE
    1.4.x ), could anyone tell me how can generate ws proxy (with supporting
    library) for jdk 1.3.x?
    if oracle don't have such library / tools, any third party tools / library available?
    thank you.
    lsp

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • 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

  • Problem call Web Service SAML on PI 7.0

    Hi experts,
    I have a problem very estrange on one scenario and maybe somebody could help me:
    Our PI version is 7.0.
    The BPM has got the following steps:
    - Call WebService for get the SAML. Message Synchronous with request and response Authentification.
    - We add the Authentification Response on Envelope message.
    - Call web Service with Envelope, inside of this one there is the Authentification (step 1).
    The las Web Service always returns that the Authentification is error.
    We execute the same steps manually using SAOPGui program ( a free program for test WebService ) and the same steps works.. and the structures are the same, but on PI 7.0 never works.
    We researh on forums and we have seen that the SAML Authentification is soported only for PI 7.1.
    Could anybody confirm it? It is possible use SAML Authentification on PI 7.0? Are there other process to execute a SAML WebService using PI 7.0?
    Any response or any idea will be very appreciated.
    Thank you very much...
    Regards,
    Gemma

    It is possible use SAML Authentification on PI 7.0?
    at least the help section on 7.0 mentions the use of SAML...check this link
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/2388909a1d2de9e10000000a1553f7/frameset.htm
    Regards,
    Abhishek.

Maybe you are looking for

  • BPM(with wait step) calling another BPM

    Hello, I have this scenario whereby i need to call a BPM from another BPM process. Call it BPM1 and BPM2. BPM1 will have a Sync-Send-step to call BPM2. The following is what i have setup:- Working OKAY:- BPM1 (receive from file, send syn step to BPM2

  • Is there any way I can rotate pdf's in Adobe Reader?

    I want to use Adobe Reader to view drawings when out on site, but they often open in portrait when they should be landscape.  Is there any way I can rotate the view?

  • HT204291 at times error 6722 appears while connecting to airplay device "apple tv"

    at times error 6722 appears while connecting to airplay device "apple tv".  i have restarted the apple tv several times but it keeps doing the same thing, at times the pictures appears without sound from my sound system. what is the  problem, my appl

  • Troubles transfering music to my N70 Music Edition

    Everytime i want to tranfer music i get an error report on Windows Vista Home premium which says NokiaMusicManager has stopped working. Do i need different software for vista? If i uninstall Nokia Pc Suit and reinstall it it would transfer about 4 so

  • New Plant (701 Mvt type)

    Hello, We have set up a new plant but I am looking to make the settings for Clearing Inventory differences using movement type 701/711 In the current plant, it automatically picks the Cost center,Profit center and G/L account the moment it creates th