Skip to Content
0
Former Member
Feb 02, 2010 at 01:18 PM

How to send the SOAP Fault Message to the Web Service Consumer

154 Views

Hi,

I have configured SAOP to Proxy Syncronous Scenario in PI 7.1 and using XML Validation in Adapter Engine to Validate the Structure of the Message Payload.The scenario is working fine.When some of the Filed's Length increses the maxLength specified in the Data Type . We are getting the Following error.

<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>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: XML Validation for payload with root element name MT_Out_CustomerMaster_FPMReq , target namespace http://Pegasystems.com/I06_Customers Failed!Errors Encountered During Parsing 
1.cvc-maxLength-valid: Value '123456789' with length = '9' is not facet-valid with respect to maxLength '8' for type 'null'.
2.cvc-type.3.1.3: The value '123456789' of element 'CompanyCode' is not valid.
3.cvc-maxLength-valid: Value 'asdf' with length = '4' is not facet-valid with respect to maxLength '1' for type 'null'.
4.cvc-type.3.1.3: The value 'asdf' of element 'OperationType' is not valid.

	at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1164)

My question is How does the Web Service Consumer can handle this Soap Server Error in the SOAP Fault.Or How can we provide a specific information like 'The value '123456789' of element 'CompanyCode' is not valid.It exceeds the Maximum Length'.

I read this /people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client blog .Where it is mentioned that the Web Service Consumer can handle while calling the Web Service.Is there any other solution?

Kindly appreciate your help.