The service I'm trying to define llists its SOAP request as
POST /PDCWebService/WeatherServices.asmx HTTP/1.1 Host: weather.unisysfsp.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.unisys.com/WebServices/GetWeather"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWeather xmlns="http://www.unisys.com/WebServices/">
<ZipCode>string</ZipCode>
</GetWeather>
</soap:Body>
</soap:Envelope>
This WSDL is located at http://weather.unisysfsp.com/PDCWebService/WeatherServices.asmx?WSDL
What I have tried doing is the following:
try
{
Service service = new Service();
call = (Call) service.createCall();call.setTargetEndpointAddress( new java.net.URL("http://weather.unisysfsp.com/PDCWebService/ WeatherServices.asmx") );
call.setOperationName(new QName("http://www.unisys.com/WebServices/", "GetWeatherText"));
call.setSOAPActionURI("http://www.unisys.com/WebServices/ GetWeatherText");
call.addParameter("ZipCode", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN );
call.setReturnType( org.apache.axis.Constants.XSD_STRING );
Object ret = call.invoke( new Object[] {"30038"} );
System.out.println("Return = " + ret + "'");
}
catch (Exception e)
{
System.err.println("Exception: " + e.toString());e.printStackTrace(); }
What happens is that the WebService is invoked, but without the parameter ZipCode passed to it. Also, I'm not sure why I has to setSOAPActionURI and couldn't find anything in the documentation that would state why I would have to do that. I assumed that all I needed to do was specify an endpoint, an operation, and a bunch of parameters, then invoke the service and wait for the response.
I appreciate ANY help that could be offered including additional whitepapers, tutorials, or other documentation on Axis that might not be linked to the Apache Axis website.
Thanks in advance!
