Author |
Message
|
gecs |
Posted: Fri Nov 12, 2010 2:23 pm Post subject: Problem with Namespace Declaration |
|
|
 Acolyte
Joined: 14 Nov 2007 Posts: 58
|
Hi everybody, i have one problem with namespace declaration. The code below:
Code: |
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC';
SET OutputRoot.XMLNSC.soap:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = soap;
|
shows the next result in the trace:
Quote: |
(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x130386f50]
(0x01000000:Folder)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x03000000:PCDataField)xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
(0x01000000:Folder )http://schemas.xmlsoap.org/soap/envelope/:Body = (
|
I don't understand why shows (0x03000000:PCDataField). I guess that it must show (0x03000102:NamespaceDecl) like this part of the trace:
Quote: |
(0x01000000:Folder):SOAP = ( ['SOAP' : 0x132424c30]
(0x01000000:Folder):Context = ( ['xmlnsc' : 0x132714670]
(0x03000100:Attribute ):operation = 'MotorBzRuleInq' (CHARACTER)
(0x03000100:Attribute ):operationType = 'REQUEST_RESPONSE' (CHARACTER)
(0x03000100:Attribute ):portType = 'MS_MB_MotorBzRuleInqV1PortType' (CHARACTER)
(0x03000100:Attribute ):portTypeNamespace = 'http://mfxV1_1' (CHARACTER)
(0x03000100:Attribute ):port = 'MS_MB_MotorBzRuleInqV1SOAP_HTTP_Port' (CHARACTER)
(0x03000100:Attribute ):service = 'MS_MB_MotorBzRuleInqV1SOAP_HTTP_Service' (CHARACTER)
(0x03000100:Attribute ):fileName = '/var/mqsi/components/DMBRK01_BRK/792d826e-2701-0000-0080-a327c7a3e056/config/XSD/MS_MB_MotorBzRuleInqV1/MBRK_MotorBzRuleInq.wsdl' (CHARACTER)
(0x03000000:PCDataField):SOAP_Version = '1.1' (CHARACTER)
(0x01000000:Folder ):Namespace = (
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:SOAP-ENC = 'http://schemas.xmlsoap.org/soap/encoding/' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsd = 'http://www.w3.org/2001/XMLSchema' (CHARACTER)
)
) |
Additional info:
* I need consume one WS (I hace using HTTPRequest beacuse of this WS doesn't have WSDL)
Thanks in advance... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 12, 2010 2:45 pm Post subject: Re: Problem with Namespace Declaration |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
gecs wrote: |
Hi everybody, i have one problem with namespace declaration. The code below:
Code: |
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC';
SET OutputRoot.XMLNSC.soap:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = soap;
|
|
So can you show us your definition of soap (the one you are assigning to xmlns:soap = soap)?
Something like DECLARE soap....
Or the one you are using with soap:Envelope.
As a clue -- one should be defined as a NAMESPACE -- the other as a CHARACTER --- and yet they both have the same identifier??
Have you tried
Code: |
SET OutputRoot.XMLNSC.{soap}:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = soap; |
Don't know if the following would work too:
Code: |
SET OutputRoot.XMLNSC."soap":Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = soap; |
Ideally you should have
Code: |
DECLARE soap NAMESPACE soapval;
SET OutputRoot.XMLNSC.soap:Envelope.(XMLNSC.NamespaceDecl)xmlns:"soap" = soapval;
|
You get the idea. Experiment around it!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
gecs |
Posted: Fri Nov 12, 2010 3:10 pm Post subject: |
|
|
 Acolyte
Joined: 14 Nov 2007 Posts: 58
|
Hi "fjb_saper", thanks for yuor response.
The soap declaration below:
Code: |
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
|
I just tried:
Code: |
SET OutputRoot.XMLNSC.soap:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/';
|
... and the result (that it shows in the trace) is the same. |
|
Back to top |
|
 |
gecs |
Posted: Fri Nov 12, 2010 4:03 pm Post subject: |
|
|
 Acolyte
Joined: 14 Nov 2007 Posts: 58
|
hey "fjb_saper", thanks for the suggest.
the code:
Code: |
SET OutputRoot.XMLNSC.soap:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/'; |
works!!!
the cause of my error was I was saving the body of the OutpurRoot (XMLNSC) in a ROW VARIABLE... like this
Code: |
DECLARE rowOut ROW;
SET rowOut.XMLNSC = OutputRoot.XMLNSC;
|
... and then I reassigned the OutputRoot...
Code: |
SET OutputRoot.XMLNSC = rowOut.XMLNSC;
|
and that's the reason why the OutputRoot and the field types was alterated.
Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Nov 13, 2010 11:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Thanks for sharing.
Also if you need a temporary placeholder in the flow, don't save to a row variable, save it to the environment tree, but don't forget to assign a parser to that part of the tree before saving...
The reason to save to a row variable would be if you needed a scope beyond the current flow instance. (shared row)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|