IF ISCLEAR(autXMLDom) THEN CREATE(autXMLDom); recTmpBlob.Blob.CREATEOUTSTREAM(strOutStream); //xmlFA.SETDESTINATION(strOutStream); IF XMLPORT.EXPORT(50000, strOutStream, precJob) THEN BEGIN recTmpBlob.Blob.CREATEINSTREAM(strInStream); autXMLDom.load(strInStream); lblnExportOK:=TRUE END ELSE BEGIN lblnExportOK:=FALSE; END; autXMLDom.save('c:/test1.xml'); IF ISCLEAR(SoapHttpConn) THEN BEGIN CREATE(SoapHttpConn); END; SoapHttpConn.Property('EndPointURL','http://localhost/WTWebService/SyncJobs.asmx'); SoapHttpConn.Connect; SoapHttpConn.Property('SoapAction','http://tempuri.org/JobExists'); SoapHttpConn.BeginMessage; IF ISCLEAR(SoapSerialize) THEN BEGIN CREATE(SoapSerialize); END; SoapSerialize.Init(SoapHttpConn.InputStream); SoapSerialize.StartEnvelope('','STANDARD'); SoapSerialize.StartBody; SoapSerialize.WriteXml('<JobExists xmlns="http://tempuri.org/" />'); //---------------------------------------------------------------------------------------------------------------------------------- //*** Parameters doorgeven //---------------------------------------------------------------------------------------------------------------------------------- SoapSerialize.WriteXml('<JobExists xmlns="http://tempuri.org/">' + '<xmlJob></xmlJob>' + '</JobExists>'); SoapSerialize.EndBody; SoapSerialize.EndEnvelope; SoapHttpConn.EndMessage; IF ISCLEAR(pxmlJobExists) THEN BEGIN CREATE(pxmlJobExists); END; pxmlJobExists.async := FALSE; pxmlJobExists.load(SoapHttpConn.OutputStream); pxmlJobExists.save('c:/test.xml'); EXIT(lblnExportOK);
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Server was unable to read request. --> There is an error in XML document (1, 482). --> Cannot import a null node.</faultstring> <detail/> </soap:Fault> </soap:Body> </soap:Envelope>
Comments
I seem to experience the same problem here. Parameters passed from Navision using the SOAP Toolkit are received by the webservice as blank values.
I will keep you posted, should I find a solution. Will you do the same?
Jan Hoek
Product Developer
Mprise Products B.V.
Jan Hoek
Product Developer
Mprise Products B.V.
your webservice expects a string. So you have to encode your inner XML-document.
<myInnerNode> = > <myInnerNode/>
egony
Jan Hoek
Product Developer
Mprise Products B.V.
I'm made the same search and I find sample on MSDN : http://msdn.microsoft.com/MBS/TechArticles/Navision/default.aspx
There are two links that show you how to communicate between a web service and Navision trought MS Mqueue.
I succeed to develop it. It's fun and open many opportunities... I hope for you too
Jan Hoek
Product Developer
Mprise Products B.V.
This is exactly what I have been looking for for days