Skip to Content
author's profile photo Former Member
Former Member

Two Message Type Names with Same Name Different Schemas

First, I'm relatively new to PI and I'm sure there is an easy way to deal with this. I have to interact with a web service and of course every message is wrapped in a namespace:Envelope. If I define a message type for both the request and the response they are both going to be Envelope but have different schemas. Since the message type has to have the name match the top element, this means I have to have two different Envelopes and that isn't allowed. How do I get around this? Seems like there should be a way to use a message type with a name different that what will be in the actual XML.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 27, 2016 at 07:35 PM

    So I do have to add authentication in the header (it's specific to the web service). Knowing that, if I understand the responses, I do need to include the header in my data type and I would assume also, turn off soap headers in my channel? This sound right?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 23, 2016 at 03:37 PM

    Hello Carlton,

    The target is a Webservice and does it require authentication on the basis of soap header?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      It is a web service and the header contains their own authentication elements. So, I do have to write the header. Should I do this with an XSLT? This will make it hard to move between dev/test/prod as I will need an XSLT for each environment.

  • Posted on Jun 24, 2016 at 02:47 AM

    Hi Carlton,

    The best practice is to create/define the message type inside the soap:Body. The envelope can be added via xslt/java mapping and should only be done if you need something on the soap:Header.

    Regards,

    Mark

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      It is not clear what should only be done if you need something inside the header. But I do need to put authentication in the header as the service uses it's own elements for authentication. Are you saying I should use xslt only if I need to put something in the header???

  • Posted on Jun 24, 2016 at 03:13 AM

    Hi Carlton!

    In general, when you design message types in PI or import external definitions for third party web services you don't use Envelope tag in it.

    Regards, Evgeniy.

    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.