Author |
Message
|
Bharat_123 |
Posted: Mon Jan 19, 2009 11:07 am Post subject: Converting XML to BLOB and BLOB to XML |
|
|
Acolyte
Joined: 15 Sep 2008 Posts: 58
|
Hello All,
I have struck up with the following scenario
I am getting a XML message with 25 tags but the last 2 tags(Inbound, Outbound) of the XML message has X12 message. I need to send just Outbound tag X12 to main frame in BLOB format.
In continuation to above Mian frame send BLOB message to WMB , that message i need to capture in Outbound tag.
They both are diff flows.
Example of the XML
<Immediate_Process>
<CIscotags>
<Uname></Uname>
<Pwd></Pwd>
<NCode></Code>
<CiscoUserId></CiscoUserId>
<TVersion></TVersion>
<TType></TType>
<CSData><![CDATA[Request Identifier]]></CSData>
<Control_Id></Control_Id>
<DateTime></DateTime>
<Environment></Environment>
<Host_Name></Host_Name>
<TSource></Source>
<RespSubmitter></RespSubmitter>
<ClaimNumber></ClaimNumber>
<State></State>
<FailCode/>
<FailDesc/>
<AuditPt></AuditPt>
<MFResponse/>
<IpAddress/>
<Sub_Src_Cd/>
<Inbound><![CDATA[CDH Message]]></Inbound>
<Outbound>><![CDATA[CDH Message]]></Outbound>
</Ciscotags>
</Immediate_Process>
From the above XML message How do Transform Outbound tag value to BLOB and sent to main frame.
Hope i represented the issue right way. If u find difficult to understand i wil try to elobrate.
Any ideas / hints will appreciate.
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jan 19, 2009 3:23 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
What do you mean by 'BLOB format'? An example would help. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 19, 2009 7:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
From the looks of it his input message is going into the CData portion of his ouput message...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Bharat_123 |
Posted: Tue Jan 20, 2009 8:27 am Post subject: |
|
|
Acolyte
Joined: 15 Sep 2008 Posts: 58
|
Yes. Just the CDATA message of Outbound tag i am sending to Main frame.
BLOB...Common Copy book Format.
I need help to send particular Outbound tag CDATA converting into CDATA and sending to main frame and Receiving Copy book format Data back from main frame put back into Outbound tag of the Above mentioned XML message.
Thank You |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 20, 2009 8:41 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Extracting CDATA.
this has come up many times before in this forum
Have you searched for some examples? If I am stuck, I search before posting. I can often find the answer. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jan 20, 2009 1:52 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I hope your 'BLOB' is a string of valid XML characters. You should check that the allowed character values are all valid for XML - otherwise you are going to send badly-formed XML out of your flows. If you cannot be sure, you should base64 encode the string, or at least convert it to hexBinary. |
|
Back to top |
|
 |
Bharat_123 |
Posted: Tue Jan 20, 2009 4:10 pm Post subject: |
|
|
Acolyte
Joined: 15 Sep 2008 Posts: 58
|
kimbert wrote: |
I hope your 'BLOB' is a string of valid XML characters. You should check that the allowed character values are all valid for XML - otherwise you are going to send badly-formed XML out of your flows. If you cannot be sure, you should base64 encode the string, or at least convert it to hexBinary. |
Yes we will getting valid BLOB(copy book) string from Main frame. That string need to be attatch to the above mentioned XML structure |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jan 21, 2009 2:09 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Should be easy then. As smdavies says, just read the docs or search this forum to find out how to work with CData sections in an XMLNSC tree. |
|
Back to top |
|
 |
|