Options

Web Service Problem

rajdeepsamantarajdeepsamanta Member Posts: 28
edited 2012-03-29 in NAV Three Tier
Hi,

I am trying to call 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!"


I am written code


CREATE(locautSoapHttpConnector);
locautSoapHttpConnector.Property('EndPointURL', 'http://localhost/DynamicsNAV/WS/'
+'CRONUS%20Retail%20India%20Ltd/Codeunit/DemoCU');

locautSoapHttpConnector.Connect;
locautSoapHttpConnector.Property('SoapAction','urn:microsoft-dynamics-schemas/codeunit/DemoCU:Capitalize');
locautSoapHttpConnector.BeginMessage;

CREATE(locautSoapSerializer);
locautSoapSerializer.Init(locautSoapHttpConnector.InputStream);
locautSoapSerializer.StartEnvelope('','STANDARD','utf-16');
locautSoapSerializer.StartBody;
locautSoapSerializer.StartElement('Capitalize');
locautSoapSerializer.StartElement('inputString');
locautSoapSerializer.WriteString('hellow');
locautSoapSerializer.EndElement;
locautSoapSerializer.EndElement;

locautSoapSerializer.EndBody;
locautSoapSerializer.EndEnvelope;
locautSoapHttpConnector.EndMessage;

CREATE(locautXmlDoc);
locautXmlDoc.load(locautSoapHttpConnector.OutputStream);
locautXmlDoc.save('c:\temp2.xml');


Can any body help me on this....

Thanks
Raj

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    maybe it's a typo, but the error says Capitalize1 and in your code

    locautSoapSerializer.StartElement('Capitalize');


    without the 1?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    rajdeepsamantarajdeepsamanta Member Posts: 28
    Hi,

    I am called a "DemoCU" webservice which is a codeunit. On that codeunit "Capitalize" is function which is taken "inputString"(Type is Text) as perameter and return with Uppercase of the input parameter.

    I don't under satand what I am written wrong so that it is taking null parameter.

    Can any body help me on this.

    Regards
    Raj
  • Options
    krikikriki Member, Moderator Posts: 9,089
    [Topic moved from 'Retail Management System' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.