aspose file tools*
The moose likes Web Services and the fly likes cannot be cast to org.apache.axiom.om.OMElement Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "cannot be cast to org.apache.axiom.om.OMElement Exception" Watch "cannot be cast to org.apache.axiom.om.OMElement Exception" New topic
Author

cannot be cast to org.apache.axiom.om.OMElement Exception

jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 85

Hi,

I was trying to submit soap message via SOAP UI. But I get return response "org.apache.axiom.om.impl.llom.OMTextImpl cannot be cast to org.apache.axiom.om.OMElement" I want to make sure soap message i have submitting is fine.

SOAP Error Response :

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Receiver</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">org.apache.axiom.om.impl.llom.OMTextImpl cannot be cast to org.apache.axiom.om.OMElement</soapenv:Text>
</soapenv:Reason>
<soapenvetail/>
</soapenv:Fault>
</soapenv:Body>
</soapws:env:Envelope>

SOAP MEssage :

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://ab.cc.dd.com">
<soap:Header/>
<soap:Body>
<ws:processNPCMsg xmlns:ns1='http://ab.cc.dd.com'>
<ws:userId>abcde</ws:userId>
<ws:password>dGVzdGl0YTQ=</ws:password>
<ws:xmlMsg>
<NPCMessageData>
<NPCData>
<MessageHeader>
<LSAID>AP</LSAID>
<PortType>MOBILE</PortType>
<TransactionID>AP201401061733481300477</TransactionID>
<MessageID>1001</MessageID>
<MsgCreateTimeStamp>20140106173348</MsgCreateTimeStamp>
<Sender>130</Sender>
</MessageHeader>
<NPCMessage>
<PortRequest>
<NumberRange>
<NumberFrom>1010501010</NumberFrom>
<NumberTo>1010501010</NumberTo>
</NumberRange>
<Donor>120</Donor>
<Recipient>130</Recipient>
<AccountPayType>Prepaid</AccountPayType>
<PortingCode>AM123456</PortingCode>
<SubRequestTime>20140106173349</SubRequestTime>
</PortRequest>
</NPCMessage>
</NPCData>
</NPCMessageData>
<ws:/xmlMsg>
<ws:/processNPCMsg>
<soap:/env:Body>
<soap:/env:Envelope>


Regards,
Jay
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot be cast to org.apache.axiom.om.OMElement Exception