I have created a document webservice which worked fine for few days. Today I refreshed it by Registering the serice in AX( Path: Services -----> right Click and Choose “Add ins” ---- > “Register service”) and it is showing error in .net.
The error is , It is unable to access the AXD class.
I found that it because of security Key as mentioned in below link:
Error 1 The type or namespace name ‘AxdProjectQry’ does not exist in the namespace ‘PHIProjectDetails.ProjectSrvNameSpace’ (are you missing an assembly reference?) C:\Users\reddysa\documents\visual studio 2010\Projects\PHIProjectDetails\PHIProjectDetails\Program.cs 13 33 PHIProjectDetails
Aha, so this has nothing to do with security. You don’t see the proxy class that you expect to be generated in Visual Studio from the description of your service, correct?. How is your code in Visual Studio related to your original question about registering the service? Are you trying to simulate the registration?
You didn’t explain anything about what you’ve done in Visual Studio. Please do the following:
First of all, refresh the service reference to regenerate proxy classes. Then don’t try to find any class name directly - instead, look at what parameters your service operation accepts (or returns, depending on what you’re doing). Then navigate through properties of the type until you find what you’re looking for (or you prove that your service doesn’t support what you think it should support).
My guess it that you’re expecting an Axd class but the service accepts a *Request object instead.
I can’t comment on your specific situation, because I don’t have enough information.
But I noticed that the proxy classes are generated differently if I use, or don’t use data policies. If I remember it correctly, the services accepts an array of documents in one case and a request in the other. Although it surprised me, I didn’t investigate the root cause of this behaviour.
I’m now working on a document service, so I used the opportunity to check how it works (because I didn’t remember it exactly). It seems that if Customize documents checkbox is ticked on the inbound port, the service accepts an array of AxdEntity_ classes (e.g. AxdEntity_CustTable). If it’s not ticked, it accepts the _Axd_ class itself (e.g. AxdCustomer), which has a property for the array of entities.