i try with codeunit 12 and published.. and checked thru internet explorer.
localhost:7047DynamicsNAV/WS/CRONUS_International_Ltd/services
working fine and list "GenJnlCodeLine " but
localhost:7047DynamicsNAV/WS/CRONUS_International_Ltd/CodeUnit/GenJnlCodeLine
then face issue.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<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 newGLReg of the type INavRecordHandle in method GetGLReg in service GenJnlCodeLine is invalid!
</faultstring>
<detail>
<string xmlns="
http://schemas.microsoft.com/2003/10/Serialization/">
Parameter newGLReg of the type INavRecordHandle in method GetGLReg in service GenJnlCodeLine is invalid!
</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Comments
The Codeunit 12 is not intended to be exposed as a Web Service.
You will need to write your own Codeunit which then uses codeunit 12.
Your own codeunit can be then exposed as a web service.
The reason for this is that Methods (Functions) in NAV exposed as Web service do not support "Record" as a parameter.
If you look at the codeunit 12 and function The variable NewGLReg is passed as a "Record" from "G/L Register" table.
This is not allowed.
I hope this helps.