ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Referencing namespace elements

Post new topic  Reply to topic
 Referencing namespace elements « View previous topic :: View next topic » 
Author Message
Chuck831
PostPosted: Fri May 20, 2005 7:17 am    Post subject: Referencing namespace elements Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri May 20, 2005 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Chuck831
PostPosted: Fri May 20, 2005 7:40 am    Post subject: Reply with quote

Apprentice

Joined: 23 Dec 2002
Posts: 28

Jeff,

Could you be any more specific?

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri May 20, 2005 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Referencing namespace elements
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.