Skip to Content

How to generate correct SAP PI XSD file from SOAP definition or from SOAP UI request msg ?


Dear Experts,

We need to create Request message in SAP PI for a given Web Service. For this we do not have from customer ready XSD file, but we do have definition of the SOAP message and generated SOAP UI request.

We used SOAP UI tool to test the service and it works fine. Attached is SOAP UI Request message and SOAP definition

Can someone convert the attached SOAP UI into XSD file , so it can be used in ESR to create External Definition? The idea is

to create and send correct Request message to the web service..Problem is that if we create XSD from definition - there must be

2 separate messages - one for Header and for Body. But we must build ONE single request message in PI moreover because in header there is credentials that needed to be used to log in given web service and to get data.

Can someone create correct single XSD file to be imported in PI from looking at SOAP UI request example or SOAP Definition below?

Thank you.

SOAP UI request:" xmlns:com="">
















SOAP Request definition :" xmlns:xsd="" xmlns:soap="">




<LicenceID>guid</LicenceID> </AuthenticationHeader>



<GetExchangeRate xmlns="">





Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jun 19, 2019 at 11:16 AM

    Dear Evgeniy,

    Many thanks for your helpful reply ! Yes, header values in Request are constant credentials and they are static - they will never change. Actually SOAP UI test is successful , so I suggest this is one option - to include Header values.

    As per your suggestions for other option to use Module AddSOAPHeaderBean ,if we do so, are you saying that in this case we only need to create Request message without even Header node and pass values for credentials in Module Configurations ?

    With other words in this case we do not need to even create Header nodes when creating the structure in ESR DataType ? Or we create Header node with fields but we fill them in Comm Channel Module configuration ?

    May question How the header part of message would look in either option - with using Module or without ?

    As per other option to use External tool for XML to XSD conversion , I was trying to find a converting option in Altova XMLSpy but I was not able to.. If you are sure about Oxygen XML Editor, then I will indeed try.

    Many thanks for your fast reply and feedback!


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2019 at 09:49 AM

    Hi Boby!

    First, header part of your message is not separate message. It's a set of SOAP headers that should be included to your request. If your header values are static - you could use AddSOAPHeaderBean to assign needed values for those headers right in communication channel.

    For creating XSD based on XML file for the request message you could use any external tool like Oxygen XML Editor, for example. Another way is to use dummy message type for the request and build request message in operation mapping using XSL transformation.

    Another option might be to copy endpoint URL from SOAP UI and try to open it in browser, adding "?wsdl" parameter, like:

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2019 at 01:29 PM

    Hi Boby!

    SOAP Header elements are not the part of message payload, so you shouldn't define it in your message structure.

    Refer to this blog for details about using AddSOAPHeaderBean:

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 20, 2019 at 01:14 PM

    Dear Evgeniy,

    I am using AddSOAPHeaderBean as per your directions in communication channel. Problem is I am always getting in Response error message "Authorization Header Error" . I am coming to a conclusion that I need to check fully constructed SOAP request . Is there anyway we can can see outgoing from PI SOAP request message- header and body , after communication channels work? We have XI inspector but seems not to be able to create see the message? I appreciate more detailed feedback on how to get this message?

    Many thanks


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.