I have created a function named "
PostPayment" in a codeunit which accepting Gen. Journal Line as a parameter and after publishing it to the Web Service form with name "
Gen_Journal_1", I can get the Service in the WSDL file but when i am going to access that service it's giving an error.
Error in xml format
- <s:Envelope xmlns:s="
http://schemas.xmlsoap.org/soap/envelope/">
- <s:Body>
- <s:Fault>
<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Service.WebServices.ServiceBrokerException</faultcode>
<faultstring xml:lang="en-US">Parameter genJrnl of the type INavRecordHandle in method PostPayment in service Gen_Journal_1 is invalid!</faultstring>
- <detail>
<string xmlns="
http://schemas.microsoft.com/2003/10/Serialization/">Parameter genJrnl of the type INavRecordHandle in method PostPayment in service Gen_Journal_1 is invalid!</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Please let me know where i am wrong.
With regards,
Deepankar
Comments
If u use Record type variable in parameters in code unit and want to use as web service then u get problem so, do not use record type variable in code parameter unit which u want in web service
:thumbsup:
Ashish Gupta
SS Dynamics Solutions Pvt. Ltd.
Navision Technical Consultant
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Can you tell me, one more thing that if we want to return record set or array variables then what method shall we follow ?
With regards,
Deepankar
http://blogs.msdn.com/nav/archive/2009/ ... am+Blog%29
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
What's interesting service name can't contain spaces, otherwise functions from CU will not be added to page methods