Trying to follow the example, I created a Codeunit with a Function passing an XMLPort as a variable and I get the error below.
Then, when I do what it says and set the UseDefaultNamespace to True, I get an HTTP500 error and VisualStudio will not recognize the WebService.
Dave
<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">XmlPort Items used as parameter in method ItemXML of service WebServices, is not configured to use namespace. Please set UseDefaultNamespace property to Yes</faultstring>
- <detail>
<string xmlns="
http://schemas.microsoft.com/2003/10/Serialization/">XmlPort Items used as parameter in method ItemXML of service WebServices, is not configured to use namespace. Please set UseDefaultNamespace property to Yes</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Comments
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.
Dynamics West
http://www.dynamicswest.com
Dynamics West
http://www.dynamicswest.com
The way I found around that problem is described here:
http://blogs.msdn.com/freddyk/archive/2008/11/04/transferring-data-to-from-com-automation-objects-and-webservices.aspx
Note that there is no guarantee that there isn't any easier methods - but this one worked for me.
I urge you to read the post before using the code:-)
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.