Author |
Message
|
hornbeam123 |
Posted: Thu Nov 23, 2006 3:54 pm Post subject: XMLNS esql navigation |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Back again. Final hurdle on my WS flow. Trying to retrieve contents of getJokeResult but fails to navigate. I'm in XMLNS domain. Please could somebody tell me what am I doing wrong in my esql?
Trace extract :
Evaluating expression 'InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJokeResponse.getJokeResult' at
(.WS_request_with_SOAP_BuildReplyMessage1.CopyMessageHeaders, 30.15).
2006-11-23 23:41:30.955326 3764 UserTrace BIP2543E: Node 'getJoke_with_SOAP.Build reply message1':
(.WS_request_with_SOAP_BuildReplyMessage1.CopyMessageHeaders, 30.63) : Failed to navigate to path element because it does not exist.
REPLY esql
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
SET Environment.Variables.thisWebService.Reply =
InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJokeResponse.getJokeResult ;
rfhutil PARSED view of data written to a seperate queue:-
soap:Envelope.(XML.attr)xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
soap:Envelope.(XML.attr)xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
soap:Envelope.(XML.attr)xmlns:xsd='http://www.w3.org/2001/XMLSchema'
soap:Envelope
soap:Envelope.soap:Body
soap:Envelope.soap:Body.getJokeResponse.(XML.attr)xmlns='http://interpressfact.net/webservices/'
soap:Envelope.soap:Body.getJokeResponse
soap:Envelope.soap:Body.getJokeResponse.getJokeResult='A result'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
REQUEST esql (working obviously)
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
--SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJoke.Category = '2';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJoke.Category = 'Random(contains Adult) - 1';
rfhutil PARSED view of data :-
soapenv:Envelope.(XML.attr)xmlns:xsd='http://www.w3.org/2001/XMLSchema'
soapenv:Envelope.(XML.attr)xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
soapenv:Envelope.(XML.attr)xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
soapenv:Envelope
soapenv:Envelope.soapenv:Body
soapenv:Envelope.soapenv:Body.getJoke.(XML.attr)xmlns:ns1='http://interpressfact.net/webservices/'
soapenv:Envelope.soapenv:Body.getJoke
soapenv:Envelope.soapenv:Body.getJoke.Category='Random(contains Adult) - 1' |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Nov 23, 2006 9:36 pm Post subject: Re: XMLNS esql navigation |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi hornbeam123,
hornbeam123 wrote: |
InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJokeResponse.getJokeResult'
soap:Envelope.soap:Body
soap:Envelope.soap:Body.getJokeResponse.(XML.attr)xmlns='http://interpressfact.net/webservices/'
soap:Envelope.soap:Body.getJokeResponse
soap:Envelope.soap:Body.getJokeResponse.getJokeResult='A result' |
If my understanding of your mesage is correct, then there is a default namespace applicable at the level "getJokeResponse". Hence when ur tring to access the field "getJokeResult", it will have to be
Code: |
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE webService NAMESPACE 'http://interpressfact.net/webservices/';
SET Environment.Variables.thisWebService.Reply =
InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJokeResponse.webService:getJokeResult; |
Regards. |
|
Back to top |
|
 |
hornbeam123 |
Posted: Fri Nov 24, 2006 4:14 am Post subject: XMLNS esql navigation |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Nice try thought that would work but it didn't. Failed to navigate....
I coded :-
--Define the Variables
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE myNS1 NAMESPACE 'http://interpressfact.net/webservices/';
SET Environment.Variables.thisWebService.Reply =
InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.getJokeResponse.myNS1:getJokeResult;
Any ideas? |
|
Back to top |
|
 |
hornbeam123 |
Posted: Fri Nov 24, 2006 4:39 am Post subject: XMLNS esql navigation |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
I fixed it by prefixing each element with the appropriate namespace.
Sorted.
Here's the award winning code :-
--Define the Variables
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE myNS1 NAMESPACE 'http://interpressfact.net/webservices/';
SET Environment.Variables.thisWebService.Reply =
InputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:getJokeResponse.myNS1:getJokeResult;
Please close this problem. |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Nov 24, 2006 5:09 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi hornbeam123,
Well I did say it was a default namespace, so it applies to every field under the parent tag which does not have any other namespace specified on it...
Glad u figured it out...plz remember to mark the topic solved.
Regards. |
|
Back to top |
|
 |
hornbeam123 |
Posted: Fri Nov 24, 2006 6:47 am Post subject: XMLNS esql navigation |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
How do you set a post on the forum to CLOSED state? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 24, 2006 7:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Edit your first post in the thread and prefix the topic with "[Closed]" or "[Solved]" _________________ MQ & Broker admin |
|
Back to top |
|
 |
hornbeam123 |
Posted: Fri Nov 24, 2006 7:25 am Post subject: [SOLVED] XMLNS esql navigation |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Nov 24, 2006 7:43 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi hornbeam123,
Put the [Solved] on the your first post...
Regards. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 24, 2006 7:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I said EDIT your FIRST post in the thread (the one that started this thread) and prefix the subject with "[Solved]". NOT to Add a post to the thread and mark the subject in that post...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|