Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

NAV SOAP Envelop

(0) ShareShare
ReportReport
Posted on by 100

hi I've trying to call the dimensions web service but I'll getting an internal error 500, the windows app logs say invalid SOAP envelop but not much more. Here is the soap request I'll sending:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ExportDimWS2 xmlns="urn:microsoft-dynamics-schemas/codeunit/wsdefaultdims"><dimCodeFilter>1</dimCodeFilter><dimValueCodeFilter>1</dimValueCodeFilter><onlyActive>false</onlyActive><timeOut>100</timeOut><priority>2</priority><xmlText>1</xmlText></ExportDimWS2></soap:Body></soap:Envelope> 

Can anyone see anything wrong with it? I removed the blank <soap:Header/> element to see if that was causing an issue. I'll also sending the SOAPAction header urn:microsoft-dynamics-schemas/codeunit/WSDefaultDims:ExportDimWS2.

Can anyone send me a working SOAP Envelop example? I'll trying to connect to NAV 2009 SP1.

*This post is locked for comments

  • ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    Thanks.

  • Suggested answer
    ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    After using a custom c# app and Fiddler we intercepted the following SOAP envelop:

    Request header: SOAPAction: "urn:microsoft-dynamics-schemas/codeunit/WSDefaultDims:ExportDimWS2"

    SOAP envelop:

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ExportDimWS2 xmlns="urn:microsoft-dynamics-schemas/codeunit/WSDefaultDims"><dimCodeFilter /><dimValueCodeFilter /><onlyActive>0</onlyActive><timeOut>0</timeOut><priority>0</priority><xmlText /></ExportDimWS2></soap:Body></soap:Envelope>

  • ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    We found SOAPUI would not work because we have using NTML V2 and SOAPUI uses V1

  • Suggested answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: NAV SOAP Envelop

    Hello,

    About the use of SOAPUI and NTLM Auth, I have never faced a problem with that. I just use the appropiate credentials including the domain as well where needed when getting the list of methods and also when actually sending the request (for some reason SoapUI does not keep the same credentials for both, it might just be my version though). 

  • ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    I've got a C# test app and Fiddler installed, so I'm going to try and grab the SOAP calls.

  • ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    Thanks. SOAP UI is normally my go to, but the version I had didn't support NTLM auth. I'm going to download the latest version. I've also using this in the past restclient-ui-3.1-jar-with-dependencies.jar it has NTLM support but it didn't work for me.

  • ahuakau Profile Picture
    ahuakau 100 on at
    RE: NAV SOAP Envelop

    Thanks I'll have a talk with the Nav consultant

  • Suggested answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: NAV SOAP Envelop

    Hello Ahuakau!

    In addition to what Roberto has said, I find that when I have to work with webservices and I can't use the method Roberto has suggested, I choose to get the connection working using SoapUI (you can download it and it's free). It allows you to give it a webservice URL and it will create samples for every function/method it can find. Also, when you go ahead and send a request, you will be able to see exactly what the Header looks like and what the parameters are, so you can copy the structure afterwards.

    Hope it helps!

  • Suggested answer
    Roberto Stefanetti Profile Picture
    Roberto Stefanetti 12,998 on at
    RE: NAV SOAP Envelop

    hi,

    only a suggestions, try with XMLPorts, look at this post:

    Using XMLports With Web Services

    community.dynamics.com/.../using-xmlports-with-web-services.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans