|
I have a very basic client attempting to access a
web service at http://www.xmethods.net/cs/2001/BNQuoteService.wsdl.
My client is implemented as such:
...
URL url="" java.net.URL("http://services.xmethods.com:80/soap/servlet/rpcrouter");
String isbn = "0672319225"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( url ); call.setOperationName( new QName("urn:xmethods-BNPriceCheck", "getPrice") ); call.addParameter( "isbn", XMLType.XSD_STRING, ParameterMode.IN ); call.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/"); call.setReturnType( XMLType.XSD_FLOAT ); Object ret = call.invoke( new Object[] {isbn} ); Float res = (Float) ret; System.out.println(res.floatValue()); This exception is thrown:
org.xml.sax.SAXParseException: Premature end of
file.
org.apache.axis.AxisFault.makeFault
org.apach.axis.SOAPPart.getAsSOAPEnvelope
Is this "call" not complete? Any ideas would
be helpful.
thanks.
Debbie.
|
