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 » Unable to remove < and > from Output XML

Post new topic  Reply to topic
 Unable to remove < and > from Output XML « View previous topic :: View next topic » 
Author Message
dilse
PostPosted: Sat Sep 09, 2006 7:38 pm    Post subject: Unable to remove < and > from Output XML Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Hi All,
I am working on WMBV6 and WMQ6. I have a Web Service invocation flow that invokes a webservice. Here is the message flow path:

MQInput --> Compute(preparingSOAP from XML --> HTTPRequest --> Compute(remove HTTP Headers, Converting it to customized XML and prepare MQMD) --> MQOputpt

Web Service is responding when a request made with an xml in the following format:

Code:
<WebServiceResponse>
<isSuccess>true</isSuccess>
<responseMsg>String which represents an XML</responseMsg>
<responseLength>integer that represents the length of response</responseLength>
</WebServiceResponse>


Here are the steps in generating the Output:

1. I am recieving the SOAP response as XMLNS and preparing MQMD as follows:

Code:
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
SET OutputRoot.MQMD.StrucId = MQMD_STRUC_ID;
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.Encoding = InputRoot.Properties.Encoding;
SET OutputRoot.MQMD.CodedCharSetId = InputRoot.Properties.CodedCharSetId;


2. Making the HTTP Headers in the response NULL

Code:
SET OutputRoot.HTTPRequestHeader = NULL;
SET OutputRoot.HTTPResponseHeader = NULL;


3. Since I am getting the response XML as a String in a Tag called 'responseMsg', I am converting it to BLOB first and then converting it to XML using a PARSE command. Here is the Code

Code:
SET Environment.Variables.Application.BodyBlob = ASBITSTREAM(InputBody.soap:Envelope.soap:Body.rspNS:WebServiceResponse.rspNS:responseMsg OPTIONS FolderBitStream CCSID 1208);
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML' PARSE(Environment.Variables.Application.BodyBlob);


Even though I am converting the incoming String into BLOB and converting it to XML using PARSE command, I am unable to remove the '&lt;' and '&gt;' from the output.

Output Lookslike the following:

Quote:
<?xml version="1.0" encoding="UTF-8"?>
&lt;RESPONSE&gt;&lt;ORDERDATA&gt;&lt;DATESTAMP&gt;2005-06-29 00:00:00&lt;/DATESTAMP&gt;&lt;ORDERNUMBER&gt;1008&lt;/ORDERNUMBER&gt;&lt;PONUMBER&gt;2104&lt;/PONUMBER&gt;&lt;AMOUNT&gt;21913&lt;/AMOUNT&gt;&lt;VENDORNUMBER&gt;&lt;/VENDORNUMBER&gt;&lt;/ORDERDATA&gt;&lt;/RESPONSE&gt;


Any help is appreciated in removing these characters from the output and replace with the '<' and '>' characters.

Thanks in advance,
DilSe..
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
dilse
PostPosted: Sat Sep 09, 2006 9:15 pm    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

I found a solution for this. So please ignore this. Here is the modification I made.

Instead of using ASBITSREAM, I used CAST to BLOB and then converted it to XML using PARSE.

DilSe..
_________________
DilSe..

Take life as it comes..
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 » Unable to remove &lt; and &gt; from Output XML
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.