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 » Convert XML to Character

Post new topic  Reply to topic
 Convert XML to Character « View previous topic :: View next topic » 
Author Message
Humbert
PostPosted: Mon Aug 22, 2005 12:35 pm    Post subject: Convert XML to Character Reply with quote

Newbie

Joined: 22 Aug 2005
Posts: 2

Hey everyone, I have this problem with XML embebed XML, this XML response a Webservice i need convert report to OutputRoot

Scenario:

MQInput-httpRequest-Compute-MQOutPut

<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <ns1:insertCompanyResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.services.com.mx">
<insertCompanyReturn xsi:type="xsd:string"><report> <operation>operation.insertcompany</operation> <response.code>company.insert.fail</response.code> <response.desc>company.insert.fail</response.desc> <error.cause>Illegal Conversion</error.cause> <transaction> </transaction> </report></insertCompanyReturn>
</ns1:insertCompanyResponse>
</soapenv:Body>
</soapenv:Envelope>


thanks!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 22, 2005 1:02 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the exact problem?

What errors are thrown?

What steps have you taken to solve this problem?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Humbert
PostPosted: Mon Aug 22, 2005 1:19 pm    Post subject: Reply with quote

Newbie

Joined: 22 Aug 2005
Posts: 2

thanks!

I need to extract the part <report> of the XML, and tried to remove it but alone I obtain characters instead of a XML

The XML is the answer of a webservice but the answer inside that XML is found and I need it to remove of there to be able to work with the

DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML."soapenv:Envelope"."soapenv:Body"."ns1:insertCompanyResponse".insertCompanyReturn, InputProperties.Encoding, InputProperties.CodedCharSetId,'','','',FolderBitStream);

DECLARE creationPtr REFERENCE TO OutputRoot.XML;

CREATE LASTCHILD OF creationPtr DOMAIN('XML') PARSE(bodyBlob, InputProperties.Encoding, InputProperties.CodedCharSetId);
Back to top
View user's profile Send private message
mgk
PostPosted: Mon Aug 22, 2005 2:16 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

If you have not created the XML parser under OutputRoot the DECLARE creationPtr REFERENCE TO OutputRoot.XML; will actually not create it either. Try forcing the parser to be created with a SET OutputRoot.XML.Top = 'created'; or something first just to see what happens.

Also seeing as you are using namespaces you really must use the XMLNS parser on the HTTPrequest Node not the XML one (NS = NameSpace aware)

Have you tried simply :
Set OutpuRoot.XMLNS.report = InputRoot.XMLNS.[...your path here...].report;
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Convert XML to Character
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.