Hi,
I am trying to consume a webservice which takes parameter, while passing parameter to the webservice via SOAP the input parameter value always passes as NULL.
Getting the Error : "Parameter inputString in method Capitalize1 in service Capitalize is null!"
Regards
Vikas Sharma
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
i am using SOAP toolkit 3.0 and my code is as follows:
CREATE(locautSoapHttpConnector);
locautSoapHttpConnector.Property('EndPointURL', 'http://localhost:7047/DynamicsNav/ws/CRONUS_Retail_India_Ltd/Codeunit/Capitalize');
locautSoapHttpConnector.Connect;
locautSoapHttpConnector.Property('SoapAction','urn:microsoft-dynamics-schemas/codeunit/Capitalize');
locautSoapHttpConnector.BeginMessage;
CREATE(locautSoapSerializer);
locautSoapSerializer.Init(locautSoapHttpConnector.InputStream);
locautSoapSerializer.startEnvelope('SOAP','STANDARD');
//tempvar := 'helloworld';
locautSoapSerializer.startBody('STANDARD');
locautSoapSerializer.startElement('Capitalize1');
locautSoapSerializer.startElement('InputString');
locautSoapSerializer.writeString('45');
locautSoapSerializer.endElement;
locautSoapSerializer.endElement;
locautSoapSerializer.endBody;
locautSoapSerializer.endEnvelope;
locautSoapHttpConnector.EndMessage;
CREATE(locautXmlDoc);
locautXmlDoc.load(locautSoapHttpConnector.OutputStream);
locautXmlDoc.save('c:\temp2.xml');
The web service is Capitalize and it has function Capitalize1 which take integer as a parameter.
Thanks & Regards
Vikas
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I tried with the modification you send but the error remains the same.
Thanks & Regards
Vikas Sharma
I did notice in your errormessage inputString was written with lower case i and in your SOAP above it is written with Capital I - I do think that they are case sensitive.
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Thanx Freddy and Kamil.
Regards
Vikas
I have the same problem with my web service published in Dynamics. I'm trying to access to method "CreateOrder" with parameter "parVendor". But i have always the same error:
Parameter parVendor in method CreateOrder in service CreateDocuments is null!
I don'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
Can somebody help me with that.
Thanks. ](*,)
At the customers site, the WebService servicetier was installed after and separated from the RTC Servicetier with another name.
And believe it or not, but our solution to get rid of the NULL error was to remove both servicetiers and create them again, in one Service- subdirectory and, most important, with 1 instance name!