wcf - 405 Method Not Allowed - Dynamics GP 2010 Web Service -
i trying access client's gp 2010 web service, error:
the request failed http status 405: method not allowed
.
the url http://www.xyz.com:48620/dynamics/gpservice
in visual studio, see url in add web reference box:
xyz:48620/metadata/wcf/full/schemas.microsoft.com.dynamics.gp.2010.01.wsdl
when visit url in browser, can see wsdl:
here wsdl code:
the customer has installed gp2010 web service , appears in browser. cannot add reference in visual studio. customer has added inbound , outbound firewall rule.
am using wrong url or there else install?
when add web reference, add localhost:48620/dynamics/gpservice . if need authenticate one, add change url:
// create instance of service dynamicsgp.core.dynamicsgpservice.dynamicsgp wsdynamicsgp = new dynamicsgp.core.dynamicsgpservice.dynamicsgp(); wsdynamicsgp.url = "http://www.mysite.com:48620/dynamicsgpwebservices/dynamicsgpservice.asmx"; // sure default credentials used wsdynamicsgp.usedefaultcredentials = true; wsdynamicsgp.credentials = new networkcredential("username", "password", "domain"); companycriteria cc = new companycriteria(); company[] c = wsdynamicsgp.getcompanylist(cc, new context()); return wsdynamicsgp;
Comments
Post a Comment