Skip to Content
author's profile photo
Former Member

XI 2.0: Expose BAPI/RFC as Web Service How To


I'm struggling to configure the above szenario using

XI 2.0.

Can someone please point me to some step-by-step instructions on how to expose a BAPI/RFC as a

Web Service via XI?

Thanks in advance!


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Mar 07, 2005 at 09:41 AM

    Hi Torsten,

    Please have a look at the Web application Server--> Web Services. You see at the startpage already some documents wich describe how to generate a webservice from a function module!

    Also some E-learning studies:

    please look at below link!

    Also check the articles on SDN about webservices.



    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Mar 07, 2005 at 10:19 AM

    Hi Torsten,

    I recognize your question marks as a couple of months ago I also had the same situation here.

    Going back to your question; First, I assume you want to expose your BAPI/RFC through XI 2.0 and not directly from the Web AS.

    If that's the case then you need to do a lot of manual/custom work by yourself. For instance, you'll need to setup your own WSDL file or even worse... code your own Web service client in order to access the web service.

    Steps to follow in a nutshell:

    1) Create an Outbound Synchronous interface in your SWC.

    2) Create Message types/data types for the web service request and response structures.

    3) Interface mapping/message mapping from web service request to BAPI/RFC request. & from BAPI/RFC response to Web Service response.

    3a)Configure business scenario etc...

    4) Configure SOAP and RFC adapter. You will need both to establish this interaction.

    5) Configure your web service client to send/receive SOAP envelopes to the web service running on XI.

    6) Test it and you are done!

    Good Luck!


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Torsten,

      The BAPI request/response messages are available in the repository when you import the BAPI as imported object in your Software Component. So there's no need to import any XSD in this case, at least not for the BAPI. You only need to define new types for you web service request/reponse messages.

      Regarding how to generate/export the WSDL file; I remember I wasn't able to export it from the directory. It seems that in XI 2.0 there is a rule that says that for interfaces using the IDOC or RFC adapter no Web Service can be generated for them.

      However, you can try to export it directly from the repository, where you can select the object you want to generate a WSDL file from and save it (Tools-> Export WSDL) on your system.

      Due to incompatibilities in the generated WSDL, I personally opted for a own custom Java Web Service client solution that directly calls the URL where the web service is running and passes a SOAP envelope (containing the payload) to it via HTTP.

      Hope this helps, good luck!


      PS: My SOAP request looks like this:

      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

      <!-- Inbound Message -->



      <CompanyCode xsi:type='xsd:string'>UK20</CompanyCode>

      <Customer xsi:type='xsd:string'>0000000020</Customer>

      <KeyDate xsi:type='xsd:string'>20050206</KeyDate>