Skip to Content
0
Former Member
Sep 05, 2007 at 06:31 PM

Schema Validation

20 Views

I have written a java program to do schema validation and implemented/tested it successfully in interface mapping in XI.

When the validation succeeds, I am forwarding the input message to a receiving system.

When the validation fails, I am creating an error response using xsl - named outputMessage. outputMessage is of javax.xml.transform.Result type.

Throwing StreamTransformationException(new StringBuffer().append(outputMessage).toString()); is giving the following error message:

<?xml version="1.0"?>

<!-- see the documentation -->

http://schemas.xmlsoap.org/soap/envelope/">

<SOAP:Body>

<SOAP:Fault>

<faultcode>SOAP:Server</faultcode>

<faultstring>Server Error</faultstring>

<detail>

http://sap.com/xi/WebService/xi2.0">

<context>XIAdapter</context>

<code>RecoverableException</code>

<text><![CDATA[

com.sap.aii.af.ra.ms.api.DeliveryException: Application:STREAM_TRANSFORMATION_EX:

at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:453)

at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)

at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:834)

at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

]]></text>

</s:SystemError>

</detail>

</SOAP:Fault>

</SOAP:Body>

</SOAP:Envelope>

How do I send my customized error message 1. either as a normal response 2. or as a fault response.

I have read through many blogs and forum messages on SDN but couldn't figure this out.

Any help is appreciated.

Thanks,

Badari