Total Pageviews

Search This Blog

Tuesday, August 20, 2013

Troubleshooting "Cannot Compile WebProxy Error" Consuming Dynamics AX 2012 AIF Service through Sharepoint 2010 BCS (Business Connectivity Service)

[Update# 2]
*********************************************************************************
After some research and troubleshooting, I have come to the conclusion that AIF Web Services as of now are not compatible to be consumed directly by Sharepoint 2010 BCS Services. The workaround would be to write a wrapper/adapter in between AX and Sharepoint 2010 BCS .

Currently, I'm researching and doing a POC on REST Services to be used between Sharepoint 2010 and AX and have tasted some success :). Will write a separate post on the same.

[Update# 1]
*********************************************************************************
Please see the comments on this post for the latest update.

Additionally, During my troubleshooting, I have found that by default AIF Service which is hosted in AOS and uses nettcpbinding doesn't expose metadata to external apps like Sharepoint and Infopath.

I modified the service's config file through MSE to add the mexTcpBinding endpoint as shown below

 <endpoint address="net.tcp://localhost/DynamicsAx/Services/MyServiceGroup/mex"
     binding="mexTcpBinding" bindingConfiguration="" name="mexEp"
     contract="IMetadataExchange" />

Initially, I bumped into a few errors while configuring the service, eventually I was able to activate the service and then tested it through a .Net client. All works here as expected!

However, the Sharepoint BCS interface still gives the same error "Cannot compile web service proxy". I'm thinking now to host my AIF Service in IIS and give it a go. However, as per msdn, only we need to host AIF Services in IIS if we want to expose our service on internet. But, still I will give it a try and come back and update my findings here. If any feedback/comments, feel free to post here. Thanks again.

*********************************************************************************
Greetings Friends!

I have successfully developed a custom AIF Service in Dynamics AX 2012 (CU3 build) to create Vendor Invoice Register Journals. To test my AIF Service, I created a test harness in Visual Studio 2010 (Windows Application) to consume my AIF Service. This all works good!

Now, I'm taking this service to the next level so that I can consume it through our Sharepoint site (Please note this is a standalone enterprise Sharepoint site and not the Dynamics AX 2012 integrated Enterprise Portal one).

I'm using BCS (Business Connectivity Services) in Sharepoint 2010 to talk to Dynamics AX 2012 via webservice. So, when I consume this service from BCS (i.e. I created a new External Content Type via Sharepoint Designer 2010) and then use WebService as the Connection type in BCS. And it comes up with the below error.

Please read this post by Brandon to find a step by step info on the same issue which I'm facing http://instructorbrandon.com/dynamics-ax-aif-tutorial-series-part-3-aif-document-services-and-a-sharepoint-infopath-forms-step-by-step-for-power-users-part-e/

Here in the above blog, he managed to get a workaround by using Enterprise Search which comes out of the box in Dynamics AX 2012, However in my scenario we are not using EP :(



Any ideas, suggestions or comments appreciated? At the moment, I'm thinking of writing a wrapper .Net service between AIF and BCS and then consume the .Net Service from within BCS. But this is a workaround not a good one, I would have liked to directly tie BCS with AIF.

Please follow this forum where I have posted this issue. I will come back and update if I hit upon a solution/workaround

Thanks readers!!


Cheers,
Dilip



Monday, August 19, 2013

My Interview @ MSDynamicsWorld.com

Dear Friends,

Linda Rosencrance, a freelance writer was kind enough to interview me couple of weeks ago to do a Dynamics profile page at MSDynamicsWorld.com

This is my first interview for an online publication. Please read it over here http://msdynamicsworld.com/story/dynamics-profile-bangkok-india-australia-one-dynamics-ax-professionals-journey