ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Adding Additional SOAP Headers

Post new topic  Reply to topic
 Adding Additional SOAP Headers « View previous topic :: View next topic » 
Author Message
JosephGramig
PostPosted: Tue Jan 05, 2016 8:09 am    Post subject: Adding Additional SOAP Headers Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

I need to make a SOAP Request with an MTOM attachment and two additional application defined SOAP Headers.

I didn't see an obvious way to add the extra SOAP Headers, so I chose a Map node where the target is SOAP_msg. I then cast some extra headers. That will go into the SOAP Request node. Does that sound about right?

Yes, I am going to try it but have to do some pre-flow work first and just wanted to see if anybody else has added extra SOAP Headers and how they chose to do it.
Back to top
View user's profile Send private message AIM Address
fjb_saper
PostPosted: Tue Jan 05, 2016 8:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I would expect the extra SOAP headers to be in soapenv:Envelope.soapenv:Header


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
JosephGramig
PostPosted: Tue Jan 05, 2016 8:21 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

fjb_saper,

Yes, that is where I added them. And I cast the body to the MTOM msg (what I see in the WSDL request).

I get why they are doing it. They need metadata about the MTOM that is signed and encrypted and being that this is MTOM, the only place to put it is extra SOAP headers.
Back to top
View user's profile Send private message AIM Address
JosephGramig
PostPosted: Sat Jan 09, 2016 5:26 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

OK, so setting the Map node to have a target of SOAP domain seems to work (the request node didn't reject it and the other side gave me a security fault which I expected (that is my next step)).

I would think though, that it would be possible to send in the extra SOAP headers in the LocalEnvironment and send the body into the SOAP Request node normally.

Has anybody done that? If so, would you provide the details as to what part of the LocalEnvironment you used to add the headers?

The way I did it just seems clunky and not the way the designer of the SOAP Request node meant it to be...
Back to top
View user's profile Send private message AIM Address
fjb_saper
PostPosted: Sat Jan 09, 2016 8:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

JosephGramig wrote:
OK, so setting the Map node to have a target of SOAP domain seems to work (the request node didn't reject it and the other side gave me a security fault which I expected (that is my next step)).

I would think though, that it would be possible to send in the extra SOAP headers in the LocalEnvironment and send the body into the SOAP Request node normally.

Has anybody done that? If so, would you provide the details as to what part of the LocalEnvironment you used to add the headers?

The way I did it just seems clunky and not the way the designer of the SOAP Request node meant it to be...

For the header to reside in the LocalEnvironment I believe you send a standard XMLNS(C) message, add a SOAP Header node and specify in the SOAP Header node the location in the local environment.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
JosephGramig
PostPosted: Mon Jan 11, 2016 10:39 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

I see, so there is a SOAPEnvelope node and that can be used to add an existing "Envelope" and that defaults to $LocalEnvironment/SOAP/Envelope.

I can see how headers can be added there via a Map node (and many other ways). Then flow that into the SOAPRequest node. This feels more like the way it should be done. I will try this.
Back to top
View user's profile Send private message AIM Address
JosephGramig
PostPosted: Tue Jan 12, 2016 5:54 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

fjb_saper,

There is no "SOAP Header" node and the "SOAP Envelope" node does not do what you might think it should do as discussed in this thread.

What I find that does work, is to pick the target domain to be SOAP_Domain_Msg and cast the parts to what my msg should be and this link seems to agree with my findings.

I guess, if it works, don't knock it. I think it does work because I get an expected fault saying I haven't added WS-Secure stuff (next step).

I also need to do an override for the MTOM size to allow 10 bytes (default is 1000) but I see that is missing in the Map node. I have to use code. I suppose this is an over sight.
Back to top
View user's profile Send private message AIM Address
fjb_saper
PostPosted: Tue Jan 12, 2016 8:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

JosephGramig wrote:
fjb_saper,

There is no "SOAP Header" node and the "SOAP Envelope" node does not do what you might think it should do as discussed in this thread.

What I find that does work, is to pick the target domain to be SOAP_Domain_Msg and cast the parts to what my msg should be and this link seems to agree with my findings.

I guess, if it works, don't knock it. I think it does work because I get an expected fault saying I haven't added WS-Secure stuff (next step).

I also need to do an override for the MTOM size to allow 10 bytes (default is 1000) but I see that is missing in the Map node. I have to use code. I suppose this is an over sight.

Must have misunderstood what you are looking for.
Usage of the SOAP Envelope Node does not change the msg domain, IIRC it stays XMLNS(C) but the message is complete with Envelope. Used to use it before a SOAP Reply. Don't know how it will behave as entry to a SOAP Request but I'd have expected it to behave the same.
And please note that the Envelope & headers referenced by the SOAP Envelope node would still be in XMLNS(C) form and not in the form generated as output of the SOAP Input node....
If you want / need the message in the SOAP Domain, you'd have to set up the headers as per this domain's requirements...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Jan 12, 2016 8:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
And please note that the Envelope & headers referenced by the SOAP Envelope node would still be in XMLNS(C) form and not in the form generated as output of the SOAP Input node....



The children of any direct child of a SOAP domain message are added as normal children. The first child of the Soap Body should be an XMLNSC parser, perhaps.

A SOAP domain message should be a SOAP domain message, regardless of whether it came from a SOAPInput node or not.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 12, 2016 8:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqjeff wrote:
fjb_saper wrote:
And please note that the Envelope & headers referenced by the SOAP Envelope node would still be in XMLNS(C) form and not in the form generated as output of the SOAP Input node....



The children of any direct child of a SOAP domain message are added as normal children. The first child of the Soap Body should be an XMLNSC parser, perhaps.

A SOAP domain message should be a SOAP domain message, regardless of whether it came from a SOAPInput node or not.

Just meaning to underscore the difference of the Header representation in the tree between the SOAP domain and the XMLNS/XMLNSC domains. Note that the supported parsers for use with the SOAP Envelope node are XMLNS, XMLNSC, and MRM. No mention of a SOAP parser here. http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac60020_.htm?lang=en[url]
_________________
MQ & Broker admin


Last edited by fjb_saper on Tue Jan 12, 2016 9:02 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Jan 12, 2016 8:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

They're all MbElements...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Tue Jan 12, 2016 9:56 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Here is a link in the KC where they also use SOAP_Domain_msg...

I'm pretty sure I built my msg successfully because I get a fault telling me I didn't give it WSSE msg parts.

I'm now building the Policy Set and Binding to sign and encrypt the headers I added. Everything else I tried generates an exception.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Adding Additional SOAP Headers
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.