Validating a SOAP Request against a WSDL

ta5ta5 Member Posts: 1,164
Hello
This might be slightly off topic, but anyway:

I need to validate a SOAP Request against its WSDL. This must be kind of similar to validating a xml-Document aginst its XSD, but I'm stuck here.
This is the code for validating a xml-Document against the XSD.
ValidateViaSchemaCache(_xmlDoc : Automation "'Microsoft XML, v6.0'.DOMDocument60";_xmlSchema : Automation "'Microsoft XML, v6.0'.DOMDoc

CREATE(xmlSchemaCache);
xmlSchemaCache.add(_NameSpace,_xmlSchema);

CREATE(xmlDocumentTmp);
xmlDocumentTmp.async := FALSE;
xmlDocumentTmp.schemas := xmlSchemaCache;

// Validation using load-method, while xmlDocumentTmp has a Schema attached
// (load-method has more/better possiblities than validate-method)
IF NOT xmlDocumentTmp.load(_xmlDoc) THEN BEGIN
  XMLParseError := xmlDocumentTmp.parseError;
  ERROR(Text001,
    XMLParseError.errorCode,
    XMLParseError.reason,
    XMLParseError.line,
    XMLParseError.linepos,
    XMLParseError.filepos);
END;

//Text001 = Error while validating the xml-Schema.\Error No.: %1\Error Text: %2
//\Line No.: %3\Line Position: %4\File Position: %5

Thanks in advance for any tipps or advice
Thomas

Comments

  • Benno67Benno67 Member Posts: 39
    Hi Thomas,

    We are also in a discusion on validating soap requests within Navision, or outside Navision on IIS using a XSLT script.
    Did you manage to solve your problem?

    Regards

    Benno
  • ta5ta5 Member Posts: 1,164
    Hi Benno
    Hmm, long time ago. As far as I remember we managed to just validate the xml documents. Also we changed from using soap toolkit to using xmlhttp.
    Regards
    Thomas
Sign In or Register to comment.