How to generate a BizTalk schema for a SAP Web Service


I have several clients who own a SAP system, so I often develop integration flows that invoke BAPI exposed as Web Service. However, every time, I lose a lot of time in verifying the SAP configuration that allowed me to download the correct WSDL and generate a XSD schema. So, I decided to document every step, from the access to SAP to check the correct configuration up to the necessary actions on BizTalk side.


Configure the SAP logon settings


Start the SAP GUI program



Add new connection entry



Select “User Specified System”



There are two ways to access the SAP system, in this document I choose to connect directly to the application server.

Then, specify a connection Description, Application server name, Instance number and System ID.



Accept default settings and click Next



Select your language



At the end you have the configuration ready to use.



Access to SAP

To access SAP, use an existing connection or one configured previously specifying user and password



You should get an interface similar to that shown below



So specify “soamanager” in the command field



The SOA Management web interface appears. Click on “Web Service Configuration”



Search the BAPI you want to generate a WSDL



Select the BAPI and click on “Apply Selection”



You must be sure that the “WSDL format” section is set to “Standard”. Unlike the wizard of visual studio will not be able to generate correctly the XSD schema and the bindings file.



Click on “Open WSDL document for selected binding or service”



The Internet browser appears with the WSDL. Save the file to a folder.




Open the BizTalk Visual Studio project and Add a generated items.



Select “Consume WCF Service”



Select “Metadata Files (WSDL and XSD)”



In the Metadata Files form, add the WSDL file that you had previously saved and then click Next



Specify a Namespace and click on Import



That’s all. You have your SAP web services schema ready to use.


One thought on “How to generate a BizTalk schema for a SAP Web Service

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s