You need to sign in to do that
Don't have an account?
Abhijit Shrikhande
Unable to call a public facing webservice
I am trying to call a public facing webservice. I am able to call this webservice using SoapUI and it returns me the output I seek.
I downloaded the wsdl and generated a wsdl class. After generating the wsdl class, I tried to invoke this in an Execute Anonymous block of code.
The webservice is hosted at: http://peopleask.ooz.ie/soap
The block of code I used to call the service is:
The error I am facing is:
What am I doing wrong? How can I call this webservice?
I downloaded the wsdl and generated a wsdl class. After generating the wsdl class, I tried to invoke this in an Execute Anonymous block of code.
The webservice is hosted at: http://peopleask.ooz.ie/soap
The block of code I used to call the service is:
peopleaskOozIeSoap.PeopleAskServiceSoap mypass = new peopleaskOozIeSoap.PeopleAskServiceSoap(); peopleaskOozIeSoap.ArrayOfstring hoos = new peopleaskOozIeSoap.ArrayOfstring(); hoos = mypass.GetQuestionsAbout('lauren bacall');
The error I am facing is:
FATAL_ERROR|System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://peopleask.ooz.ie/soap:GetQuestionsAboutResponse' but found ':Questions'
What am I doing wrong? How can I call this webservice?
APN09217013342392059
Did you add this url under "Remove Site Settings" to allow for callouts ?
Abhijit Shrikhande
You mean "remote site settings". Yes I have added the URL to that list of remote sites.
James Loghry
Sounds like Wsdl 2 Apex didn't quite generate your Apex correctly. Either that or you're WSDL is wonky. Try modifying your PeopleaskOozIeSoap class by modifying your ArrayOfString element's namespace, changing it from "http://peopleask.ooz.ie/soap:GetQuestionsAboutResponse" to ":Questions" to see if that shows anything different. In other words, you may have to play around a bit with your Wsdl 2 Apex class to get your callout working.
Abhijit Shrikhande
It looks like this wsdl is a problematic one. The only client I know which is able to call it is soap-UI. I also faced a similar issue in my .NEt application and microsoft concierge support services could not resolve it. I was able to use the http class to invoke the web service.