Quantcast
Viewing all articles
Browse latest Browse all 72043

Developing a custom app for Dynamics AX 2012 using REST

Hello,

I am trying to create a custom Windows Phone app for dynamics AX 2012.

I developed my rest service, and now I use fiddler to test it.

But I keep getting the error "405 method not allowed". What am I doing wrong? I followed the expense example.

Things I noticed:

- My service is online, because when I shut it down, fiddler returns me another error.

- My Servicebus is up and running, as I can see it on the Azure portal.

This is the operation I am trying to call in C#

[WebInvoke(
//UriTemplate = "GetEmployees?Action=Get", // URI:"https://<MyBus>.servicebus.windows.net/GetEmployeesRest/GetEmployees?Action=Create"
UriTemplate = "GetEmployees?Action=Create", 
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
public DEVEmployee[] GetEmployees()
{

}

My url configured in the app.config is:

<baseAddresses>
<add baseAddress="https://<MyBus>.servicebus.windows.net/GetEmployeesRest/"/>
</baseAddresses>

The way I call it then is:

https://<MyBus>.servicebus.windows.net/GetEmployeesRest/GetEmployees?Action=Create

With an authentication header.

Does someone know what I am doing wrong?

Thanks in advance.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>