Author |
Message
|
kathirvelt |
Posted: Tue Mar 08, 2011 5:48 pm Post subject: ESQL to define xml with multiple namespace. |
|
|
Apprentice
Joined: 02 Oct 2010 Posts: 32
|
I want to difine xml similar to below one. please advice.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:emp="http://test.com/wsdl/EMP/EMPGatewayService"
xmlns:test ="http://test.com/schema/EMPGatewaySchema"> |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 08, 2011 8:52 pm Post subject: Re: ESQL to define xml with multiple namespace. |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kathirvelt wrote: |
I want to difine xml similar to below one. please advice.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:emp="http://test.com/wsdl/EMP/EMPGatewayService"
xmlns:test ="http://test.com/schema/EMPGatewaySchema"> |
So which parser are you using? _________________ MQ & Broker admin |
|
Back to top |
|
 |
kathirvelt |
Posted: Tue Mar 08, 2011 9:33 pm Post subject: |
|
|
Apprentice
Joined: 02 Oct 2010 Posts: 32
|
I'm using xmlnsc to create this. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 08, 2011 9:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kathirvelt wrote: |
I'm using xmlnsc to create this. |
So first you define all the namespaces like (from memory)
Code: |
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/'; |
Then you look up the (XML.XMLDeclaration) key word in the ESQL ref and manual and use it like (again from memory so not necessarily exact)
Code: |
CREATE LAST CHILD OF OutputRoot.XMLNS NAMESPACE soapenv NAME 'Envelope';
SET OutputRoot.XMLNS.soapenv:Envelope.(XMLDeclararion)soapenv = 'schemas.xmlsoap.org/soap/envelope/'; |
and so on for the other declarations...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 09, 2011 1:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
kathirvelt |
Posted: Wed Mar 09, 2011 10:15 am Post subject: |
|
|
Apprentice
Joined: 02 Oct 2010 Posts: 32
|
I did the first one and it gives me an error "BIP2432E: The correlation name 'XMLDeclararion' is not valid. " I'll try the secon one now. Thanks for your suggestions/input. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 09, 2011 2:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Too late a day. I obviously missed the 'c' at the end of his parser name...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kathirvelt |
Posted: Thu Mar 10, 2011 11:01 am Post subject: |
|
|
Apprentice
Joined: 02 Oct 2010 Posts: 32
|
Sry I'm slow . I was able to define this as below. Thanks for your help.
ESQL
-------
DECLARE soapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://www.w3.org/2001/XMLSchema';
SET OutputRoot.XMLNSC.soapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:xsd = xsd;
Output
--------
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
Back to top |
|
 |
|