Web Services in B1if

With the version 1.5.4 B1if provides the Web Service Atom. It allows you to create a web service call in the processing flow just based on its WSDL.

The Web Services Description Language (WSDL, pronounced ‘wiz-del’) is an XML-based language that provides a model for describing Web services. It is a standardized interface definition for a Web service and describes the complete connectivity, e.g. the URL to call, it describes the ports and methods, provided by the Web service. It also provides the schema definitions for the request and the response document by XSD schemas (XML Schema Definition).  

The idea is that the Web service provider hands over the WSDL to the Web service consumer. No longer big questions and discussions about the interface as the WSDL gives you all information you need. Although the WSDL contains all information, in reality you need to understand the complex structure of a WSDL and XSD if you want to create the Web service call out of the WSDL definition.

The B1if Web Service Atom is interpreting the WSDL for you. You do not need to understand WSDL and XSD. Let’s assume as a sample, a friend sent you a link to a WSDL, describing an interesting Web service, available via internet free of charge. A sample could be the URL:


By calling this url you will load the WSDL for a Web service that allows you to get detailed bank information for all German banks by sending a bank code (BLZ = Bankleitzahl). If you input this URL into the browser you will see the WSDL, displayed in your browser. But how to use this in B1if?

Let’s create a small sample scenario. When you click the [Processing] button in the screen ‘Scenario Step Definiton’, the graphical flow designer will display the automatically created flow, consisting out of the one final atom. Click on the ‘Add Atom’ icon on the start atom and add the atom ‘Call Web Service’. The atom ‘soapCall’ will be created (atom1) and automatically a predecessor transformation atom ‘xform’ (atom2).

Processing Flow

Processing Flow

Now click the edit icon (pencil) of the soapCall atom and click the [Load] button in the opening screen. A small selection box asks you to select the location from where you want to load the WSDL. This can be the File System, the Bizstore (B1i internal xml persistency) or the Web. We select the option ‘Load from Web’, the input screen opens, we type in the URL and click the [Submit!] button. Immediately the WSDL is loaded from the web and stored in the base directory of the Scenario Step.

Now we can click the [Generate] button in the edit screen. The generator is interpreting the WSDL. In case there are multiple ports, it pops up a selection box to allow you to select the one you want. In case there are multiple methods defined for the selected port, it pops up a selection box to allow you to select the one you want. In our example we choose the port ‘BLZServiceSOAP11port_http’. As only one method is available for this port no more selection box will pop up and all the connect information and the request document is generated automatically into the XSL document, assigned to the predecessor transformation atom. For a first run we need to open this XSL (atom2.xsl) via WEBDAV in a separate XML editor or just by clicking on the xform atom in case you are working with an embedded XML editor.

You’ll see all the connection parameters and the request document sample, generated automatically based on the schema information in the WSDL.


Generated atom2.xsl

There are multiple options in the XSD part of the WSDL  to describe the schema of the request document. It allows to specify e.g. min/max occurrences, enumeration, value type, exact pattern for a value, etc. The B1if generator is using all available information to describe how to provide the request document for this call, however the detailed information in the WSDL is optional and it’s up to the Web service provider to fill all details in the WSDL. In our example we’ll find the request document, requesting the one parameter <blz>. In the body the generator created the type information ‘string’, which is one of the detailed information provided by the WSDL. We just replace ‘string’ with a valid BLZ, e.g. ‘69070032’ and save the changes.

Now the Scenario Step to call the Web service is ready. Open the test environment by clicking the [Test] button and then click [Run]. Now the step is processed and you can open the graphical flow in debug mode by clicking the [Debug] icon. A window opens to display the debug flow. In the flow after the soapCall atom, we will find the service response in the message. Just click on the red arrow of the final atom.

Web service result

Web service result

This was a sample to demonstrate how to call any Web service within a B1if processing flow. For productive usage the BLZ is for sure not hardcoded in the xsl, but is e.g. picked up by <xsl:value of select=””/> or a variable.

In case you want to provide Web services to externals, you have to provide a WSDL to the service consumers. Also here you can do this without XSD and WSDL knowledge. The needed functionality is available via Scenarios->Setup->Tools. As all connect information will be needed to generate the WSDL, prerequisite is to setup and activate the Scenario Package first. There will be one WSDL file for each Scenario Package. Each Scenario Step, linked to this package which is of input type ‘Web Service’ will be a method in this WSDL.

As the XSD schemas for the request and response documents are part of the WSDL, the first step is to provide the XSD schemas for all Scenario Steps that you want to expose. You can do this manually or by generation based on sample inbound and outbound documents. You can put a sample inbound/outbound document manually into the base folder of the Scenario Step or you can use B1if to generate the test messages automatically (Maintenance->Cfg Dev Environment: check ‘Record test msg during processing’).

