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.