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 » Add namespace with parse

Post new topic  Reply to topic
 Add namespace with parse « View previous topic :: View next topic » 
Author Message
francoisvdm
PostPosted: Fri Sep 21, 2007 2:15 am    Post subject: Add namespace with parse Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

MB V6.0.2, Windows platform

I receive an xml message with no namespaces in it.... but I need to parse it into a message set that is namespace aware, but whatever I do my result data is still without namespaces. Can anybody please help me:

Here is the input XML: Bit of code after I removed envelope:
Code:
<web:webserviceIn soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <DataID xsi:type="xsd:string">ORDPCK</DataID>
         <Content xsi:type="xsd:string"><sap_zppickpack><Data_record><sap_zppickpack_cwdata><sap_zppickpack_zppickpackheader000><sap_zppickpack_zppickpackheader000><ORDER_NUMBER>000123456789</ORDER_NUMBER><DELIVERY_DATE>10092007</DELIVERY_DATE><sap_zppickpack_zppickpacklines000><sap_zppickpack_zppickpacklines000><MATERIAL_NUMBER>000000000000001230</MATERIAL_NUMBER><ITEM_LINE>000001</ITEM_LINE><QUANTITY>0000000000001000</QUANTITY><REASON_CODE>PX</REASON_CODE></sap_zppickpack_zppickpacklines000></sap_zppickpack_zppickpacklines000></sap_zppickpack_zppickpackheader000></sap_zppickpack_zppickpackheader000></sap_zppickpack_cwdata></Data_record></sap_zppickpack></Content>
      </web:webserviceIn>


Here is my code:
Code:
DECLARE bodyBlob1 BLOB ASBITSTREAM(InputRoot.XMLNS.ns1:webserviceIn.Content.sap_zppickpack
         OPTIONS FolderBitStream
         ENCODING InputProperties.Encoding
         CCSID InputProperties.CodedCharSetId
         );
-- TRY 1      
      CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNS')   PARSE (bodyBlob1
            ENCODING InputRoot.Properties.Encoding
            CCSID InputRoot.Properties.CodedCharSetId
            );
-- TRY 2           
        CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNS')   PARSE (bodyBlob1
            ENCODING InputRoot.Properties.Encoding
            CCSID InputRoot.Properties.CodedCharSetId
           SET 'BHG00KC002001'
              FORMAT 'sap_zppickpack'
              TYPE 'CwXML'
            );

Here is trace, and as you can see there is no namespaces on both XMLNS tags:

(
(0x01000000):Properties = (
(0x03000000):MessageSet = NULL
(0x03000000):MessageType = NULL
(0x03000000):MessageFormat = NULL
(0x03000000):Encoding = NULL
(0x03000000):CodedCharSetId = NULL
(0x03000000):Transactional = NULL
(0x03000000):Persistence = NULL
(0x03000000):CreationTime = NULL
(0x03000000):ExpirationTime = NULL
(0x03000000):Priority = NULL
(0x03000000):ReplyIdentifier = NULL
(0x03000000):ReplyProtocol = 'SOAP-HTTP'
(0x03000000):Topic = NULL
(0x03000000):ContentType = NULL
)
(0x01000010):XMLNS = (
(0x01000000):sap_zppickpack = (
(0x01000000):Data_record = (
(0x01000000):sap_zppickpack_cwdata = (
(0x01000000):sap_zppickpack_zppickpackheader000 = (
(0x01000000):sap_zppickpack_zppickpackheader000 = (
(0x01000000):ORDER_NUMBER = (
(0x02000000): = '000123456789'
)
(0x01000000):DELIVERY_DATE = (
(0x02000000): = '10092007'
)
(0x01000000):sap_zppickpack_zppickpacklines000 = (
(0x01000000):sap_zppickpack_zppickpacklines000 = (
(0x01000000):MATERIAL_NUMBER = (
(0x02000000): = '000000000000001230'
)
(0x01000000):ITEM_LINE = (
(0x02000000): = '000001'
)
(0x01000000):QUANTITY = (
(0x02000000): = '0000000000001000'
)
(0x01000000):REASON_CODE = (
(0x02000000): = 'PX'
)
)
)
)
)
)
)
)
)
(0x01000010):XMLNS = (
(0x01000000):sap_zppickpack = (
(0x01000000):Data_record = (
(0x01000000):sap_zppickpack_cwdata = (
(0x01000000):sap_zppickpack_zppickpackheader000 = (
(0x01000000):sap_zppickpack_zppickpackheader000 = (
(0x01000000):ORDER_NUMBER = (
(0x02000000): = '000123456789'
)
(0x01000000):DELIVERY_DATE = (
(0x02000000): = '10092007'
)
(0x01000000):sap_zppickpack_zppickpacklines000 = (
(0x01000000):sap_zppickpack_zppickpacklines000 = (
(0x01000000):MATERIAL_NUMBER = (
(0x02000000): = '000000000000001230'
)
(0x01000000):ITEM_LINE = (
(0x02000000): = '000001'
)
(0x01000000):QUANTITY = (
(0x02000000): = '0000000000001000'
)
(0x01000000):REASON_CODE = (
(0x02000000): = 'PX'
)
)
)
)
)
)
)
)
)
)
Code:


Am I just doing something stupid here?  The message set was created from XSD with namespaces in it.  The reason that I need to do this is because the mapping node expects the input data to have namespaces on it as well as the SAP adapter.

Thanks

_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Sep 21, 2007 3:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
DECLARE bodyBlob1 BLOB ASBITSTREAM(InputRoot.XMLNS.ns1:webserviceIn.Content.sap_zppickpack
OPTIONS FolderBitStream
ENCODING InputProperties.Encoding
CCSID InputProperties.CodedCharSetId
);



Why would you expect a namespace on the parse as very clearly your start point sap_zppickpack does not ?

After the parse go to your node and set the namespace:

Declare myns namspace = 'namespacevaluehere';

set OutputRoot.XMLNS.sap_zppickpack NAMESPACE = myns;

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Sep 21, 2007 5:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm a little confused by the use of 'message set'. If you're working with MRM-XML, then you don't need to worry about setting namespaces.

You can import a WSDL to create a message definition - but you need to work with the MRM domain in your code, rather than XMLNS.
_________________
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 » Add namespace with parse
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.