Author |
Message
|
littlechild |
Posted: Wed Apr 25, 2007 11:46 am Post subject: This XML MSg is not working.PLZ help me out why? |
|
|
Novice
Joined: 22 Apr 2007 Posts: 17
|
The Below is the msg which i am trying to access the incoming xml from the Message tree and want it to store in a global environment but while doing
MbElement OutXML=message.getRootElement().getLastChild().getLastChild(); this is showing null value for OutXML.
but some different code is working .
can anybody tell why this is not working for above given Expression.
InputXml:
<?xml version="1.0" encoding="UTF-8"?>
<AscendantOne>
<SignonRq>
<SignonPswd>
<SignonRoleCd>String</SignonRoleCd>
<CustId>
<SPName>VehicleService Test WMB</SPName>
</CustId>
<CustPswd>
<EncryptionTypeCd>NONE</EncryptionTypeCd>
</CustPswd>
</SignonPswd>
<ClientDt>2001-12-17T09:30:47.0Z</ClientDt>
<CustLangPref>lang</CustLangPref>
<ClientApp>
<Org>FFIC</Org>
<CName>VehicleService</CName>
<Version>BETA</Version>
</ClientApp>
</SignonRq>
<ExternalSystemDomainRequest>
<ServiceName>VehicleService</ServiceName>
<DomainName>GetVehicleInfoProfile</DomainName>
<Parameters>
<Parameter>
<Name>VehTypeCd</Name>
<Value temporary="String" modifiable="String" offset="String">PASSENGERCARLIGHTTRUCK</Value>
</Parameter>
<Parameter>
<Name>ModelYear</Name>
<Value temporary="String" modifiable="String" offset="String">1999</Value>
</Parameter>
<Parameter>
<Name>Manufacturer</Name>
<Value temporary="String" modifiable="String" offset="String">Toyota</Value>
</Parameter>
<Parameter>
<Name>Model</Name>
<Value temporary="String" modifiable="String" offset="String">tacoma</Value>
</Parameter>
<Parameter>
<Name>BusinessSegment</Name>
<Value temporary="String" modifiable="String" offset="String">PERSONAL</Value>
</Parameter>
<Parameter>
<Name>BusinessTransactionType</Name>
<Value temporary="String" modifiable="String" offset="String">QUOTE</Value>
</Parameter>
<Parameter>
<Name>RegionalCostNewInd</Name>
<Value temporary="String" modifiable="String" offset="String">true</Value>
</Parameter>
<Parameter>
<Name>State</Name>
<Value temporary="String" modifiable="String" offset="String">ca</Value>
</Parameter>
<Parameter>
<Name>VehicleIdentificationNumber</Name>
<Value temporary="String" modifiable="String" offset="String">4TAPM62N1X</Value>
</Parameter>
</Parameters>
</ExternalSystemDomainRequest>
</AscendantOne> |
|
Back to top |
|
 |
TonyD |
Posted: Wed Apr 25, 2007 12:01 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Your post is not clear as to what the problem is ... however you should note that if you store a XML message in the Environment for later retrieval you must store it under an XML or XMLNS branch, e.g:
Code: |
CREATE LASTCHILD OF Environment DOMAIN 'XML' TYPE Name;
SET Environment.XML.AscendantOne = InputRoot.XML.AscendantOne; |
|
|
Back to top |
|
 |
littlechild |
Posted: Wed Apr 25, 2007 12:12 pm Post subject: |
|
|
Novice
Joined: 22 Apr 2007 Posts: 17
|
actually it is working that way with ESQL but with Java Compute Node there seems to be a problem....
somehow it can't locate the XML root using .getLastChild() but it is able to do so using .getFirstElementbyPath("RootName");
Can somebody plzzz help me in understanding the difference between these two? |
|
Back to top |
|
 |
EddieA |
Posted: Wed Apr 25, 2007 1:26 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Look at the message in a Trace node. There may be some "white space" at the end of the message, which is picked up instead of the last element.
Cheers. _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|