|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Referencing namespace elements |
« View previous topic :: View next topic » |
Author |
Message
|
Chuck831 |
Posted: Fri May 20, 2005 7:17 am Post subject: Referencing namespace elements |
|
|
Apprentice
Joined: 23 Dec 2002 Posts: 28
|
Hi,
I am trying to processing an message that is returned from a web service. The message contains namespaces. The output message will not contain namespaces.
I can't seem to get the data from the input to the output.
This is the input message:
Code: |
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetReply xmlns="Corp.Sales.WebService">
<GetResult>
<CustomerInformation xmlns="">
<DATA_AREA>
<CustNo>101</CustNo>
<CustCode>1</CustCode>
<CustDiscount>15</CustDiscount>
</DATA_AREA>
</CustomerInformation>
</GetResult>
</GetReply>
</soap:Body>
</soap:Envelope> |
This is the SET statement that I using to access the CustDiscount element.
Code: |
DECLARE NS1 NAMESPACE 'Corp.Sales.WebService';
SET OutputRoot.XML.DataArea.CustDiscount =
InputBody.soap:Envelope.soap:Body.NS1:GetReply.NS1:GetResult.CustomerInformation.DATA_AREA.CustDiscount;
|
Could someone identify what I'm doing wrong?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 20, 2005 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You are not using XMLNS. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Chuck831 |
Posted: Fri May 20, 2005 7:40 am Post subject: |
|
|
Apprentice
Joined: 23 Dec 2002 Posts: 28
|
Jeff,
Could you be any more specific?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 20, 2005 8:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Chuck831 wrote: |
Jeff,
Could you be any more specific?
Thanks. |
You are using OutputRoot.XML, and presumably InputRoot.XML, instead of InputRoot.XMLNS and OutputRoot.XMLNS.
You can't do proper namespace handling if you are not in the XML NameSpace domain.
Also, the XML domain is deprecated in favor of the XMLNS domain. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|