Hi All,
I have created a Web service on AX. I created an operation 'createPurchaseOrder' and a method in the class. I want to call this url from my browser. Looks like the base url without any parameters works fine, but when I added the method name prefix with '?' i.e. http://<servername>:8101/DynamicsAx/Services/My_WebServices?createPurchaseOrder doesn't work. Any insight into this issue?
Here is an update. I got WSDL from above. It is not an issue. I am trying to consume the AX custom service in ASP .Net Web API. Here is the code, which gives an error 'Update has been cancelled'. There is no inner exception. Please share your thoughts on what could be an issue?
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
try
{
NOR_WebServicesRef.NOR_WebServiceCreatePurchaseOrderClient poserviceclient = new NOR_WebServicesRef.NOR_WebServiceCreatePurchaseOrderClient();
poserviceclient.createPurchaseOrder(new NOR_WebServicesRef.CallContext());
return new string[] { "value1", "value2" };
}
catch(Exception ex)
{
return new string[] { "error", ex.Message };
}
}
*This post is locked for comments
I have the same question (0)