Parameter in web service method is null!

Pedro_IñiguezPedro_Iñiguez Member Posts: 7
edited 2011-10-25 in NAV Three Tier
Hi,

I'm trying to access to method "CreateOrder" with parameter "parVendor". But i have always the same error:

Parameter in method CreateOrder in service CreateDocuments is null!

I haven't idea of what is the problem with my code. I hav e try to call another simple method like HelloWorld and i didn't have any problem.

My code:

CREATE(locautSoapHttpConnector);

locautSoapHttpConnector.Property('EndPointURL',
'http://localhost:7047/DynamicsNAV/WS/[MyCompany]/Codeunit/CreateDocuments');
l
ocautSoapHttpConnector.Connect;
locautSoapHttpConnector.Property('Timeout', 5 * 1000);

locautSoapHttpConnector.Property('SoapAction',
'urn:microsoft-dynamics-schemas/Codeunit/CrearDocumentos/CreateOrder');

locautSoapHttpConnector.BeginMessage;

CREATE(locautSoapSerializer);
locautSoapSerializer.Init(locautSoapHttpConnector.InputStream);
locautSoapSerializer.startEnvelope('SOAP','STANDARD');
locautSoapSerializer.startBody;
locautSoapSerializer.startElement('CreateOrder');
locautSoapSerializer.startElement('parVendor');
locautSoapSerializer.writeString('Vend001'); //Any text
locautSoapSerializer.endElement;
locautSoapSerializer.endElement;
locautSoapSerializer.endBody;

locautSoapSerializer.endEnvelope;
locautSoapHttpConnector.EndMessage;


CREATE(locautXmlDoc);
locautXmlDoc.load(locautSoapHttpConnector.OutputStream);
locautXmlDoc.save('c:\temp1.xml'); //Here i save the result and is where i have the error i've said


I'm trying to connect to connect from one Nav2009SP1 instance "A" to another Nav20009SP1 instance "B". I don't know if this will show you more clearly what I want to do.

Can somebody help me with that.

Thanks.

Comments

Sign In or Register to comment.