|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL help in reading XMLNS domain |
« View previous topic :: View next topic » |
Author |
Message
|
swaugh |
Posted: Fri Jul 07, 2006 10:43 am Post subject: ESQL help in reading XMLNS domain |
|
|
Apprentice
Joined: 15 Jun 2006 Posts: 37
|
Hello,
I am trying to read a SOAP message using ESQL in a compute node. I am using xmlns PARSER to read the message. I am having trouble in reading one of the elements of the input message. Here is the trace node of the SOAP message.
(0x01000010):XMLNS = (
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-06-30 22:14:21.504947'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'SOAP-HTTP'
(0x03000000):Topic = NULL
)
(0x01000000):HTTPInputHeader = (
(0x03000000):X-Original-HTTP-Command = 'POST http://swgmq02.rochny.ibm.com:7080/svc3 HTTP/1.0'
(0x03000000):Host = 'loacalhost:7080'
(0x03000000):Content-Type = 'text/xml; charset=utf-8'
(0x03000000):Content-Length = '763'
(0x03000000):SOAPAction = '"urn:a"'
)
(0x01000010):XMLNS = (
(0x05000018):XML = (
(0x06000011): = '1.0'
(0x06000012): = 'UTF-8'
)
(0x06000002): = '
' 'http://schemas.xmlsoap.org/soap/envelope/'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x07000012)xmlns:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/'
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x07000012)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x02000000): = '
'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x02000000): = '
'
(0x01000000)tns:WebServicesMsgSetPortType:WebServiceCategory = (
(0x07000012)xmlns:ns1 = 'tns:WebServicesMsgSetPortType'
(0x03000000)http://schemas.xmlsoap.org/soap/envelope/:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'
(0x02000000): = '
'
(0x01000000):HTTPInputBody = (
(0x07000012)xmlns:ns2 = 'http://www.mrmnames.net'
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'ns2:HTTPMessageType'
(0x02000000): = '
'
(0x01000000):URL = (
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'xsd:string'
(0x02000000): = 'cat'
)
(0x02000000): = '
'
(0x01000000):InputData = (
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'ns2:DataType'
(0x02000000): = '
'
(0x01000000):Data = (
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'xsd:string'
(0x02000000): = '5036789'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
(0x01000000):OutputData = (
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'ns2:DataType'
(0x02000000): = '
'
(0x01000000):Data = (
(0x03000000)http://www.w3.org/2001/XMLSchema-instance:type = 'xsd:string'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x06000002): = '
'
)
)
Here is the ESQL from the compute node
--SET OutputRoot = InputRoot;
Declare Vsalesorder character '';
Declare mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
Declare myNS2 NAMESPACE 'http://www.mrmnames.net';
Declare myNS1 NAMESPACE 'tns:WebServicesMsgSetPortType';
Declare myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
Declare myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
SET Vsalesorder = InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:WebServiceCategory.myNS2:HTTPInputBody.InputData.Data;
I am trying to assign the value received in the InputData.Data field ( '5036789') to a variable Vsalesorder. But its not able to assign the value. Its assigning null.
Any help above is appreciated.
thanks,
swaugh |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 07, 2006 11:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you sure your input tree is right and the namespaces are right at each level of the tree.
Hint it may help to use a cursor(reference) to navigate the tree and to use a char field to evaluate / display the fieldname and the fieldnamespace at each step.
Looks like you are missing the soap encoding spec...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
swaugh |
Posted: Fri Jul 07, 2006 2:50 pm Post subject: |
|
|
Apprentice
Joined: 15 Jun 2006 Posts: 37
|
Hi fjb_saper,
can you give me an example of the reference/cursor statement and example of display statement, so that i can use it in my esql code.
thanks,
swaugh |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 07, 2006 7:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Code: |
declare cursor reference to InputBody;
declare fname character;
declare fns character;
Move cursor firstchild; -- next/previous sibling -- last child etc...
set fname = fieldname(cursor);
set fns = fieldnamespace(cursor);
|
This is from memory. So don't take it as gospel but do your due diligence and check it out.
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|