Author |
Message
|
deepnair |
Posted: Tue Apr 17, 2012 9:57 am Post subject: Creating XMLNSC in OutputRoot |
|
|
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 |
|
 |
Vitor |
Posted: Tue Apr 17, 2012 12:30 pm Post subject: Re: Creating XMLNSC in OutputRoot |
|
|
 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 |
|
 |
kimbert |
Posted: Tue Apr 17, 2012 11:55 pm Post subject: |
|
|
 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 |
|
 |
deepnair |
Posted: Wed Apr 18, 2012 8:35 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed Apr 18, 2012 8:50 am Post subject: |
|
|
 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 |
|
 |
deepnair |
Posted: Wed Apr 18, 2012 9:31 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed Apr 18, 2012 9:44 am Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Wed Apr 18, 2012 12:22 pm Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Wed Apr 18, 2012 12:24 pm Post subject: |
|
|
 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 |
|
 |
|