getting a http 405 error when calling an asmx web service using php. have configured iis to allow GET, POST on the server. any assistance is greatly appreciated.
figured this out. unchecked IE internet options - advanced setting 'show friendly http error messages' and got a more descriptive error...array out of bounds.
Glad to hear that you have resolved the issue and thanks for sharing the solution here, it will be very beneficial for other community members who have similar questions. Thanks.
Best Regards.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
bukkybu
Member
35 Points
33 Posts
http 405 error calling asmx web service with php
Feb 25, 2013 03:02 PM|LINK
getting a http 405 error when calling an asmx web service using php. have configured iis to allow GET, POST on the server. any assistance is greatly appreciated.
here's the recieving code for the web service:
private string[][] BuildParameters(string myparam) { string[][] parameters = new string[0][]; parameters[0] = new string[] { "@myparam", myparam, "3" }; return parameters; } [WebMethod] public object GetScalarValue(string title) { dataAccess = new DA(); dataAccess.ConnectionString = GetConnectionString(); dataAccess.ProcedureName = "ExecStoredProcedure"; dataAccess.ProcedureParameters = BuildParameters(myparam); return dataAccess.GetScalarValue(); }here's the calling php code:
<?php $soap_client = new SoapClient(null, array( 'location' => 'http://TestWebservice.test.web.service', 'uri' => 'http://tempuri.org/', )); try { $param = array( 'myparam' => '000150', ); $info = $soap_client->__soapCall('GetScalarValue’ ', array($param)); print ‘<pre>’ . print_r($info, TRUE) . ‘</pre>’; } catch (SoapFault $fault) { echo $soap_client->__getLastRequestHeaders(); $error = 1; print('Sorry, service returned the following ERROR: ' . $fault->faultcode . '-' . $fault->faultstring); } ?>bukkybu
Member
35 Points
33 Posts
Re: http 405 error calling asmx web service with php
Feb 25, 2013 07:06 PM|LINK
figured this out. unchecked IE internet options - advanced setting 'show friendly http error messages' and got a more descriptive error...array out of bounds.
fix was to change:
to:
Haixia Xie -...
Contributor
3087 Points
298 Posts
Microsoft
Re: http 405 error calling asmx web service with php
Feb 26, 2013 08:58 AM|LINK
Hi,
Glad to hear that you have resolved the issue and thanks for sharing the solution here, it will be very beneficial for other community members who have similar questions. Thanks.
Best Regards.
Feedback to us
Develop and promote your apps in Windows Store