on 09-24-2007 10:30 AM
I hope someone can help with this:
I have provided an external developer with the wsdl for one of our webservices. As part of his testing he forces a validation error by sending a message with one field containing too much data. As expected he gets an error on his side....but <b>the error message is useless to him</b>.
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>RecoverableException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:133)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:850)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
......
]]>
In SXMB_MONI I see a much nicer error that is much more useful and pinpoints the exact error:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Inbound Message
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIProxy</SAP:Category>
<SAP:Code area="ABAP">PARSE_APPLICATION_DATA</SAP:Code>
<SAP:P1>Request Message</SAP:P1>
<SAP:P2>CX_ST_DESERIALIZATION_ERROR</SAP:P2>
<SAP:P3>/1SAI/TXS00000000000000000019</SAP:P3>
<SAP:P4>XML Bytepos.: 565 XML Path: ns0:EUK_MT_ProjectSAP(1)USER_FIELD_CHAR20_1(12) Error Text: Data loss occurred when converting test blah blah blah blah blah blah blah blah blah blah blah blah Kernel ErrorId: CONVT_DATA_LOSS</SAP:P4>
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXS00000000000000000019 XML Bytepos.: 565 XML Path: ns0:EUK_MT_ProjectSAP(1)USER_FIELD_CHAR20_1(12) Error Text: Data loss occurred when converting test blah blah blah blah blah blah blah blah blah blah blah blah Kernel ErrorId: CONVT_DATA_LOSS)) An error occurred when deserializing in the simple transformation program /1SAI/TXS00000000000000000019 Data loss occurred when converting test blah blah blah blah blah blah blah blah blah blah blah blah</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
So my question is this: <b>How do I get the 'nice' error message sent back instead of the stack trace?</b> (I have specified a fault message type in my message interface and that hasnt helped...)
I found thie solution using this blog:
<a href="/people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client: Propagation of meaningful error information to SOAP Client</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dear armando,
could you share your solution with us please? this blog indeed describes how to define fault message in the interface, but as far as i'm concerned, there is no solution for the actual problem there, which is returning fault message from the abap stack.
is there some kind of a trick you found there?
as a test i made a simple interface Java Client -> SOAP Adapter<->XI Adapter -> ABAP Proxy using a message with one field type integer and passed 'aa' string to it.
It went to abap stack and before reaching my proxy implementation, framework thrown the error, similar to what you posted here in the opening post. But my java client is getting this:
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text><![CDATA[
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIProxy:PARSE_APPLICATION_DATA:
at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1006)
at sun.reflect.GeneratedMethodAccessor913.invoke(Unknown Source)
...
]]>
what is your solution to this??
thanks+best regards
simon:)
armando,
I assume, it is sync scenario, where u use XI's sender soap adapter, so XI is like web service. Right?
The exception u sent - is it a message returned by target application?
Do you use standard faulr messages?
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes peter, it is a sync scenario. The error is returned by the application system. . In this case the exception is raised before my code is executed - I guess that the proxy framework must be validating the xml beore copying it into the abap data structures and before calling my code. (I have tested the other way of raising an exception myself in the ABAP proxy and that seems ok).
So the error getting sent back to xi that is visible in SXMB_MONI is decent. but going back to the soap caller is just a stack trace...
I am using the standard fault messages.
Message was edited by:
armando spagnolo to fix spelling
you can use message table for getting messages
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.