Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I'm trying to connect to a web service (WSDL) to rate shipments and return the least cost carrier.
I've gone through the steps of Tools/Development tools/.../Add Service Reference.
The URL is correct, and the service was created with the reference name I selected (RaterService)
I've restarted the AOS on our DEV box to allow it to add the reference DLL and app.config to the C:\users\...\ServiceReferences\ folder.
Based on what I can find on the web concerning this, in the app.config there, I needed to check for an 'Endpoint Configuration'
<endpoint address="https://<webaddress>/RaterService.asmx" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding" contract="RaterService.WcfClient.ISoapRaterService" name="BasicHttpBinding" />
Which leads me to believe I need to use 'BasicHttpBinding' as the endpoint in my code, below.
I've written a class to leverage the service, and the X++ code prompter shows the GetRate method in a dropdown as I type, then shows me tooltip text for the list of parameters passed:
(code snippet below)
// Create the SCAC request. soapClient = new RaterService.ISoapRaterServiceClient("BasicHttpBinding"); response = new RaterService.SoapRateResult(); response = soapClient.GetRate("<hex GUID here>","<company code>",_shipAcct, _consAcct,wghts,fcls,_palletCount,_isHaz,_dlvTerms);
So far, so good.
Yet, when I click Save/Compile, I get the following error:
The class RaterService.ISoapRaterServiceClient does not contain this function.
Can't figure out what I am doing wrong. The web class has the function shown IN it, and the code prompter shows that it sees it. Yet the compiler doesn't.
If this was a runtime issue I could at least debug, but this is a compile-time issue. Any help would be appreciated.
At which line does it fail? The one with GetRate()? If so, verify that you have the right number of parameters and their types.
What you pass to the ISoapRaterServiceClient's constructor is wrong. The binding isn't the endpoint to call - it describes how the call should be done, such as what authentication mechanism should be used. I recommend reading some basics about WCF (e.g. Endpoints: Addresses, Bindings, and Contracts); your job will be easier when you have some idea about the components. You could pass the endpoint URL to the constructor, but it shouldn't be needed - both the URL and the binding should be taken from the configuration line.
Also, you can throw away the line with response = new RaterService.SoapRateResult(). It does nothing useful and the value is immediately overwritten on the next line.
Thanks, Martin. Almost every time I've had an issue in AX, and I've wandered the net looking for a solution, it's come from you.
The situation above might need a little clarification. We have a 3rd party Logistics partner that we did business with years ago, and this WSDL was theirs, and worked perfectly then. Several years ago, we went with another 3PL, and turned off the call to the WSDL, though all the code and even the Service Reference were all in place.
Fast forward to recent times, we are back with this 3PL, and are trying to reactivate their WSDL. But the WSDL isn't working. The following things have changed, and required work to correct:
1. We've upgraded our AOS servers to OS 2012 R2 in order to get 'more current' and continue to receive updates, in prep for a move to D365
2. In the upgrade, we created brand new OS 2012 VM Servers, and the DLL for this service was not migrated across, as it wasn't needed at the time, and we'd forgotten about it. (Still have a 2008 R2 test server I could retrieve DLL etc from)
3. The WSDL URL and method names had changed slightly. Instead of http it was https, and a different subnet and folder.
4. The WSDL requires a security GUID (in the parms passed) and our old GUID is likely not valid anymore.
The GUID seems to me to be the most likely smoking gun for the trouble I'm having, but if the WSDL will register, and the DLL is created on the local DEV AOS users/axaosservice/.../Services/RaterService folder, and the X++ Editor prompts the methods and parms perfectly, I'm surprised an invalid GUID would not allow a compile.
I've read through the material on endpoints, and drilled through to explore additional material there on the WSDL functionality, though I helped wire in the original install years ago. The mind gets rusty and dusty in areas it's not exercised.
I've requested a new valid GUID, and if the compile suddenly 'works' I'll be sure to post that here.
Business Applications communities