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

Similar Messages

  • 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.

  • Initiate web dynpro from non-SAP system

    Hi all,
    My costumers are using a non-SAP system, and I need to open a SAP purchase order from this system (based on the order number). Is it possible to put in a link on the non-SAP system, that initiates a web dynpro pop up filed with a SAP purchase order?
    Please advise.
    Thanks

    Hi Thomas,
    WebDynpro is technology native to SAP. WebDynpro Application is developed, utilizing the runtime , libraries & underlining platform in the SAP system. However when webDynpro component is to be used, its consumed as a simple Web Application( i.e you have a URL to invoke it ), thus if you have a WEBDYNPRO application, with fair amount of knowledge of HTML & JAVAScript you can call the URL, which is going to display you the webdynpro application.
    so in effect a webdynpro application would appear as good as a webapplication that CAN be called on Browser from any where, but to build & change it you need SAP Netweaver.
    Greetings
    Prashant

  • 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

  • Consuming CRM Web Services via 3rd Party system

    Hi Gurus
    I've created an RFC Function Module which I converted to a Web Service
    I've used soapUI to test the Web Service and it's working perfectly.
    The 3rd Party wanting to use the Web Service is new to this technology and I'm not much better from a consuming point of view.
    What URL does the 3rd party need to call:
    WSD
    WDSL
    The Endpoint
    Or am I completely off.
    Many Thanks in advance
    Panduranga

    Hi,
    Your question does not make sense.
    If you have tested your web service successfully with SOAPUI, you do know the answer.
    The 3rd party needs to use the URL that you used for your SOAPUI test.
    Regards,
    Olivier

  • Consuming webserives in sap of Non sap system

    Hi Guys,
    I want to consume web services in sap of a non sap system (which is service provide) , but i am encountering a problem that how can I use WSDL file (which contains Service provider data) of service provide to use in abap code to use further, without PI, please guide in this regard as i followed different tutorial which only guide me communicate between two sap system, but i want consume web service of non sap system
    please help me as I am beginner,
    Thanks

    Hi Ravi ,
    Thank you so much  for your help, When I Wsdl url file is received from Service provide, and I am going to utilize this url to fetch data out of it then how Can I access method of this wsdl file to fetch accurate data?
    like the link you provided to me in this ,from where I got to know that GET_QUOTE
    CALL METHOD LV_QUOTE->GET_QUOTE
    is the wsdl file method.
    and second this I want to ask IS there  any need to parse xml to abap, or I just follow your tutorial  as it is you provided to me?

  • Regarding  the Service Registry in SAP  PI 7.1 and non SAP System ....!

    Hi All ,
    I  need to know answers for the below Question ...hope to get some answers frm Experts ....
    1) How to publish service from non-SAP systems?
    2)  How to use discovered service in the Service Registry for consumer/provider scenario? With some examples.
    Thanks in Advace ...!
    Regards ,
    Aziz khan .
    Edited by: Aziz khan on Sep 16, 2009 11:43 AM

    Hi,
    1) How to publish service from non-SAP systems?
    Publish Service is nothing but making WSDL of that service available. For that you need to Publish the WSDL of the web Service to UDDI. For Non SAP system, Lik .net , Java they have there oun APIs to do so. U can search on net to get it.
    For Ex. below link.
    http://www.startvbdotnet.com/web/publish.aspx
    2) How to use discovered service in the Service Registry for consumer/provider scenario? With some examples.
    Once you discover the services, you get the WSDL of that Service. Then You can import this WSDL in IR and you it.
    See the below links.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/26/9e97b0f525d743882936c2d6f375c7/frameset.htm
    Shweta

  • How to consume the Abap web service in Java web-dynpro

    Hi Everyone,
    I want to consume ABAP web service in java web dynpro.
    so when i tried to create model in java web-dynpro, it gave me an error message saying "Invalid WSDL or WSDL not found".
    i think this error message is because, to access the WSDL of abap web-service, we need username and password, but the dialog box in java web-dynpro is not programmed to take username and password from us and send it to the server to get the WSDL.
    i came to this conclusion because i was able to successfully test my abap web-service in java portal. the java portal asked me the username and password to open the WSDL.
    So, please help me to consume the abap web service in java web-dynpro.
    Thanks in advance
    Regards
    Vikas

    Hi Vikas ,
       while creating a model in web-dynpro try to use the "import web service model" option and if you are using local server choose the local server option so that you can get the available web services which are in server, select one among them and continue you process.I think this is the some what easy way .
    If you want use the URL for wsdl better to once test the available service in server and copy that WSDL URL and paste over  WSDL textbox.
    I think this is pretty help ful to you
    Best Regards
    Srikatnh

  • Consuming a web service on 4.6C

    Hi Folks!
    I'm pretty new to this subject. Is it possible to consume a web service in the Sap version 4.6C? If it is possible, can you give me a little example of how to do this?
    I have checked the weblog:
    /people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap
    However it doesn't work for 4.6C.
    Thanks for the help.
    Regards,
    Gilberto Li

    Hi again,
    Thanks for the help!
    I guess consuming a web service on 4.6C is not a natural thing to do, so I will have to think in a workaround.
    Thanks again.
    Regards,
    Gilberto Li

  • How to consume a web service provided by third party system from SAP system

    Hi Friends,
    Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
    Do we get an URL to create a client proxy for consuming the web service?
    Thanx in advance,
    Ram

    Hi Ram,
    of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
    <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
    which is the actual adress of the service.
    An example service can be found here:
    <a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
    containing the WSDL URL at
    <a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
    You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
    have fun,
    anton

  • Down-/Upload files via Web Services using a NON-SAP system!?

    Hello,
    is it possible to down-/upload files via web services using a NON-SAP system!?
    Regards,
    Jens

    Hi Jens,
    I am not sure about your requirement here. What i could understand is that you want to check whether service could handle file processing?
    1) Uploading file - You can build a Webservice which has import/export parameters as the file structures and implement the proxy class in such a way that the passed data is written to application server.
    2) Downloading file - Same as uploading file, but the proxy class would have the code to extract data from the application server and pass them as output parameter.
    Functionality of Non SAP system: The system which calls these services should be able to convert the output of proxy data into file in case of downloading the file and it should be able to convert the file data into export parameters in case of uploading file.
    Hope this helps.
    Regards,
    Prasanna

  • Consuming a Web Service with ABAP in WAS 6.40 (SS3)

    Hi Everyone,
         Has anyone successfully consumed a web service (based on an EJB) that is published to the J2EE engine of their WAS 6.40 server by creating a proxy from the ABAP layer?
         We are encountering the following problem: When executing method of the proxy to call the Web Service on the J2EE engine, the CX_AI_SYSTEM_FAULT exception is triggered with the message "Unallowed RFC-XML Tag (SOAP_EINVALDOC)".
         This same problem has occurred with multiple web services, even though the proxy generation seems to execute without a problem.  Is there some system setting that could cause this?  We have run the SOAP Runtime trace, but only receive the same basic information about the problem.
         If anyone has any thoughts at all, I'd be grateful to hear them.
         Thanks,
            --Greg

    Hi,
    We encountered problems when consuming a foreign WS. It seems to be that RPC style WSDL isn't supported by the WAS 6.4 WS proxy. An interesting reading on this is
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/the difference between rpc and document style wsdl.article
    Eddy

  • Consuming  a Web Service with PasswordDigest Authentication in ABAP

    Hello,
    I need to consume a web service in ABAP from a non-SAP application. The web service uses wsse:UsernameToken with PasswordDigest in the SOAP Header for authentication. However, I havent seen any documentation for using Password Digest in ABAP.
    Is it possible to use Password Digest in ABAP?
    Thanks
    Ajay

    Hi Marc,
    Here is the ABAP Code to build the SOAP header.
    FUNCTION Z_GET_SOAP_REQUEST_HEADER.
    *"*"Local Interface:
    *"  EXPORTING
    *"     VALUE(ER_SECURITY_ELEMENT) TYPE REF TO  IF_IXML_ELEMENT
    *date and time data
      data: lv_sys_date like sy-datum,
            lv_sys_time like sy-uzeit,
            lv_year(4) type c,
            lv_month(2) type c,
            lv_date(2) type c,
            lv_hour(2) type c,
            lv_min(2) type c,
            lv_sec(2) type c.
      data : lv_created type string,
            lv_snonce type string,
            lv_b64nonce type string,
            lv_webservice_password type string,
            lv_webservice_userid type string,
            lv_spassword type string,
            lv_xpassword type xstring,
            lv_hpassword type hash160x,
            lv_b64password(255) type c,
            lv_xpasslen type i,
            lv_hpasslen type i.
    *xml declartions
      data : lv_sheader type string,
            lv_xheader type xstring,
            xml_document TYPE REF TO if_ixml_document,
            xml_root TYPE REF TO if_ixml_element,
            xml_element TYPE REF TO if_ixml_element,
            xml_node TYPE REF TO if_ixml_node.
    *get the c-link password.
    CALL METHOD ZCL_CDB_SYNC_CFG_READER=>GET_USERID_PASSWORD
      IMPORTING
        EV_USER_ID  = lv_webservice_userid
        EV_PASSWORD = lv_webservice_password
    *Evaluate created date time
      lv_sys_date = sy-datum.
      lv_sys_time = sy-uzeit.
      lv_year = lv_sys_date(4).
      lv_month = lv_sys_date+4(2).
      lv_date = lv_sys_date+6(2).
      lv_hour = lv_sys_time(2).
      lv_min = lv_sys_time+2(2).
      lv_sec = lv_sys_time+4(2).
      CONCATENATE lv_year '-' lv_month '-' lv_date 'T' lv_hour ':' lv_min ':' lv_sec '.000Z' into lv_created.
    *Create and encode the nonce
      CALL FUNCTION 'GENERAL_GET_RANDOM_STRING'
        EXPORTING
          NUMBER_CHARS  = 24
        IMPORTING
          RANDOM_STRING = lv_snonce.
      CALL METHOD cl_http_utility=>ENCODE_BASE64
        EXPORTING
          UNENCODED = lv_snonce
        RECEIVING
          ENCODED   = lv_b64nonce.
    *create the password to be sent to web service
      CONCATENATE lv_snonce lv_created lv_webservice_password into lv_spassword.
    *encode password to xstring
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          TEXT   = lv_spassword
        IMPORTING
          BUFFER = lv_xpassword.
      lv_xpasslen = xstrlen( lv_xpassword ).
      CALL FUNCTION 'CALCULATE_HASH_FOR_RAW'
        EXPORTING
          ALG      = 'SHA1'
          DATA     = lv_xpassword
          LENGTH   = lv_xpasslen
        IMPORTING
          HASHX    = lv_hpassword
          HASHXLEN = lv_hpasslen.
      CALL FUNCTION 'SCMS_BASE64_ENCODE'
        EXPORTING
          INPUT            = lv_hpassword
          INPUT_LENGTH     = lv_hpasslen
        IMPORTING
          OUTPUT           = lv_b64password
        EXCEPTIONS
          OUTPUT_TOO_SMALL = 1
          OTHERS           = 2.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * build the header
      CONCATENATE
    '<soap-env:Header xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">'
    '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
    '<wsse:UsernameToken wsu:Id="########" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'
    '<wsse:Username>'
    lv_webservice_userid
    '</wsse:Username>'
    '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'
    lv_b64password
    '</wsse:Password>'
    '<wsse:Nonce>'
    lv_b64nonce
    '</wsse:Nonce>'
    '<wsu:Created>'
    lv_created
    '</wsu:Created>'
    '</wsse:UsernameToken>'
    '</wsse:Security>'
    '</soap-env:Header>'
    INTO lv_sheader.
    *Build the xml header element
      lv_xheader = cl_proxy_service=>cstring2xstring( lv_sheader ).
      TRY.
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = lv_xheader
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            er_security_element ?= xml_root->get_first_child( ).
            gr_soap_security_header = er_security_element.
          ENDIF.
        CATCH cx_ai_system_fault .
      ENDTRY.
    ENDFUNCTION.

  • Consume External Web Service from ABAP

    Hello All,
    I have a Web Service existing on a Non R/3 system.
    I want to access this Web Service from my Development system (SAP 6.40).
    I created a Client Proxy pointing to this WSDL named "ZUSER_ARS_EXCHANGECO_UPDATE".
    I have created an FM to call this Web Service and update the data to it with the following code ->
    DATA: lv_proxy TYPE REF TO zuser_ars_exchangeco_update,
            ws_header TYPE REF TO if_wsprotocol_ws_header,
            sys_fault TYPE REF TO cx_ai_system_fault,
            appl_fault TYPE REF TO cx_ai_application_fault,
            lv_request TYPE zuser_ars_exchangecreate_soap1,
            lv_response TYPE zuser_ars_exchangecreate_soap.
      TRY.
          CREATE OBJECT lv_proxy
          EXPORTING
            logical_port_name = 'TO_ARS'
        CATCH cx_ai_system_fault .
      ENDTRY.
      MOVE-CORRESPONDING ip_userdata TO lv_request-parameters.
      TRY.
          CALL METHOD lv_proxy->create
            EXPORTING
              input  = lv_request
            IMPORTING
              output = lv_response.
        CATCH cx_ai_system_fault INTO sys_fault.
          IF sys_fault IS NOT INITIAL.
            RAISE proxy_create_system_fault.
          ENDIF.
        CATCH cx_ai_application_fault INTO appl_fault.
          IF appl_fault IS NOT INITIAL.
            RAISE proxy_create_appl_fault.
          ENDIF.
      ENDTRY.
    But when I am trying to execute, I am getting the error "cx_ai_system_fault " with the following Error Text -> "ARERR [149] Im Steuerungsdatensatz muss ein Benutzername angegeben werden." When translated to English, using Google, it is "ARERR [149] The control record must be a user name."
    The WSDL has a line as follows -> soap:header message="s0:ARAuthenticate"
    How do I pass the username and password to this "ARAuthenticate" parameter?
    Can someone please help me in getting this fixed?
    Thanks and Regards
    Gladson Jacob

    I created an HTTP RFC Destination to the WSDL URL and provided the username and password in the RFC Connection. And called the RFC Destination in the Proxy, instead of calling the URL directly in the proxy. But after that, I am getting some new errors, for which I have not received a solution yet. So, still stuck!!!
    For steps on creating a Proxy, I need to know the ABAP version your are using.

  • Consume a Web Service in ABAP

    Hi,
    We have a Web Service URL on PI. Run time of this Web Service in a Portal Server.
    We need to access the Same URL from ECC using ABAP Programming?
    Can any one tell me how we can call the same Web Service?
    I need to pass few values to the web service using ABAP Code and I need to get back the result into some variables.
    any code available for verify?
    Thanks,
    Sekhar.J

    Hi,
    Steps involved in Consuming a Web Service in ABAP.
    1. You will need to create a Service Consumer Proxy in the ECC system.
    The procedure for this is available in the documentation link [http://help.sap.com/saphelp_erp60_sp/helpdata/en/46/9743916d1115ece10000000a114a6b/frameset.htm] in the section Consuming a Web Service.. The URL access path of the WSDL can be used to generate the Service Consumer Proxy in ABAP.
    2. Using transaction SOAMANAGER create the Logical Port for the Consumer Proxy created in Step 1.
    3. Code the Consumer Proxy call in the ABAP program. Check section Consuming a Web Service --> Programming with Client and Server Proxies --> Sending a Message in the link specified above.
    The Video link [Consuming Services in ABAP |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/media/uuid/20eb3174-41ab-2a10-a383-907faf60eed3] will provide good conceptual knowledge, steps involved and Logical port maintenance..
    In case you face any problems, shoot your queries.
    regards
    Nitesh

Maybe you are looking for

  • Unable to remove Static Drop entry | 2960 Cam Table

    Hi all, I am facing a strange issue here on a production switch (Cisco 2960 IOS 12.2(55)SE5) I have the following entry in my cam table: switch#show mac add int gi0/10           Mac Address Table Vlan    Mac Address       Type        Ports 123    123

  • ITunes store won't recognize my new imac?

    iTunes store recognizes my new iMac as MacBook pro (2). I got rid of the MacBook. Also won't do auto sync with my ipad2. I have updated all store info on all devices. What can I do?

  • How do I create monthly remiders on a Nokia 5800 ?

    Hi, I am trying to configure monthly reminders on my phone via calendars. I am just seeing an 'Anniversary' option. Is there a generic 'New reminder' with monthly repeat ? Regards, MW

  • Stereo Not Available Error !

    Hello all, I used to get stereo to work with shutter glasses on my WinNT machine. But, today I installed a newer version of Java and Java3D and stereo stopped working. It gives me "Stereo not available" error. I tested my shutter glasses with another

  • Solaris 8/07 x86, wireless intel 2200bg networking

    Just finished a dvd-based install of solaris 8/07 x86 (not opensolaris) and everything good, except wireless networking. Before the install, I ran the suitability/compatibility tester and it vetted my wifi and everything else. ifconfig doesn't show m