Consuming EJB Web Service in WD ABAP component

Hi,
I have a scenario where I have Portal KM access methods exposed as EJB Web Service. This web service is deployed on J2EE engine.
And I have to consume this web service from my WD ABAP component controller.
Any idea how this can be achieved?
Thanks and regards,
Amey

This doesn't really have anything to do with Web Dynpro.  Normal ABAP functionality is used for the consumption of a web service.  In ABAP we create a proxy class based off the WSDL of the web service.  This proxy class can then be called from within Web Dynpro like any other ABAP class.  You can read about consuming a web service in the online help:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9e/c7a3591dc74a679bbc9716354e42af/frameset.htm

Similar Messages

  • Consume External Web Service (WSDL) in ABAP (Release 700) - Proxy Error

    Hi All,
    Have a requirement to Consume an External Web Service in ABAP. We have the WSDL for Ext. Web Service.
    Did some research and came across the link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/69/8a1e9553dc4baba6026a3db510cadb/content.htm
    First tried to generate a 'Consumer Proxy'. Since external WSDL, used SE80 to generate the Consumer Proxy.
    But finally got Error Msg 'Incorrect value: XSD name space not available'! Could you please let me know:
    1) What is causing this error and how to rectify it?
    2) Is it possible to view the Proxy that I had created (which is in error)? is there a Proxy Editor?

    Hy Brad, I got the same error by trying to generate a 'Consumer Proxy' from a external WSDL. u2019Incorrect value: XSD name space not available'. I have solved it in this way: The report RSSIDL_DESERIALIZE_DEMO has the same check routines as the R3-Proxy Generator. I debugged this report using a saved external WSDL and compared it with using a saved WSDL (Server) generated under /nse80.
    -> In the WSDL, in part message the "type" isnu2019t allowed, because the dezerialization is done already.
    Coding, not working:
    <xsd:complexType name="OrderRequestMsg">
      <xsd:sequence>
         <xsd:element name="shop" type="xsd:string"/>
          u2026
      </xsd:sequence>
    </xsd:complexType>
    <message name=" OrderRequest">
      <part name="input" type=" tns:OrderRequestMsg"/>
    </message>
    Coding, working::
    <xsd:element name="OrderRequestMsg">
        <xsd:complexType>
           <xsd:sequence>
            <xsd:element name="shop" type="xsd:string"/>
       </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <message name="OrderRequest">
         <part name="input" element="tns:OrderRequestMsg"/>
    </message>

  • WebServices Creation and Consuming a Web Service in WDA ABAP

    Dear Experts,
    We are on SAP-ABAP Release 7.00 / SAP NetWeaver 2004s / SP19.
    Problems and Confusions galore.
    WebService Consumption
    We have been given an external webservice which need to be consumed. When I try to create a proxy thru SPROXY or thru SE80, it throws an error : Proxy Generation : Errors Occured (In German)/ Exception Occured in Library handler/ Not Implemented / No vendor specified.
    What am I doing wrong?? Any step by step !!! Pls. help.
    I have reached a point where I have absolutely no idea where to go.
    +WebService Creation for an RFC FM +
    WSDL created (later came to know its available by default), its visible in SOA Manager but execution doesn't throw up the screen wherein one can input field values to test the service. Although. the XML file is generated.
    Any help would be highly appreciated.
    Please Note :
    1> XI Framework is NOT available
    2> on Calling TCode : SPROXY, it shows "No connection to ESR"
    Thankx in advance.
    Regds,
    Srini

    Please post your questions in the correct forum. This forum is only for Web Dynpro ABAP related questions.

  • Proxy error when consuming External Web Service (WSDL) in ABAP

    Hi all,
    I am trying to consume an external WS in ABAP but I have some issues :
    1. Is it allows to use tag <xsd:complexcontent> with restrictions and extensions in it ? If not, how can I replace it ?
    2. Do we need to still change the <complexType> structure such as :
    Coding, not working:
    <xsd:complexType name="OrderRequestMsg">
    <xsd:sequence>
    <xsd:element name="shop" type="xsd:string"/>
    u2026
    </xsd:sequence>
    </xsd:complexType>
    <message name="OrderRequest">
    <part name="input" type=" tns:OrderRequestMsg"/>
    </message>
    Coding, working::
    <xsd:element name="OrderRequestMsg">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="shop" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <message name="OrderRequest">
    <part name="input" element="tns:OrderRequestMsg"/>
    </message>
    3. When I am testing the WSDL they send me in SOAPUI, I don't have any issue but when I am trying to integrate in ABAP, it is blocking on an URL saying it cannot find it  (the URL http://fk.se/SHS/xsd/tanden)
    <xsd:schema version="20110317" targetNamespace="http://fk.se/SHS/xsd/tanden" xmlns:tns="http://fk.se/SHS/xsd/tanden" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" elementFormDefault="qualified" attributeFormDefault="unqualified">
    Do I need to change something ? Since when I am modifying it, it cannot find the type reference afterwards...
    Thanks in advance for your answer.

    Hy Brad, I got the same error by trying to generate a 'Consumer Proxy' from a external WSDL. u2019Incorrect value: XSD name space not available'. I have solved it in this way: The report RSSIDL_DESERIALIZE_DEMO has the same check routines as the R3-Proxy Generator. I debugged this report using a saved external WSDL and compared it with using a saved WSDL (Server) generated under /nse80.
    -> In the WSDL, in part message the "type" isnu2019t allowed, because the dezerialization is done already.
    Coding, not working:
    <xsd:complexType name="OrderRequestMsg">
      <xsd:sequence>
         <xsd:element name="shop" type="xsd:string"/>
          u2026
      </xsd:sequence>
    </xsd:complexType>
    <message name=" OrderRequest">
      <part name="input" type=" tns:OrderRequestMsg"/>
    </message>
    Coding, working::
    <xsd:element name="OrderRequestMsg">
        <xsd:complexType>
           <xsd:sequence>
            <xsd:element name="shop" type="xsd:string"/>
       </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <message name="OrderRequest">
         <part name="input" element="tns:OrderRequestMsg"/>
    </message>

  • Consuming Cloud Web Services (SFDC) from ABAP

    We are implementing a project where we integrate with SalesForce.Com (SFDC).
    We received the Salesforce.com Enterprise WSDL API and created an ABAP proxy based on it.
    http://www.salesforce.com/us/developer/docs/api/index.htm
    However we have 2 issues with the WSDL:
    1) The WSDL uses Complex Types with Extensions.  Apparently SAP doesn't support this.  We think we can get around this by manually updating the WSDL to only use the types that we are currently interested in.
    2) The process to use one of the methods in the service (query, etc.) you first have to log into SFDC using the logon service.  This returns a session ID and a session URL.  Both of these fields need to be used on subsequent method calls from the API.  Passing the session ID in the header is not an issue, however, the URL on subsequent calls needs to be dynamically changed based on the logon result.  I am not aware of a way to dynamically change the end point that is configured in LPCONFIG or SOAMANAGER at runtime.
    Does anyone know how to work around these issues?
    If SAP doesn't currently support this, as cloud computing becomes more prevalent SAP is going to have to support both of these options in the future.
    Thanks,
    Jeff

    For the first issue, we've chosen to use the "partner wsdl" and not "enterprise wsdl".
    The second part of the second issue seems to be not possible so far. We are researching on it.
    An update on the second bullet. We talked to SAP in this regards and they responded back that it's not possible using SAP Webservice framework.
    I guess either we should use PI or we should build a custom program to create http message from scratch.

  • Error consuming Web service from an ABAP Program

    Hello guys,
    I'm trying to consume a Web Service that is exposed in the internet. The conecction to the Web Service its via SSL.
    I'm having a problem at the moment I call the web service from my abap program.  But I'm able to test the same web service, from the SE80 tx with out trouble.
    I have identify that there is a difference in the SOAP envelope, that its received in the Web service, when I call it from the test enviorment and when I call it from the program. 
    This is how it is received from the TEST tool (a succesfull call of th WS) :
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;Mensaje&gt;&lt;RutEmpresa&gt;&lt;Numero&gt;76555400&lt;/Numero&gt;&lt;Digito&gt;4&lt;/Digito&gt;&lt;/RutEmpresa&gt;&lt;RutUsuario&gt;&lt;Numero&gt;12307972&lt;/Numero&gt;&lt;Digito&gt;8&lt;/Digito&gt;&lt;/RutUsuario&gt;&lt;Convenio&gt;58422&lt;/Convenio&gt;&lt;Pin&gt;aro79728&lt;/Pin&gt;&lt;Archivo&gt;&lt;Tipo&gt;PPR&lt;/Tipo&gt;&lt;Plantilla&gt;2142970592&lt;/Plantilla&gt;&lt;Nombre&gt;cargatest174.txt&lt;/Nombre&gt;&lt;Cuerpo&gt;&lt;![CDATA[G126919727     JORGE CRISTIAN VARGAS ROMERO                                                     0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000   2910200714082008Boletas honorarios|]]&gt;&lt;/Cuerpo&gt;&lt;/Archivo&gt;&lt;Fecha&gt;20080814&lt;/Fecha&gt;&lt;/Mensaje&gt;</body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
    And this is how  it is received when I consume the web service from the ABAP program.
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body>&lt;?xml version="1.0" encoding="utf-8" ?&gt;&lt;nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"&gt;&lt;body&gt;&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;Mensaje&gt;&lt;RutEmpresa&gt;&lt;Numero&gt;76555400&lt;/Numero&gt;&lt;Digito&gt;4&lt;/Digito&gt;&lt;/RutEmpresa&gt;&lt;RutUsuario&gt;&lt;Numero&gt;12307972&lt;/Numero&gt;&lt;Digito&gt;8&lt;/Digito&gt;&lt;/RutUsuario&gt;&lt;Convenio&gt;58422&lt;/Convenio&gt;&lt;Pin&gt;aro79728&lt;/Pin&gt;&lt;Archivo&gt;&lt;Tipo&gt;PPR&lt;/Tipo&gt;&lt;Plantilla&gt;2142970592&lt;/Plantilla&gt;&lt;Nombre&gt;cargatest174.txt&lt;/Nombre&gt;&lt;Cuerpo&gt;&lt;![CDATA[G126919727 JORGE CRISTIAN VARGAS ROMERO 0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000 2910200714082008Boletas honorarios|]]&gt;&lt;/Cuerpo&gt;&lt;/Archivo&gt;&lt;Fecha&gt;20080814&lt;/Fecha&gt;&lt;/Mensaje&gt;&lt;/body&gt;&lt;/nr1:putXMLDocument&gt;</body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
    As you can see, it is generating a nr1:putXMLDocument tag, that it should not go there.
    Why do you think that this situation is happening? Please guys, this is very important, and need your help.  Thanks in advance.
    Samuel.

    BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    Calling WebServices from ABAP via HTTPS
    Consuming Web Service from ABAP by Durairaj Athavan Raja
    Search on SDN wiki, and you will find above mentioned links.

  • Calling a web service in an ABAP code

    Hello Experts,
          Is it possible to consume a web service in an ABAP code?
    Note: I am using SAP R/3 4.7.
    Thanks!
    Jeffrey

    Do you mean opening the web browser through our ABAP source code?
    If yes, then please use the function module: "CALL_INTERNET_ADDRESS". This will do the job for you..
    Reward points if I have helped you.
    Regards

  • Consume a Web Service: No receiver could be determined

    Hello,
    I have a successful running Web Service on a JAVA stack. Now I want to consume this web service within the ABAP Stack. For this purpose I generated the appropriate proxy object from the WSDL.
    However, while running my ABAP test program I am receiving an error: RCVR_DETERMINATION.NO_RECEIVER_CASE_BE No receiver could be determined
    Does anybody know, what to do? Do I need to register the generated proxy somewhere? Or what went wrong?
    Best Regards!

    you dont need to do any settings in LPCONFIG
    just create client proxy and <b>activate</b> the proxy class
    then in LPCONFIG
    enter the client proxy name and port name (port name can be any text) and check the checkbox "default" and click create and activate the same.
    now you are ready to consume the webservice.
    Regards
    Raja
    assigning points to helpful answers by choosing the appropriate radiobuttons in the answers in the SDN way of saying thanks.

  • 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

  • ABAP code and konfiguration for consuming secure web services

    I need some help/links on how to create an abap program (on 4.6 or WAS 620, or 640 if not possible in older releases) to consume a web service with authentication using certificates based on WS security  (<a href="http://www.oasis-open.org/committees/wss">http://www.oasis-open.org/committees/wss</a>) or client certificates. The request must include attachment in DIME or base64 format (preferably DIME).
    On 4.6 I have used the FM HTTP_POST with the if_ixml interface to consume web services, but I don't know if it can handle https authentication and attachements.
    Message was edited by: Robert

    check out this weblog.
    <a href="/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https">Calling WebServices from ABAP via HTTPS</a>
    Regards
    Raja

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

  • Problem consuming web service created by ABAP via standalone java client

    I'm trying to consume web service created by ABAP in R3 system via standalone java client. I should be getting a string reply after consumed the web service (ZSMS_INBOUND), but so far i received null. I cant find any exception or log to trace the problem. Any help would be appreciated. Is there anything wrong with my client calling the web service?
    public void myMethod{
              // TODO : Implement
              try{
                   Stub stub = (Stub)new ZSMS_INBOUNDServiceImpl().getLogicalPort();
                   stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,"http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap-               client=100&wsdl=1.1&mode=sap_wsdl");
                   inboundService = (ZSMS_INBOUND) stub;
                   BAPIRET2 str = inboundService.ZSMS_INBOUND(date, message, modemId, smsId, tel, time);
                   ackDeliveryArray<i> = str.toString();
              }catch (Exception e) {
                   e.printStackTrace();
    Generated following SAP help standalone proxy creation steps.
    ***files fr SEIs
    ZSMS_INBOUND.java   (interface)
    ZSMS_INBOUNDService.java  (interface)
    ZSMS_INBOUNDServiceImpl.java
    ZSMS_INBOUNDSoapBindingStub.java
    ***files fr Proxy classes
    ZSMS_INBOUND.java
    ZSMS_INBOUNDResponse.java
    BAPIRET2.java
    .... many more files
    the wsdl is as below (generated by ABAP):
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:n0="http://www.sap.com/webas/630/soap/features/authentication/" xmlns:sap="http://www.sap.com/webas/630/wsdl/features" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:sap-com:document:sap:rfc:functions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <wsdl:types>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">
    - <xsd:simpleType name="char1">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="1" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char10">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char17">
    + <xsd:restriction base="xsd:string">
      <xsd:maxLength value="17" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char170">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="170" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char20">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="20" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char220">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="220" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char30">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="30" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char32">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="32" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="char50">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="date">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      <xsd:pattern value="\d\d\d\d-\d\d-\d\d" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="numeric3">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="3" />
      <xsd:pattern value="\d*" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="numeric6">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="6" />
      <xsd:pattern value="\d*" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="time">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="8" />
      <xsd:pattern value="\d\d:\d\d:\d\d" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:complexType name="BAPIRET2">
    - <xsd:sequence>
      <xsd:element name="TYPE" type="tns:char1" />
      <xsd:element name="ID" type="tns:char20" />
      <xsd:element name="NUMBER" type="tns:numeric3" />
      <xsd:element name="MESSAGE" type="tns:char220" />
      <xsd:element name="LOG_NO" type="tns:char20" />
      <xsd:element name="LOG_MSG_NO" type="tns:numeric6" />
      <xsd:element name="MESSAGE_V1" type="tns:char50" />
      <xsd:element name="MESSAGE_V2" type="tns:char50" />
      <xsd:element name="MESSAGE_V3" type="tns:char50" />
      <xsd:element name="MESSAGE_V4" type="tns:char50" />
      <xsd:element name="PARAMETER" type="tns:char32" />
      <xsd:element name="ROW" type="xsd:int" />
      <xsd:element name="FIELD" type="tns:char30" />
      <xsd:element name="SYSTEM" type="tns:char10" />
      </xsd:sequence>
      </xsd:complexType>
    - <xsd:element name="ZSMS_INBOUND">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element name="DATE" type="tns:date" />
      <xsd:element name="MESSAGE" type="tns:char170" />
      <xsd:element name="MODEMID" type="tns:char10" />
      <xsd:element name="SMSID" type="tns:char17" />
      <xsd:element name="TEL" type="tns:char20" />
      <xsd:element name="TIME" type="tns:time" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
    - <xsd:element name="ZSMS_INBOUNDResponse">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element name="RETURN" type="tns:BAPIRET2" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="ZSMS_INBOUND">
      <wsdl:part name="parameters" element="tns:ZSMS_INBOUND" />
      </wsdl:message>
    - <wsdl:message name="ZSMS_INBOUNDResponse">
      <wsdl:part name="parameters" element="tns:ZSMS_INBOUNDResponse" />
      </wsdl:message>
    - <sap:Feature name="design_0" uri="http://www.sap.com/webas/630/soap/features/authentication/">
    - <sap:Property qname="n0:AuthenticationLevel">
      <sap:Option value="n0:None" />
      </sap:Property>
      </sap:Feature>
    - <wsdl:portType name="ZSMS_INBOUND">
      <sap:useFeature feature="tns:design_0" />
    - <wsdl:operation name="ZSMS_INBOUND">
      <wsdl:input message="tns:ZSMS_INBOUND" />
      <wsdl:output message="tns:ZSMS_INBOUNDResponse" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="ZSMS_INBOUNDSoapBinding" type="tns:ZSMS_INBOUND">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ZSMS_INBOUND">
      <soap:operation soapAction="" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="ZSMS_INBOUNDService">
    - <wsdl:port name="ZSMS_INBOUNDSoapBinding" binding="tns:ZSMS_INBOUNDSoapBinding">
      <soap:address location="http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap-client=100" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

    I'm now able to consume the web service, but with the error as below:
    Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
    Error Message is :com/sap/guid/GUIDGeneratorFactory
    BAPIRET2 mappingInfo:
      TYPE   TYPE   false   false   11
      ID   ID   false   false   11
      NUMBER   NUMBER   false   false   11
      MESSAGE   MESSAGE   false   false   11
      LOG_NO   LOG_NO   false   false   11
      LOG_MSG_NO   LOG_MSG_NO   false   false   11
      MESSAGE_V1   MESSAGE_V1   false   false   11
      MESSAGE_V2   MESSAGE_V2   false   false   11
      MESSAGE_V3   MESSAGE_V3   false   false   11
      MESSAGE_V4   MESSAGE_V4   false   false   11
      PARAMETER   PARAMETER   false   false   11
      ROW   ROW   false   false   11
      FIELD   FIELD   false   false   11
      SYSTEM   SYSTEM   false   false   11
    My java code is :
    public class MyTest {
         public static void main(String[] args){
              try{
                             Stub stub = (Stub)new ZSMS_INBOUNDServiceImpl().getLogicalPort();
                             stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,"http://mytest:8080/sap/bc/srt/rfc/sap/ZSMS_INBOUND?sap-client=100");
                             ZSMS_INBOUND inboundService = (ZSMS_INBOUND) stub;
                             BAPIRET2 str = inboundService.ZSMS_INBOUND(param1,param2,param3,param4,param5,param6);
                             System.out.println(str.toString());
                             }catch (Exception e) {
                                  e.printStackTrace();

  • 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

  • Handling of SOAP Faults in SOAP Clients consuming PI Web services

    Hi there,
    the following is in regards to SOAP fault error handling in a SOAP client that consumes a Web Service published by PI.
    I have been reading a number of threads and blogs in regards to this topic and I am still left with some open questions which I hope to get some final answersclarifications through this thread.
    In particular the blogs
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI      - Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
    XI: Propagation of meaningful error information to SOAP Client     - XI: Propagation of meaningful error information to SOAP Client
    have caused by attention.
    Both of these threads are realating to the Fault Message type one can use to return errors back to a SOAP Client (.Net, Java, etc.).
    In our scenario we published a number of Web Services through PI that provide functionality to integrate with an R3 back-end system using inbound ABAP Proxies.
    The services are standardised and will be consumed by a number of .NetJava applications and systems. The reason for the use of ABAP proxies is the customer specific application logic that is executed in the backend system. The Web services are synchronous and don't use ccBPM in the middle. Transformations are performed in PI combined with various lookups to set default values before the message is passed into the ABAP Framework of the R3 back-end system. The lookups are done against the R3 back-end system using the PI RFC Lookup feature.
    The inbound proxies currently return application errors as part of the response message back to the SOAP client. For more critical errors we introduced the use of Fault message types as the method to return the information back to the SOAP Client. This is all working satisfactory.
    The questions I have are as follows.
    1. When an error occurs at the IE level (e.g. mapping error), ABAP Proxy framework level (e.g. conversion from XML to ABAP format) or Adapter Framework level (Adapter releated error) a different SOAP fault message structure is returned to the SOAP Client than the one    used for the application errors. The SOAP fault message structure used in this case is the standard SOAP fault used by PI to return system errors back to the caller. For those SOAP fault messages there is no payload generated that could be mapped to the SOAP fault structure used for the application errors. This would be preferrable as there would be only one Fault message structure used for both inbound ABAP proxy generated fault messages and PI generated fault messages.
    Also the error messages generated by PI can be quite cryptic and difficult to interpret at the client end and could be filtered     ranslated during message mapping if the payload of the PI generated SOAP fault message could be accessed in a message mapping.
    Point 3 of the above thread 2759 indicates that this would be possible but doesn't outline how. Could somebody please clarify this for me as I don't believe that this is really possible ???.
    My idea instead was to use the PI SOAP fault message structure to also return application errors. Therefore I would create a Fault message type that matches the PI SOAP fault structure. This would enable the SOAP Client to handle only one SOAP Fault error structure. Would that be something to look into instead ?????.
    2. We have been looking at using the integrated WEB AS SOAP adapter instead of using the AF Sender SOAP adapter. While playing with this we encountered differences in the content returned through the SOAP fault generated by PI. A sample is below. Shouldn't the content of these SOAP faults be the same if the error that caused it is the same. Also the SOAP fault returned by the IE SOAP adapter is much more    useful in this particular case. Both errors below are the same, a conversion error from XML to ABAP took place in the inbound ABAP proxy framework of the back-end system.
    SOAP fault returned when using SOAP Sender adapter of AF
    <!see the documentation>
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>ADAPTER.JAVA_EXCEPTION</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
         at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    SOAP fault using integrated SOAP adapter of PI IE
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>System Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context/>
                   <code>ABAP.PARSE_APPLICATION_DATA</code>
                   <text>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXSBE20FF604BAFEF8D990A XML Bytepos.: 564  XML Path: ns1:CreatePORequest(1)POHEADER(2)COMP_CODE(1) Error Text: Data loss occurred when converting ############################## Kernel ErrorId: CONVT_DATA_LOSS))</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    I have been reading threads for hours without being able to find one that answers questions 1 or provides a blog that outlines the approach one should take for error handling in SOAP clients that consume PI Web Services (and covers both PISystem generated faults and faults raised in Proxies).
    There may already be a blog or thread and I just missed it.
    Any comments are welcome.
    Thanks. Dieter

    Hi Dieter,
    As Bhavesh already mentioned fault messages are used for application errors. The same is described in SAP XI help:
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    In case of system error (e.g. field length too long in proxy call or error in XI/PI mapping) there seems to be no standard way of handling it and propagating the response to the consumer of webservice.
    Each system error is not recognized by SOAP adapter and SOAP adapter exception is raised.
    The only bizzare solution that I can see is developing an adapter module and transport wrong message to standard fault message before delivering it to adapter engine:
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    Kind regards,
    Wojciech
    btw nice thread

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

Maybe you are looking for

  • MacBook Pro 13 or MacBook Air 13 to last 6 years

    I'm just about to start Year 12 and I need a laptop that will last me through to the end of uni in 6 years. I can't decide between the base Pro (i5) or the top end Air (i5 256GB). It will be my only machine and I will put Windows 7 on it as soon as I

  • Polling a JMS Queue

    Hi, I am new to ODI,my scenario is that I want to poll a JMS Queue, from ODI for messages, and once I receive the message I want to persist it in DB, I need help to make this work. Thanks, Rahul

  • Graphic error while opening

    When I first open CS6 I receive a graphics error message. I close the error message and photoshop seems to be working fine, but oilpaint will not work. I receive another error message when I try to use oilpaint. Here is my system info: Adobe Photosho

  • Runtime Error:  R6002 Floating Point Supported Not Loaded Error

    I receive a Microsoft Visual C++ Runtime Library Error when I attempt to access the iTunes Store. Can someone please help me solve this problem.

  • Opening rpt - using IE

    Post Author: bestwestern CA Forum: General Hey, Currently, our end user's run Crystal Reports from one of our website's. The reports run fine without problems. A user of this has asked the question: Can they save this .RPT to their desktop and run it