The application that I work with will have to send data to an external system. The system system will have a web service (C # or java or php), and I need to use it. Since there will be as many external systems as there are clients, I need to get the WSDL file, the method name and parameters as user input and send the data to the external system.
So, I am trying to call a web service dynamically using the available code here
I checked some free web services here
I find the SOAP location, method name and parameters from the WSDL file and give the same thing as the input.
The following service works as expected
http://soaptest.parasoft.com/calculator.wsdl Location - http://ws1.parasoft.com/glue/calculator Method Name - add Parameter - x,y
But when I tried the same for another free service, specifying the SOAP location and method name, it gives 500 Internal server error.
http://www.predic8.com:8080/crm/CustomerService?wsdl Location - http://www.predic8.com:8080/crm/CustomerService Method Name - getAll
I confirmed that these inputs are correct by testing the above wsdl in soapUI. The same location is used in the soapUI request window.
I am not sure why this generates an error. Please help me figure this out.
Also, please let me know, I get a service location of the WSDL file and use HttpWebRequest
to get an answer. I am afraid that this method of calling a web service will work regardless of the technology used to implement the web service.
EDIT:
The problem is with the SOAP envelope.
For http://soaptest.parasoft.com/calculator.wsdl , even if we ignore xmlns: cal = "http://www.parasoft.com/wsdl/calculator/, it succeeds.
But for http://www.predic8.com:8080/crm/CustomerService?wsdl , if I ignore xmlns: ns = "http://predic8.com/wsdl/crm/CRMService/1/, it calls the internal server error.
Tell me how I can be shared here.