web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

I created a web service in Dynamics AX, I want to test whether it works properly

(1) ShareShare
ReportReport
Posted on by 82

Hello everyone,

I created a service in Dynamics AX 2012 and added it to a service group, which generated a WSDL URL. I want to test this web service. For example, my WSDL URL is:

http://xxxx:8101/DynamicsAx/Services/TestWebService.

I defined a class with two functions and linked this class to the service. I want to see the values I send from Postman or a C# console application inside AX.

 

Here is the code from my class:

 

[DataContractAttribute]
class MyWebServiceRequest
{
str name;
str description;
}

[DataMemberAttribute("Name")]
public str parmName(str _name = name)
{
name = _name;
return name;
}


[SysEntryPointAttribute(true)]
public str parmDescription(str _description = description)
{
description = _description;
return description;
}

I tried testing it with Postman and C#, but it didn’t work. Could you please help me with this?

 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    You'll need to tell us more than that you tried something and it didn't work.
     
    What C# code did you use and what HTTP requests(d) did you send from Postman. What response did you get in each case?
     
    Do you understand that the WSDL URL and the service URL are two different things? What happens if you open the WSDL URL in a web browser?
  • HY-12030737-0 Profile Picture
    82 on at
    Hi Martin,

    Thanks for your reply.

    When I open the WSDL URL in a web browser, it returns an XML file, so it seems accessible. However, when I try to send a POST request from Postman, I get a 404 Not Found error. If I try a GET request in Postman, it also returns an XML structure (similar to what I see in the browser).

    To be honest, I’m not exactly sure how to properly test my Dynamics AX web service using Postman. I would really appreciate some guidance on how to structure the request (especially the headers and the body) or how to test this correctly.

    Thanks in advance for your help.

    Best regards,
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    WSDL file isn't the web service. It's a file describing the web service, i.e. what operations it has (and where they are), types of parameters etc. You can use it to generate a service client in Visual Studio, for example.
     
    But when you want to actually call the web service, you need to call the web service operation, not the WSDL file describing the service. You could it operation URL inside WSDL, namely the soapOperation attribute. But you don't need to care about it; you can generate client code for your web service in Visual Studio (with Add Service Reference) and call use a method to call the operation. You'll work with objects and methods, without having to deal with details of the SOAP protocol or so.
     
    Using Postman is possible (if you expose an HTTP endpoint), but it's not completely straithforward, because messages with the SOAP protocol are more complex then with REST. It may be easier for you to avoid that if you have no idea about these things (and you rather use C# classes as mentioned above), but if you insist, look at Using Postman to Test AX 2012 Web Services, for instance. Also notice that you can import WSDL to Postman.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans