|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Convert XML to Character |
« View previous topic :: View next topic » |
Author |
Message
|
Humbert |
Posted: Mon Aug 22, 2005 12:35 pm Post subject: Convert XML to Character |
|
|
 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 |
|
 |
jefflowrey |
Posted: Mon Aug 22, 2005 1:02 pm Post subject: |
|
|
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 |
|
 |
Humbert |
Posted: Mon Aug 22, 2005 1:19 pm Post subject: |
|
|
 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 |
|
 |
mgk |
Posted: Mon Aug 22, 2005 2:16 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|