In case the XSD generator will not find a test message in the base folder, it will use as a fallback the last message of the Message Log. For this option you have to run each Scenario Step at least once so that for each step a Message Log entry will be available.

Once the XSD files are available, be it generated or manually, you can generate the complete WSDL. The WSDL generator will generate methods for all Scenario Steps, defined as Web services and with existing XSD schemas in their base folder. The WSDL will be displayed in your browser. You can store it in your File System and send it to the 3rd party system that wants to use your Web services.

Recommend this post to your contacts:

This entry was posted in B1if. Bookmark the permalink.

23 Responses to Web Services in B1if

  1. Robert Richardson says:

    Is there any source of reference where we can find out what version of the B1if is included with each SBO patch release? You say that this feature is available in B1if 1.5.4 but I cannot find out which SBO patch this is included in.



    • Heinz Pauly says:

      here we are:
      B1 8.8 PL12 – B1if 1.0.6
      B1 8.8.1. PL0 – B1if 1.0.6
      B1 8.8.1. PL 1 – B1if 1.3.0
      B1 8.8.1. PL 2 – B1if 1.3.5
      B1 8.8.1 PL03 – B1if 1.4.0
      B1 8.8.1 PL04 – B1if 1.5.0
      B1 8.8.1 PL05 – B1if 1.6.0
      B1 8.8.1 PL06 – B1if 1.6.2
      B1 8.8.1 PL07 – B1if 1.7.0 (planned)

      • Alex G says:

        Dear Heinz,
        is there any document describing the changes implemented in newer B1if versions included into 8.81 PLs? E.g. what is the difference between B1if 1.6.0 and 1.6.2? In the PL06 info file i found the only reference to B1i which is about the RFQ flow – does it mean this is the only change partners should be aware of in v1.6.2?

        • Heinz Pauly says:

          Dear Alex,
          you can open a list, displaying all new features/changes/fixes (separated by ‘-‘) of a particular version with B1if -> Maintenance -> System Info -> [Version Info]
          best regards – Heinz

  2. Maryam Gharib says:

    Thanks for providing the above document.
    I am currutly in the process of communicating with a webservice. after loading the url and hit the generate button, a selection of availble methods for the webservice is listed but after attempting to select any method(i.e. login), the following happens:
    error(no part linked to input message login)
    generation failed.
    I would appreciate if you could shed some lights on this issue.
    If this helps at all, i can share the .xls provided.
    Kind Regards,

    • Heinz Pauly says:

      Hi Maryam, please send the wsdl to me via email, so I can have a look to it tomorrow (today is pub holiday). thanx – Heinz

  3. Dear Heinz,
    Is it possible to modify SOAP call in a xform transformation step?
    I try to connect to external WCF Web Service but it doesn’t work out of the box as I get the error message:
    com.sap.b1i.xcellerator.XcelleratorException: XCE107 A SOAP-Fault was returned by the called party: HTTP-code: 500; HTTP-message: Internal Server Error; SOAP faultcode: a:InternalServiceFault; SOAP faultstring: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

    The problem is in the SOAP call which is sent from B1if:

    It doesn’t have required namespace http://tempuri.org/ and it lacks the called method. When I send such modified request from Fiddler I get proper reply:

    My question is how to achieve that?
    Thanks in advance
    Lukasz Chomin

  4. In my previous comment blogging system cut off SOAP messages due to its tags. I post them without these tags here.
    Original non working message sent by B1if:
    xml version=’1.0′ encoding=”UTF-8″
    SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”
    dummy xmlns=”” dummy

    Modified working message:
    SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:tem=”http://tempuri.org/”

    • Maryam says:

      Hi All,
      Apologises to Heinz if I wasn’t supposed to post the following relevant issue to what Lukasz Chomin enquired on this page.
      I am experiencing the same problem when trying to call one of WCF web service methods and passing the right arguments. the B1if version is 1.6.2-881314 SP:00 PL:06
      I created a soap basic envelope using SOAP UI4 and can get the right reply using that enviroment but when i call the method using B1IF the following error message returns back:

      com.sap.b1i.xcellerator.XcelleratorException: XCE107 A SOAP-Fault was returned by the called party: HTTP-code: 500; HTTP-message: Internal Service Error; SOAP faultcode: SOAP-ENV:Server; SOAP faultstring: SOAP-ERROR: Encoding: Violation of encoding rules

      I only can find OUT_WS.ipo in the Framework.zip file, upgrade pack.

      I would appriciate your input on this.
      Kind Regards,

  5. Maryam says:

    Dear Heinz,
    I managed to find the answer to my problem. this was down to the name space declaration which should be declared where the Call node is .
    Many thanks,

  6. shikha says:

    Dear Heinz,

    I am trying to create the scenario as Web service to B1if.
    Do i need to use HTTP call in the Inbound channel description as i cannot see Web service call anywhere mentioned.
    I am really stuck up :(.

    Need your help with initial settings too.


    • Heinz Pauly says:

      Dear Shikha,
      If you want to create a Scenario Step which serves as a web service (to be called from outside), you specify the inbound channel as WebService. Please check the steps from B1 Mobile, e.g. sap.GetBPList.
      best regards

  7. shikha says:

    Dear Heinz,

    Thanks for the feedback!!
    Kindly share the link for B1 Mobile as i do not have access to Marketplace.


    • Heinz Pauly says:

      Dear Shikha,
      B1 Mobile is a Scenario Package, comming along with the normal installation. After installing B1if, you have it available in your B1if environment. All Scenario Steps, delivered by SAP are not encrypted. You can see all the details of the implementation. Please use the mentioned Scenario Step as an example for a web service.
      best regrads – Heinz

  8. shikha says:

    Dear Heinz,

    I am building an interface from SAP-PI to B1iF for Business Partner. SAP-PI sends out Web services message to B1if. When B1iF receives message from PI, we are receiving the below error.
    Source: Synchronous Web service
    Target: B1

    End to end testing is giving this error in B1if:
    no scenario step (vBIU) associated for this step for the incoming system (SysId)
    Any help on this is much appreciated.


    • Heinz Pauly says:

      Dear Shikha,
      you are calling into B1if, but the incoming call is not associated to a running Scenario Step. There can be two reasons for this:

      1. Your Scenario Package is not set up. In this case your incoming call cannot be answered. Setup you do with Scenarios->Setup. Here don’t use the existing WebService-Channel (SysId=001sap0003) as this is reserved for B1Mobile. Please create your own WebService entry in the SLD.

      2. Your Scenario Step identification does not fit to the incoming message. Scenario Step identification you specify in Scenarios->Step Design->Inbound->Channel. In case of a web service you can use the root-tag of the incoming message to link the incoming call to your Scenario Step. E.g. you define Identification Method=Root Tag and Identifier=myMsg. All incoming calls with an xml message with a root tag “myMsg” will now trigger your Scenario Step. If your logic is more complex, you can also identify the incoming message by any xPath statement.

      Hope this helps – best regards

      • shikha says:

        Thanks a lot Heinz, my scenario is working as expected:).
        Appreciate your quick responses !!


        • shikha says:

          Dear Heinz,

          I am trying anew scenario now that is from B1if to web service(via soap).
          i am receiving the error as :HTTP Header missing???

          I am not able to figure it out, the message is not able to reach at the destination.

          Please throw some light on the above error.
          Appreciate your quick response:).


          • Heinz Pauly says:

            Dear Shika, it seems this is coming from the side you are calling. Which soap version the receiver side does expect? Are there any detailed infos which kind of header is missing? thanks – Heinz

  9. Sergey says:

    Dear Heinz,

    I don’t know, is somebody post to you about this bug, but I found a next situation.
    1) Create b1 Atom (Web Service Call)
    2) Load WSDL description from web (it’s not important here the link for example – http://www.xignite.com/xCurrencies.asmx?WSDL )
    3) Generate web service call into linked xsl transformation atom (I’ll choose SOAP 1.1 GetHistoricalCrossRate function)
    4) At xsl transformation atom you’ll see next line:
    wich must be a

    It happens with all Web Services, having more, than one function.

    With the best wishes.

    • Heinz Pauly says:

      Dear Sergey,
      I followed the steps that you describe and the end result after generation in the corresponding xsl seems to be correct.

      <call xmlns="">
      <connect serviceport="XigniteCurrenciesSoap">
      <payload operation="">
      <GetHistoricalCrossRate xmlns="http://www.xignite.com/services/">
      <!--0 or many of these elements are allowed, order doesn't matter-->
      <query id="httpheader.???" value=""/>

      I set the 2 generated parameters (Symbol and AsOfDate) empty and ran a test. The test ended successfully and gave me some results.
      Are you talking about the generated SOAPAction? If yes – I changed the generated one to the one requested by you (http://www.xignite.com/services/http://www.xignite.com/services/GetHistoricalCrossRate). This will lead to the following error: com.sap.b1i.xcellerator.XcelleratorException: XCE107 A SOAP-Fault was returned by the called party: HTTP-code: 500; HTTP-message: Internal Server Error; SOAP faultcode: soap:Client; SOAP faultstring: Server did not recognize the value of HTTP Header SOAPAction: http://www.xignite.com/services/http://www.xignite.com/services/GetHistoricalCrossRate
      So I’m not sure what is wrong on your side. Please give me more details. Perhaps it’s related to your B1if version. I did my tests on version 1.10.0. The latest fix in the Web Service atom came with 1.7.3 and the support for soapcall generation to support parts, linked to simpleTypes and complexTypes came with 1.6.6.
      Hope this will help you
      best regards

Leave a Reply

Your email address will not be published. Required fields are marked *