cancel
Showing results for 
Search instead for 
Did you mean: 

Two Message Type Names with Same Name Different Schemas

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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?

former_member194786
Active Contributor
0 Kudos

Hi Carlton,

Have you tried using AddSOAPHeaderBean to add the authentication parameter? Refer blog below:

Alternately, you can consider using SOAP AXIS adapter as well to achieve this.

In both these approaches you can use standard functionality to handle SOAP header parameters.

Regards,

Sanjeev.

Former Member
0 Kudos

Thank you Sanjeev!!!!!, I knew there had to be a nice way to get this done.

Answers (3)

Answers (3)

former_member190293
Active Contributor
0 Kudos

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.

markangelo_dihiansan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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???

former_member186851
Active Contributor
0 Kudos

Hello Carlton,

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

Former Member
0 Kudos

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.