axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc E." <>
Subject RE: Please help trying to consume .NET WebService
Date Sat, 21 Jun 2003 13:37:35 GMT
  Did you try running wsdl2java on the wsdl file and looking at axis's
generated code? I've had great success invoking .net services when using


-----Original Message-----
From: Gregory Pierce []
Sent: Saturday, June 21, 2003 1:05 AM
Subject: Please help trying to consume .NET WebService

Hi folks. I've been beating my head against the wall for a couple of
days now trying to get Axis 1.1 (currently using the final release and
still having the same problem) to access a .NET Webservice. Most of the
webservices I've tried to access which are either GLUE or SOAP based
come through without a hitch. However, other 'untyped' web services are
causing me some trouble.

The service I'm trying to define llists its SOAP request as

POST /PDCWebService/WeatherServices.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: ""

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=""
     <GetWeather xmlns="">

This WSDL is located at

What I have tried doing is the following:

     Service service = new Service();
     call = (Call) service.createCall();

     call.setTargetEndpointAddress( new"
WeatherServices.asmx") );
QName("", "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());


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!

View raw message