Skip to Content
author's profile photo Former Member
Former Member

Could not parse XMBMessage due to Can't parse the document

*Dear all,*

*i have a SOAP to RFC Scenario. XML Validation by Adapter is turned on in SenderAgreement.*

*XSD Files are placed in the correct directory. Incoming requests are validated. However,*

*it seems that responses produce an error in the soap adapter.*

*This is the error message i am getting:*



+<faultstring>Server Error</faultstring>+





+<text> Could not parse XMBMessage due to Can't parse the document+

+ at

+ at sun.reflect.GeneratedMethodAccessor678.invoke(Unknown Source)+

+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(

+ at java.lang.reflect.Method.invoke(

*In SXMB_MONI my response includes the following passages*

+- <!-- ************************************+


+<Trace level="3" type="T">Pipeline Service = PLSRV_XML_VALIDATION_RS_OUT</Trace>+

+<Trace level="3" type="T">Skip Inbound Validation =</Trace>+

+<Trace level="3" type="T">Skip Outbound Validation =</Trace>+

+<Trace level="3" type="T">Area = XML_VALIDATION_OUT</Trace>+

+<Trace level="1" type="T">Reading sender agreement</Trace>+

+<Trace level="3" type="T">Validation Mode = Validation by Adapter</Trace>+

+<Trace level="1" type="T">Outbound validation of response takes place</Trace>+

+<Trace level="3" type="T">Interface Name = SI_xxx_xxx_xxx_Sync_Outbound</Trace>+

+ Interface Namespace =>+

+<Trace level="3" type="T">Software Component Version = D390B9E10A6B11DF8C15C7540A484C06</Trace>+

+<Trace level="2" type="T">Java Validation Service Call</Trace>+

+<Trace level="1" type="T">System error occurred during XML validation</Trace>+

+<Trace level="1" type="E">CL_XMS_PLSRV_VALIDATION~ENTER_PLSRV</Trace>+


+<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />+

+- <!-- ************************************+


+<Trace level="3" type="T">Persisting message Status = 023</Trace>+

+<Trace level="3" type="T">Message version 009</Trace>+

+<Trace level="3" type="T">Pipeline CENTRAL</Trace>+


*I see the following error message:*

+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>+

+- <!-- Aufruf eines Adapters+


-" xmlns:SOAP="">



<SAP:P1>Schema xxx.response.xsd not found in J:\usr\sap\xxx\SYS\global\xi\runtime_server\validation\schema\00000000000000000000000000000000\ u00D3u00B9u00E1 k u00DFŒ u00C7T HL \SI_xxx_xxx_xxx_Sync_Outbound\urnsap-comdocumentsaprfc~functions\xxx.response.xsd (J:\usr\sap\xxx\SYS\global\xi\runtime_server\validation\schema)</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>not used at the moment.</SAP:AdditionalText>

<SAP:Stack>System error occurred during XML validation</SAP:Stack>



There seems to be an error in the adapter trying to validate the response. Does anyone has a clue as to why ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2011 at 08:35 AM


    <SAP:P1>Schema Z_HE_FREIGABE_KASSE.response.xsd not found in

    your error message clearly indicate that XSD not fond in the specified path

    untime_servervalidationschema 0000000000000000000000000000000 Ӑ¹á k ߌ ÇT HL SI_xxx_xxx_xxx_Sync_Outboundurn~sap-com~document~sap~rfc~functionsxxx.response.xsd

    Please make sure that it is available

    Also see the doc for details

    Expand the Schema folder in RHS. Select the relevant SCW and Interface Name.
    <SAP installation directory>/<system id>/<instance number>/j2ee/cluster/server0/validation/schema/<GUID of software component version to which Service Interface is assigned>/<Repository Namespace of Service Interface>
    It is to be noted that the folder where exported schema needs to be saved (i.e. RHS) the folder should be like urn~VisaDetailsUpdateRequest

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Since i cannot get i running, i helped myself using a java mapping, that i packaged into a jar

      along with the xsd files. See code below:

      import javax.xml.transform.sax.SAXResult;
      import javax.xml.transform.sax.SAXSource;
      import javax.xml.validation.Schema;
      import javax.xml.validation.SchemaFactory;
      import javax.xml.validation.Validator;
      import org.xml.sax.InputSource;
      import org.xml.sax.SAXException;
      public class CustomValidator extends AbstractTransformation {
      	public void transform(TransformationInput arg0, TransformationOutput arg1)
      			throws StreamTransformationException {
      		Validator validator;
      		InputStreamReader insr;
      		String inputPayloadString;
      		try {
      			// Trace
      			getTrace().addInfo(" called");
      			InputStream inputPayloadStream = arg0.getInputPayload()
      			insr = new InputStreamReader(inputPayloadStream);
      			InputHeader inpHeader = arg0.getInputHeader();		
      			String intfName = inpHeader.getInterface();
      			getTrace().addInfo("Interface Name is :" + intfName);
      			String xsdName = "";
      			if (intfName
      					.equalsIgnoreCase("SI_xxx_Sync_Outbound")) {
      				xsdName = "Z_xxx.xsd";
      			if (intfName.equalsIgnoreCase("SI_xxx")) {
      				xsdName = "Z_xxx.xsd";
      			if (intfName
      					.equalsIgnoreCase("SI_xxx_Sync_Outbound")) {
      				xsdName = "Z_xxx.xsd";
      			if (intfName
      					.equalsIgnoreCase("SI_xxxx_Sync_Outbound")) {
      				xsdName = "Z_xxx.xsd";
      			getTrace().addInfo("Using schema: " + xsdName);
      			if (xsdName.equals(""))
      				throw new StreamTransformationException("Schema für "
      						+ intfName + " nicht gefunden.");
      			BufferedReader reader = new BufferedReader(new InputStreamReader(
      							"/com/xxx/pi/mapping/xsd/" + xsdName)));
      			// prepare document validator:
      			String schemaLang = "";
      			SchemaFactory jaxp = SchemaFactory.newInstance(schemaLang);
      			Schema schema = jaxp.newSchema(new StreamSource(reader));
      			validator = schema.newValidator();
      		} catch (SAXException saxe) {
      			throw new StreamTransformationException(saxe.getMessage());
      		// validate
      		try {
      			SAXSource source = new SAXSource(new InputSource(insr));
      		} catch (Exception e) {
      			String trace = e.getMessage();
      			throw new StreamTransformationException(trace, e.getCause());
      		// Write the response
      		try {
      			inputPayloadString = convertStreamToString(arg0.getInputPayload()
      			getTrace().addInfo("Schema Validierung erfolgreich !");
      		} catch (Exception e) {
      			throw new StreamTransformationException(e.getMessage());
      	// helper to convert to String
      	private static String convertStreamToString(InputStream in) {
      		StringBuffer sb = new StringBuffer();
      		try {
      			InputStreamReader isr = new InputStreamReader(in);
      			BufferedReader reader = new BufferedReader(isr);
      			String line;
      			while ((line = reader.readLine()) != null) {
      		catch (Exception exception) {
      		return sb.toString();

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.