How can I check if any web service is accessible ?
I can see the list of service also I know the method names present in the web service.But I don’t know which parameters the method accepts.
Here is the method present in the web service
public OMElement getChildren(OMElement paramOMElement)
{
Object localObject2 = paramOMElement.toString();
// Some other stuff
}
I tried something like http://machine_name/war_name/services/service_name/getChildren?a
and got following error
soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
−
<faultstring>
Umarshaller error: Error during unmarshall <getChildren><a></a></getChildren>; nested exception is:
edu.harvard.i2b2.common.exception.I2B2Exception: Umarshaller error: Error during unmarshall <getChildren><a></a></getChildren>; nested exception is:
org.apache.axis2.AxisFault: Umarshaller error: Error during unmarshall <getChildren><a></a></getChildren>; nested exception is:
edu.harvard.i2b2.common.exception.I2B2Exception: Umarshaller error: Error during unmarshall <getChildren><a></a></getChildren>
</faultstring>
<detail/>
</soapenv:Fault>
Is this error mean I am able to access the service but sending wrong arguments ?
Also the service dont have WSDL file.
How can I check whether the service is accessible or how can I find out the exact parameters which are required ?
Well you need to send a request to the service and see if there is a response and there is no exception and thus make sure that the server is running..
Nt comfortable with coding in java but here is the c# excerpt:
There might be easier solutions for java like using the Apache Commons UrlValidator class
or use a method like this that gets the response code
or try this: http://www.java-tips.org/java-se-tips/java.net/check-if-a-page-exists-2.html
Tell me which one worked for you..