XML Web Services

Dave_CintronDave_Cintron Member Posts: 189
edited 2009-04-10 in NAV Three Tier
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/"&gt;
- <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>
Dave Cintron
Dynamics West
http://www.dynamicswest.com

Comments

  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    Anything in the Event Viewer?
    Freddy Kristiansen
    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.
  • Dave_CintronDave_Cintron Member Posts: 189
    No, absolutely nothing. I am developing on my laptop with the NAV Service Tier running on our server. It worked until I added the XMLPort parameter to the Codeunit, now it wants a namespace defined. How does it resolve <urn:microsoft-dynamics-nav/xmlports/x50000>?
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • Dave_CintronDave_Cintron Member Posts: 189
    Hold the phone. I just checked the SERVER event log and found it doesn't like the BLOB. Yes, I put the picture in there. How do we get that puppy over the wire?
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    Unfortunately that isn't as easy as all the rest.
    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:-)
    Freddy Kristiansen
    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.
Sign In or Register to comment.