|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SOAP parsing using WB version 6 |
« View previous topic :: View next topic » |
Author |
Message
|
schroederms |
Posted: Fri Apr 07, 2006 5:33 am Post subject: SOAP parsing using WB version 6 |
|
|
 Disciple
Joined: 21 Jul 2003 Posts: 169 Location: IA
|
We are trying to frot end our SOA XML based services using WB version 6.
What I'm trying to do is get our legacy XML message out of the SOAP envelope coming in on the HTTPListener, and finding it difficult with the name spaces, plus not knowing much about SOAP.
First I would like to ask a question on SOAP parsing... Can the compute node that strips out the XML from the soap envelope be generic to handle requests coming from WAS verses .NET, etc?
This is the SOAP message copied from a trace file to show you what I have coming from a web client I generated from the WSDL.
(0x01000010):XMLNS = (
(0x05000018):XML = (
(0x06000011): = '1.0'
(0x06000012): = 'utf-8'
)
(0x06000002): = '
'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x07000012)xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/'
(0x07000012)xmlns:soapenc = 'http://schemas.xmlsoap.org/soap/encoding/'
(0x07000012)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Header =
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x01000000)http://tempuri.org/RPCMessageSet:R3_Z_RFC_ORDER_CREATE = (
(0x07000012):xmlns = 'http://tempuri.org/RPCMessageSet'
(0x01000000)http://tempuri.org/RPCMessageSet:REQUEST = (
(0x01000000):CONTROL = (
(0x07000012):xmlns = ''
(0x01000000):ORIGINATOR = (
(0x02000000): = 'WMBV6'
)
(0x01000000):SERVICE = (
(0x02000000): = 'R3'
)
(0x01000000):FUNCTION = (
(0x02000000): = 'Z_RFC_ORDER_CREATE'
)
(0x01000000):DESTINATION = (
(0x01000000):INSTANCE = (
(0x02000000): = 'DV3'
)
(0x01000000):CLIENT = (
(0x02000000): = '120'
)
)
)
)
)
)
)
What I'm currently generating is this:
(0x01000010):XMLNS = (
(0x01000000):REQUEST = (
(0x01000000)http://tempuri.org/RPCMessageSet:R3_Z_RFC_ORDER_CREATE = (
(0x07000012):xmlns = 'http://tempuri.org/RPCMessageSet'
(0x01000000)http://tempuri.org/RPCMessageSet:REQUEST = (
(0x01000000):CONTROL = (
(0x07000012):xmlns = ''
(0x01000000):ORIGINATOR = (
(0x02000000): = 'WMBV6'
)
(0x01000000):SERVICE = (
(0x02000000): = 'R3'
)
(0x01000000):FUNCTION = (
(0x02000000): = 'Z_RFC_ORDER_CREATE'
)
(0x01000000):DESTINATION = (
(0x01000000):INSTANCE = (
(0x02000000): = 'DV3'
)
(0x01000000):CLIENT = (
(0x02000000): = '120'
)
)
)
)
)
)
)
Here is the esql statement:
set OutputRoot.XMLNS.REQUEST = InputRoot.XMLNS.soapEnvNS:Envelope.soapEnvNS:Body;
This is what I would like to generate out of the compute node in a simple form.
<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<CONTROl>
<ORIGINATOR>'WMBV6'</ORIGINATOR>
<SERVICE>R3</SERVICE>
<FUNCTION>Z_RFC_ORDER_CREATE</FUNCTION>
<DESTINATION>
<INSTANCE>'DV3'</INSTANCE>
<CLIENT>'120'</CLIENT>
</DESTINATION>
</CONTROl>
</REQUEST>
Is there a way to eliminate the name spacing? Can this be written in a generic way to handle a different SOAP client? Not asking to much.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 07, 2006 5:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
All the different SOAP clients should send the same types of messages. SOAP is after all a message format standard, so it says "this is what the message should look like".
It is possible to strip namespaces from XML, but you need to figure out why you want to do it. If you only want to do it because you don't know how to work with namespaces, then you will likely get in trouble. Namespaces help determine that an element named Person in one part of the message is either the same thing or a different thing than another element named Person in the same message - for example. Think of namespaces like java packages, if you know java. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
schroederms |
Posted: Fri Apr 07, 2006 8:08 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2003 Posts: 169 Location: IA
|
I'm not getting a reply back to the web client with in RAD,
I build a reply using the saved off RequestIdentifier from an environment variable called myEnv.Destination.HTTP.RequestIdentifier and code
SET OutputLocalEnvironment.Destination.HTTP.RequestIdentifier = CAST(Environment.myEnv.Destination.HTTP.RequestIdentifier AS BLOB);
The rest of the esql in the compute node before the HTTPreply is:
DELETE FIELD OutputRoot.MQMD;
DECLARE soapEnvNS NAMESPACE 'http://www.w3.org/2003/05/soap-envelope';
CREATE NEXTSIBLING OF OutputRoot.Properties NAME 'HTTPInputHeader';
SET OutputRoot.HTTPInputHeader = Environment.myEnv.HTTPInputHeader;
CREATE FIRSTCHILD OF OutputRoot.XMLNS.soapEnvNS:Envelope NAMESPACE soapEnvNS NAME 'Header';
SET OutputRoot.XMLNS.soapEnvNS:Envelope.soapEnvNS:Header = Environment.myEnv.Header;
CREATE LASTCHILD OF OutputRoot.XMLNS.soapEnvNS:Envelope NAMESPACE soapEnvNS NAME 'Body';
--SET OutputRoot.XMLNS.soapEnvNS:Envelope.soapEnvNS:Body = InputRoot.XML.*[1];
SET OutputRoot.XMLNS.soapEnvNS:Envelope.soapEnvNS:Body = InputRoot.XML;
Any ideas why my Web client times out?
Thanks. |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Apr 10, 2006 12:07 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
Check the compute mode in basic properties of your Compute Node . it should be Message and LocalEnvironment to propagate the LocalEnvironment out of your compute node. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|