Web Service in AX 2012

Hi all AX users,

I have one question to ask .

Is it possible to create and consume/Host the Web Service in AX 2012 using AIF without the help of any other tool (Visual Studio for example) ?

I have tried one of the way using WCF Test Client which calls the methods from AX but it seems that i fail in consuming and hosting the service.

So is it possible without using any third party tool ??

To consume or to host?

If you want to host a service, you just need to create it in AOT and to deploy its service group. AOS itself serves as WCF host.

If you want to consume a web service, the easiest way is to generate a managed proxy for the service - and the easiest way to do so is to use Visual Studio.

Hello Martin ,

Thanks for replying…

From your reply,i got to know that actually my requirement is to consume a web service which i have created and you told that it is necessary to generate a managed proxy.

So how can i achieve that ???

From a high-level perspective, just create a class library project in Visual Studio, add reference to the web service and use the generated types from X++ via .NET Interop.

See Walkthrough: Calling an External Web Service from X++ [AX 2012] for an example.

Thanks Martin for reply but my question is not to use any other tool except AX not even Visual Studio…Is it possible ??

Well, of course you can communicate directly with HTTP, create and parse SOAP messages etc. But you would likely need external libraries anyway, so why not to simply call a managed proxy?

If you don’t want Visual Studio, use wsdl.exe - but you should have a really good reason why not to any such tool, they simplify the whole thing a lot. If you don’t want them, be prepared for much more work.

Ya Martin true .

I have tried other tools for executing my wsdl file generated .Also parsed that WSDL file into XML but of no use .

I think i am going on a wrong track of performing my task.

And its a tedious task to perform.

Basically can you answer me a simple question .

Whats the main difference between Web Service and AIF ? and in what aspect they both are different. I am in a great dillema.

Web service is essentially a wrapper on AIF. Publishing as web service allows the underlying AIF to be called from web (http, soap etc). This way web service is called from disparate systems (ex - non Windows platforms such as Java etc).

AIF by default is file based integration mechanism. This can also be used for integration with disparate systems. But unlike web service, AIF can be used to bring in large volume of data.