问题
I've been googling for something to call WSDL (SOAP) based service using jQuery but I don't find anything.
Is there really a way to call them like I call REST based services?
The example URL I have is http://sub.domain.com/j/services/ivos?wsdl
回答1:
if u can modify the header sent to your wsdl i guess its possible.
回答2:
Check out the stack overflow question Simplest SOAP example if that's what you need
Although I am unsure what you need to do ?wsdl will just send the webservice description in xml form.
The way I would tackle this would be to create a rest wrapper that takes care of the soap handling and sends json responses.
This way you can call it using $.ajax, $.getJSON, $.post etc
来源:https://stackoverflow.com/questions/5551423/calling-wsdl-service-via-jquery