0

i have web service which is using .asmx when i am trying to access using jquery Ajax it is giving me problem of http 405 and some time 500 is it web service problem of client side problem please guide me with example

$j.ajax({ type: "POST", //url :'http://Service1.asmx/HelloWorld', url :webServiceUrl, cache:false, async: false, data: soap xml data, dataType :"xml", error:function () { alert("error"); }, contentType:"text/xml; charset=\"utf-8\"", }).done(function(response){ console.log(response); alert("Yahoo "); }); }); 
3
  • 500 is an server error. 405 is "method not allowed". doesnt web services use GET requests ? Commented May 30, 2013 at 13:24
  • Are they within the same domain, your webservice and website, or different ones? Commented May 30, 2013 at 13:24
  • yas these are on same domain and please also tell me how to send data if web service excepts xml Commented May 31, 2013 at 6:04

2 Answers 2

2

Clearly that is a web server problem.

In the case of error 500, that means that server faces some kind of internal problem.

In case of 405, it means that the web service is not allowing that kind of method. In you case, you are trying to use POST and the server may only be supporting GET requests.

Sign up to request clarification or add additional context in comments.

Comments

1

Ok, there is nowhere near enough information to disgnose your problem. But as well as what @MaVRoSCy suggest you could be suffering from the Same origin policy issue.

Basically this says you can't call a web service on www.x.com from www.y.com.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.