[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Trouble using csc to compile webservice that access Axapta

sigmundlo

11/10/2005 9:31:00 AM

Now I'm getting frustrated. I have made a simple webservice that just logs on
to Axapta. Compiling it in Visual Studio works fine. But what if I want to
install this webservice on another server? I can't install VS everywhere.
It's really overkill.

So earlier in this forum I got a hint to use tlbimp.exe to generate a dll to
be used by .net's command line compiler csc.exe.

I used tlbimp on AxCom.dll, and got the AxaptaCOMConnector.dll.
My webservice is located at c:\inetpub\wwwroot\test
I created c:\inetpub\wwwroot\test\bin and moved AxaptaCOMConnector here.
Then I used csc:
C:\Inetpub\wwwroot\Test>csc.exe /out:bin\Axapta.dll /target:library
HelloWorld.a
smx.cs /reference:bin\AxaptaCOMConnector.dll

It compiles, but the webservice wont work. The browser doesn't understand
this line:
AxaptaCOMConnector.AxaptaClass mTest = new AxaptaCOMConnector.AxaptaClass();

I'm not sure if the /out: option should named Axapta.dll or
AxaptaCOMConnector.dll or something else.

Please help!
1 Answer

Mike Frank

11/11/2005 9:51:00 AM

0

If you are using Visual Studio to create your WebService, you normally would just add a reference to
the Axapta COM connector COM component to your project. In that case you don't need to invoke the
typelib importer (tlbimp.exe) yourself. When building the solution Visual Studio will create a
wrapper assembly automatically and name it Interop.AxaptaCOMConnector.dll by default.
You don't need to compile anything on the WebServer.

Of course you have to register the Axapta COM connector COM component on the WebServer.

Mike