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 » SOAPEnvelope example

Post new topic  Reply to topic
 SOAPEnvelope example « View previous topic :: View next topic » 
Author Message
flahunter
PostPosted: Mon Oct 26, 2009 12:20 am    Post subject: SOAPEnvelope example Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

Hi,

Could anyone give me an example on how to set Existing Envelope Location($LocalEnvironment/SOAP/Envelope) when using SOAPEnvelope node to create our own SOAP Header? I tried serval times but failed, also I cannot find any similiar sample by Google. Please help

e.g

<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" version="1.0">
<soap:Header>
<Tag1>Test1</Tag1>
<Tag2>Test2</Tag2>
</soap:Header>
...
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Oct 26, 2009 1:11 am    Post subject: Re: SOAPEnvelope example Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

flahunter wrote:

I tried serval times but failed


What have you tried so far?

Whats in the $LocalEnvironment/SOAP/Envelope location? How was this constructed?

In what way doesnt it work? Do you get an error or is it just that the envelope is missing?

Are you using the support pack or version 6.1 of broker? If the support pack did the documentation that comes with it not help? ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/ia9o.pdf

Else was the infocenter of no use?
Back to top
View user's profile Send private message
flahunter
PostPosted: Mon Oct 26, 2009 1:27 am    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

I have already read the pdf file and infocenter, but there is no explanation on how to set the value. The ia9o.pdf just checked the "Create new envelope" and automatically generated default SOAP Envelope. So it cannot help me anything.

I don't know how to use it. Just give the value like this,but failed.

SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2';
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Oct 26, 2009 2:11 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

flahunter wrote:

SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2';


Have you modified the compute node to allow you to alter the localenvironment? If you put a trace node after the compute node you should be able to check that the LocalEnvironment is as you would expect (or not!).
Back to top
View user's profile Send private message
flahunter
PostPosted: Mon Oct 26, 2009 10:06 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

WMBDEV1 wrote:
flahunter wrote:

SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2';


Have you modified the compute node to allow you to alter the localenvironment? If you put a trace node after the compute node you should be able to check that the LocalEnvironment is as you would expect (or not!).


Sure I did it and also I can find the LocalEnviroment generated successfully.

However it still raised an error like this
A message using an incorrect parser (MQROOT) was detected in node: SOAPEnvelope
thrown from class name: 'com.ibm.broker.soap.SoapWrapperNode', method name: 'assembleSOAPMessage', file: 'SoapWrapperNode.java'

My question is simple. Does any one who can show me an example of giving value to LocalEnvironment to create our own SOAP Header when we select "Existing Envelope Location" properties. Thx
Back to top
View user's profile Send private message
rajparekh08
PostPosted: Mon Oct 26, 2009 10:38 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

The SOAPEnvelope node, builds a default SOAP Header.
If you want to change it, the only option I can see is, that you put a message in a queue, with the desired SOAP header, and use MQGET to cal the message, and change the LocalEnvironment, and build the SOAP Header.
In this way, you will be able to build the SOAP Header of your choice.
This is what I could think of, Do try all possible ways.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
flahunter
PostPosted: Mon Oct 26, 2009 10:48 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

Thanks for your answer. It's really a good method:) But I'd like to know the usage of "Existing Envelope Location" propeties in SOAPEnvelope node. It's really haunting me!!!
Back to top
View user's profile Send private message
rajparekh08
PostPosted: Mon Oct 26, 2009 11:14 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

HI!
"Existing Envelope Location".. Now when you use SOAPExtract node, you can store this Envelope/Header in the LocalEnvironment. Later on if you want to retrive this envelope, you can use the "Existing Envelope Location", I mean the place where you had previously stored the Soap Header, using the SOAPExtract node. If you try to use this in your SOAPEnvelope node without using the SOAPExtract node to store the Header in the LocalEnvironment, then you are sure to get an error.Hope this clears your confusion.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
flahunter
PostPosted: Mon Oct 26, 2009 11:36 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

rajparekh08 wrote:
HI!
"Existing Envelope Location".. Now when you use SOAPExtract node, you can store this Envelope/Header in the LocalEnvironment. Later on if you want to retrive this envelope, you can use the "Existing Envelope Location", I mean the place where you had previously stored the Soap Header, using the SOAPExtract node. If you try to use this in your SOAPEnvelope node without using the SOAPExtract node to store the Header in the LocalEnvironment, then you are sure to get an error.Hope this clears your confusion.


Hi, Rajparekh08

I really appreciate your answer. I read the material of infocenter again, and now it make me clear. This node is designed to be used in conjunction with the SOAPExtract node if we use "Existing Envelope Location". Thanks again:)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 27, 2009 3:38 am    Post subject: Reply with quote

Grand High Poobah

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

Quote:
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" version="1.0">

Your soap envelope definition (http url) is not what I would expect especially for version "1.0".

To me it looks like a version 1.2 definition with the attribute of version="1.0".

Version 1.1 ends in "...velope/" version 1.2 ends in "...velope"

So look at your W3Org and check what you're doing...

Default used by broker 6.0 for soap 1.1 uri is "http://schemas.xmlsoap.org/soap/envelope/"
Soap 1.2 uri "http://www.w3.org/2003/05/soap-envelope"

see Javax.xml.Constant values... http://java.sun.com/javase/6/docs/api/constant-values.html#javax.xml


_________________
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 » SOAPEnvelope example
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.