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

Similar Messages

  • 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 to do web services between two applications

    I have tried to get a complete example about how to do a web service between two applications in ADF
    but I saw all the put examples that describe only how to do a web service and test it in the same application.
    Please, I want to see a whole example that shows a web service between two applications (in Oracle ADF).

    Hi Frank!
    thanks for your reply!!
    let me please tell you what I exactly did!!
    I built two applications in ADF let's say A and B, and I made a web service from the application A
    and I want the application B to use it .. the problem I encountered was that an error raised ..
    when I tested the web service in the same applicatin (A) everything was right ..
    so can I see a whole example that shows me the exact steps to do it ???
    thanks a lot !!

  • RFC connection between two SAP systems (with SAP router)

    Hi!
    I would like to set up a RFC-connection from SAP Solution Manager to other SAP system.
    The network connection between the servers is VPN.
    How can I set up this RFC-connection, if my connection between two SAP systems looks as follows,
    (I use the following SAP routers)?
    my server  --> customer
    my server --> internal SAP Router server xy (10.101....) --> SAP Router customer 2 (10.1....) --> SAP System customer (134....)
    Back-way
    SAP Systeme customer --> SAP Router customer (134.1....) --> internal SAP router (212.6....) --> my server
    How can I set up this RFC-connection, if my connection between two SAP systems looks as follows,
    (I use the following SAP routers)?
    something like:
    /H/10.101..../S/sapdp99/H/10.1.4..../S/sapdp99/H/134...
    Thank you very much!
    regards
    Thom

    Same answer as in the other forum where you cross posted....

  • Calling web-service from non-SAP client

    Hi,
    Could anyone here help me with the code with which we can call the non-SAP service in java from a java client.
    I have the wsdl and service deployed on the server.
    Regards,
    Manoj

    Hi Eduardo,
    We are trying to consume a non-SAP webservice (https based) which uses a certificate issued by the non-SAP web service provider for authentication.
    We tried consuming the web service using the Web Dynpro Java's Adaptive WebService Model method. We configured the Logical Destinations with X.509 client certificate authentication and have added the certificate to the WebServicesSecurity keystore.
    However, when we run the application, we get the 'Peer certificate rejected by ChainVerifier' error.
    Could you guide us on how to resolve the same ? If possible would you also provide the step-by-step details of how to create the EJB application that you did to achine this ?
    Any help is greatly appreciated.
    Thanks.
    Melwyn.

  • 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

  • DB Copy (MSSQL) between two SAP systems with different level and Components

    Hi,
    we have a SAP system release mysap 2004 SR1 and for "the upgrade project  to SAP ECC 6.0 " we installed a new mysap 2004 in a new hardware (sap03) where we have also solution manager running. The new installed Mysap 2004 SR1 is alos running fine in the new hardware.
    Now we would like to do DB copy from the old system (sap02) to the the new system sap03 and then we will do the upgrade to SAP ECC 6.0.
    After I compared the two systems I have following questions:
    1) there are 4 Software Components which are not in the new system (sap03). This are:
    PI
    FIN_BLERP
    BP_INSTRASS
    Is this necesary for the DB copy or we do not need this to be able to do the DB copy?
    2) The Software Components Level is not the same. Should we have the same level to do the DB Copy?
    Thanks in advance
    Best regards
    HanseAtik

    Hi Juan, hi Clas,
    just to be clear and to not stuck on the the way:
    The systems are as follow:
    1) the source system:
                         - Windows Server 2003,
                         - MSSQL Server 2005 with 32 bit.
                         - Mysap 2004 SR1
    2) Target system:
                       - Windows Server 2003
                       - MSSQL Server 2005, with 64 bit.
                       - Mysap 2004 SR1 (with less Support package level and no PI, FIN_Basis, BP_BLERP and BP_INTASS coponents)
    I hope this will work. could you post the link the DB Copy guide we are talking about?
    By this way we will be sure that we are talking about the same DB Copy. Otherwise any mistake in this step will cost more work and time.
    Thanks in advance
    Best regards
    HanseAtik

  • CX_SY_CONVERSION_NO_DATE_TIME:XSLT exception when calling Web Service

    I have created a Web Service on our Sandbox SAP server and am attempting to call it from our DEV SAP Server.  The returning structure contains date fields that sometimes are null. A null date field in SAP is equal to 00000000.
    When I call the Web Service and the date values are null, I get the following exception:
    CX_SY_CONVERSION_NO_DATE_TIME:XSLT exception.An error occurred when deserializing in the simple transformation program /1SAI/TXS982F8A669D1A54B7AD0D.
    Value 0000-00-00 is not a valid date in accord with the XML format for ABAP
    I would not expect to see this type of error, sense the call is between two SAP systems. 
    Is there anyway to fix this without moving space to any null date field in the function module?
    That's kind of annoying to do sense I have so many date fields.
    Example:
    IF date1 IS INITIAL.
        MOVE space TO date1.
    ENDIF.
    IF date2 IS INITIAL.
        MOVE space TO date2.
    ENDIF.
    IF date3 IS INITIAL.
        MOVE space TO date3.
    ENDIF.
    IF date4 IS INITIAL.
        MOVE space TO date4.
    ENDIF.

    Hi All,
    I got a solution for this exception. Hope it will help to all facing this problem.
    I was using proxy created from SE80.
    In my proxy for exporting parameters of methods I have changed all date fields.
    Earlier it was having Techn. type under Attributes of fields : XSDDATE_D. I chnaged this to DATS.
    It worked fine.
    Manish

  • How to do web services between applications

    I have tried to get a complete example about how to do a web service between two applications
    but I saw all the put examples that describe only how to do a web service and test it in the same application.
    Please, I want to see a whole example that shows a web service between two applications.

    Hello,
    Are you looking for any specific JHeadstart webservice functionality? If not, can you please ask this question at the JDeveloper forum of OTN?
    Thanks!
    Evert-Jan de Bruin
    JHeadstart Team

  • Connection between 2 SAP system

    Hi.
    I want to send and receive an IDoc between two SAP system. but i can't connected to an other syestem. i try it juste between two different mandant.
    Can some one help me.
    Thinks.
    Issam

    Hi,
    Through RFC (SM59) u can connect the TWO SAP systems.........
    If u are in SAP 4.7 , once u enter into SM59 u will be finding the R/3 Connections... U have to choose that...
    if u are in SAP ECC , then u will be finding the ABAP connections.. U need to choose that and create the RFC connection.....
    But U need to know the details :
    1. Target Host Name .
    2. System Number.
    3. Logon details...
    Reward Points if useful
    Raghunath.S
    9986076729

  • 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

  • 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

  • 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

Maybe you are looking for