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 » soap message

Post new topic  Reply to topic
 soap message « View previous topic :: View next topic » 
Author Message
chris boehnke
PostPosted: Thu Feb 23, 2012 12:02 pm    Post subject: soap message Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

Hi Guys,

I am trying to add soap header to the a webservice request using ESQL. I am using the below code.

Quote:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';


SET OutputRoot.SOAP.soapenv:Envelope.soapenv:Header.trackID = 'sidjowjeopiwp';


When i am add the declaration for soap envelope it is coming twice in my output.
The below is the output iam getting

Quote:
<SOAP_Domain_Msg>
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">
<NS1:Header>
<trackID>sidjowjeopiwp</trackID>
</NS1:Header>
<NS1:Body>
.
.
.


I am expecting something like this

Quote:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header><trackID>sidjowjeopiwp</trackID>
</soapenv:Header>


Can you guys pls help me.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Feb 23, 2012 12:31 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you read this page in the info center?
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac67194_.htm

When you do this...
Code:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
...you are making your ESQL neater.

Let me say that again, in case you didn't get it the first time:
When you do this...
Code:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
...you are making your ESQL neater.

Please note that an ESQL NAMESPACE constant does *not* affect the way in which the XMLNSC parser converts the message tree to an XML document. It does not cause an xmlns attribute to appear in the output XML. If you want to do that then the page that I've quoted above will explain how to do it.
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Thu Feb 23, 2012 6:32 pm    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

kimbert wrote:
Have you read this page in the info center?
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac67194_.htm

When you do this...
Code:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
...you are making your ESQL neater.

Let me say that again, in case you didn't get it the first time:
When you do this...
Code:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
...you are making your ESQL neater.

Please note that an ESQL NAMESPACE constant does *not* affect the way in which the XMLNSC parser converts the message tree to an XML document. It does not cause an xmlns attribute to appear in the output XML. If you want to do that then the page that I've quoted above will explain how to do it.


Thanks Kimbert. I am able to generate soap message as I expected.

But, when I tried to call the webservice, i am getting error message as
"No Soap.Body found".

can you guys throw some light?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 24, 2012 5:40 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

http://www.mqseries.net/phpBB2/viewtopic.php?t=60398
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Feb 25, 2012 4:45 pm    Post subject: Reply with quote

Grand High Poobah

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

Hi Chris,

Looks like this is the first time you are using the SOAP parser.
Think of the SOAP parser as generating anything above and including the soapenv:Body tag for you. So you would have

OutputRoot.SOAP.ns:xmltoptag....

So all the stuff you tried to put into the Soap header needs to go into the Local environment as overrides...

You might want to look at the samples and read up on the node in the documentation...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mgk
PostPosted: Sun Feb 26, 2012 6:56 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
OutputRoot.SOAP.ns:xmltoptag....


Almost. The SOAP domain does take care of the SOAPVersion (1.1 or 1.2) so you don't have to. However, headers are the body are both stored under the SOAP parser, so you have:

Code:
OutputRoot.SOAP.Header.ns:myheader = xxx

or

Code:
OutputRoot.SOAP.Body.ns:myBody = xxx


This is explained better here: http://www.ibm.com/developerworks/webservices/library/ws-soapnode2/

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Feb 26, 2012 10:23 am    Post subject: Reply with quote

Grand High Poobah

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

Thanks mgk for the correction and the right reference
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » soap message
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.