Author |
Message
|
jhalstead |
Posted: Wed Oct 06, 2004 9:34 am Post subject: WebServices, SOAP, IA81 & Namespaces |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
Hi I'm using the HTTPRequest Node in combination with IA81 to invoke another applications web service. Got the request/response and soap decode working okay - however the body of the message that comes back is fully namespace encoded:
(0x01000000):XMLNS = (
(0x01000000)HTTP://www.bob/service:TaxonomyResponse = (
(0x01000000)HTTP://www.bob/service:Taxonomy = (
(0x01000000)HTTP://www.bob/service:Bands = (
(0x03000000)HTTP://www.bob/service:BandCd = '9'
(0x03000000)HTTP://www.bob/service:BandDesc = 'SmartBand'
(0x01000000)HTTP://www.bob/service:Models = (
(0x01000000)HTTP://www.bob/service:Model = (
(0x03000000)HTTP://www.bob/service:ModelCd = '450'
(0x03000000)HTTP://www.bob/service:ModelDesc = 'Whisk'
)
)
)
)
)
)
I just want to get the elements and the values - not the namesapce tags - just plain old XML.
(0x01000000):XML = (
(0x01000000)TaxonomyResponse = (
(0x01000000)Taxonomy = (
(0x01000000)Bands = (
(0x03000000)BandCd = '9'
(0x03000000)BandDesc = 'SmartBand'
(0x01000000)Models = (
(0x01000000)Model = (
(0x03000000)ModelCd = '450'
(0x03000000)ModelDesc = 'Whisk'
)
)
)
)
)
)
I've had a little success using the following technique for a single element:
DECLARE ref1 NAMESPACE 'HTTP://www.bob/service';
SET OutputRoot.XML.BandCd VALUE = InputRoot.XMLNS.ref1:TaxonomyResponse.ref1:Taxonomy.ref1:Bands.ref1:BandCd;
However I don't see any easy way to do this for all elements in the message, am I missing something REALLY obvious?
Any help - as always - gratefully accepted (I've been away from WBIMB for a good 8 months or so - so sorry if I'm being a dummy!)
Jamie |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Oct 06, 2004 10:35 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
1) Try copying the whole message tree from XMLNS to XML, XML may ignore the namespace on each element.
2) Otherwise, write a recursive procedure to strip the namespaces off each element, strip the namespace like this:
SET currentElementRef NAMESPACE = NULL; |
|
Back to top |
|
 |
jhalstead |
Posted: Thu Oct 07, 2004 4:06 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
Thanks for that - however doing a
simple OutputRoot.XML = InputRoot.XMLNS; fails - error thrown because XML Namesapce not allowed for element unless in XMLNS domain.
Simlarly attempting to set the NAMESAPCE to NULL fails as a character type is expected when doing this ....
Did I miss the point or are there any other techniques?
Thanks
Jamie |
|
Back to top |
|
 |
JLRowe |
Posted: Fri Oct 08, 2004 1:33 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
|
Back to top |
|
 |
jhalstead |
Posted: Sun Oct 10, 2004 11:35 pm Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
Tried that - but no joy. Maybe the BLOB domain hold the answer .... |
|
Back to top |
|
 |
kishoreraju |
Posted: Tue Oct 12, 2004 7:53 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
hi
if u r facing the problem with namespaces to access the data u can ingore the name spaces by using the following sample code
Declare myref REFERENCE TO InputBody.(XML.tag)[1];
Declare MessageType CHARACTER;
SET MessageType = myref.*:HL7_SGMSH.*:HL7_SGMSH.*:MessageType.*:HL7_DTMSG.*:MessageType;
here HL7_SGMSH are the field names and we ignoring the name spaces by using wildcard character *
try like this |
|
Back to top |
|
 |
jhalstead |
Posted: Tue Oct 12, 2004 9:49 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
Will try to apply this first thing in the morning, girlfriend will not let me have a broker at home .... bah! thanks for responding
Jamie |
|
Back to top |
|
 |
dazednc |
Posted: Thu Mar 31, 2005 5:11 am Post subject: IA81 - how did you get it to work? |
|
|
Newbie
Joined: 29 Mar 2005 Posts: 2
|
hi
i downloaded the ia81 "support" pac but have no clue how to use it in the toolkit. i am a wbimb developer and need to encode a msg in soap... i read the pdf but it doesn't give a newby like me enough info = is there somewhere else i can go for more details? |
|
Back to top |
|
 |
jhalstead |
Posted: Fri Apr 01, 2005 3:02 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
The zip file comes with an example workspace. This has a large array of example flows that should provide the necessary guidance, just extract this on to your machine and point your toolkit to it.
As an example if you received a message in XML format that you wanted to SOAP encode, request a web service over HTTP and then SOAP decode the basic flow is as follows:
Compute Node
SOAPLIB_SERVICE_INIT
SOAPLIB_ENCODE_REQUEST
HTTP Request Node
Compute Node
SOABLIB_SERVICE_INIT
SOAPLIB_DECODE_REQUEST
Seems to work.... |
|
Back to top |
|
 |
|