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 » Creating XMLNSC in OutputRoot

Post new topic  Reply to topic
 Creating XMLNSC in OutputRoot « View previous topic :: View next topic » 
Author Message
deepnair
PostPosted: Tue Apr 17, 2012 9:57 am    Post subject: Creating XMLNSC in OutputRoot Reply with quote

Apprentice

Joined: 07 Feb 2012
Posts: 35

Hi - below are two cases i was testing today to create an XMLNSC parser within root and then attach Soap Element msg to it

Case 1: Input is
Code:

outBody = outRoot.createElementAsLastChild(MbXMLNSC.PARSER_NAME);
outBodySoapEnvelope = outBody.createElementAsLastChildFromBitstream(seEnvelopebyteArray,"", "", "", "", Integer.parseInt(sEncoding), Integer.parseInt(sCcsId), 0);

Output is
Code:

ÿÿÿÿ<XMLNSC><se:Envelope xmlns:se="http://www.w3.org/2003/05/soap-envelope"></se:Envelope></XMLNSC>


Case 2: Input is
Code:

outBody = outRoot.createElementAsLastChildFromBitstream(seEnvelopebyteArray,MbXMLNSC.PARSER_NAME, "", "", "",Integer.parseInt(sEncoding), Integer.parseInt(sCcsId), 0);

Output is
Code:

ÿÿÿÿ<se:Envelope xmlns:se="http://www.w3.org/2003/05/soap-envelope"></se:Envelope>


Which of these two is the best way to create an XMLNSC element inside OutRoot, note - there is an <XMLNSC> tag generated in case 1 but not in Case 2.

Thanks,
Deep Nair
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 17, 2012 12:30 pm    Post subject: Re: Creating XMLNSC in OutputRoot Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deepnair wrote:
Which of these two is the best way to create an XMLNSC element inside OutRoot, note - there is an <XMLNSC> tag generated in case 1 but not in Case 2.


Neither. Use the SOAP domain.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 17, 2012 11:55 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You should not need to do it this way. What does your message flow need to do?
Back to top
View user's profile Send private message
deepnair
PostPosted: Wed Apr 18, 2012 8:35 am    Post subject: Reply with quote

Apprentice

Joined: 07 Feb 2012
Posts: 35

Kimbert - I have a soap message coming as BLOB input and i need to convert it to XMLNSC in my JCN.

One way was to use an RCD node immediately before the JCN but i have a different requirement where the input need not be converted always to XMLNSC, so cannot use RCD here but need to do that in JCN based on a condition check.

any suggestions ?

Thanks,
Deep Nair
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 18, 2012 8:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deepnair wrote:
any suggestions ?


Use the SOAP domain.

Where is this message coming from? What's the transport?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deepnair
PostPosted: Wed Apr 18, 2012 9:31 am    Post subject: Reply with quote

Apprentice

Joined: 07 Feb 2012
Posts: 35

Vitor - the transport is MQ, the input is a BLOB message which i need to convert to XMLNSC in my JCN.

So far I have worked mostly on MRM, XMLNSC and BLOB kind of messages, by using SOAP u mean a SOAP parser (over MQ) ??

Thanks,
Deep Nair
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 18, 2012 9:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deepnair wrote:
the input is a BLOB message which i need to convert to XMLNSC in my JCN.


So, to focus down on the question (because I suspect I'm missing something) what makes this message a BLOB rather than a SOAP message or indeed raw XML? What makes this message different (for instance) from an XML document with no SOAP component arriving by WMQ? What needs to be "converted" and why in a JCN? Is it base64 encoded? Compressed?

Because a SOAP message is just an XML document which conforms to a publicly defined standard & can be parsed within XMLNSC by the MQInput node. WMB just offers helpers with SOAP.

deepnair wrote:
So far I have worked mostly on MRM, XMLNSC and BLOB kind of messages, by using SOAP u mean a SOAP parser (over MQ) ??


That's the root of my question; WMQ is blind to payload. So there's no such thing as a BLOB, MRM or XMLNSC message. What makes them stand out on your site that the inbuilt parsers don't work & you need a JCN?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 18, 2012 12:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
the input is a BLOB message which i need to convert to XMLNSC in my JCN
That's not quite what I meant.
The person who asked you to write this message flow did not say 'please convert this BLOB to XMLNSC'. What task is the message flow performing for the application that submits the MQinput message?
Quote:
the transport is MQ
I can believe that the SOAP nodes are not suitable - I don't think they support MQ as a protocol. But why not use an MQInput node with the Domain set to 'XMLNSC'. There must be some reason why you are not doing that, but what is it?

One more question about the code that you posted:
Code:
outBody = outRoot.createElementAsLastChildFromBitstream(seEnvelopebyteArray,MbXMLNSC.PARSER_NAME, "", "", "",Integer.parseInt(sEncoding), Integer.parseInt(sCcsId), 0);
You seem to have a BLOB that contains the SOAP envelope. Where did that BLOB come from, and why are you parsing it to create a message tree under OutputRoot.XMLNSC? It would seem easier to just output it as as BLOB in the BLOB domain.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 18, 2012 12:24 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
Quote:
the transport is MQ
I can believe that the SOAP nodes are not suitable - I don't think they support MQ as a protocol.


Even using a JMS binding?

kimbert wrote:
But why not use an MQInput node with the Domain set to 'XMLNSC'. There must be some reason why you are not doing that, but what is it?


Exactly what I was driving at.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Creating XMLNSC in OutputRoot
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.