You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by loredana loredana <lo...@yahoo.com> on 2007/10/04 14:10:03 UTC

new to axis

Hy guys, I'm new to axis and I am having a small problem understanding even the begining example...ok, so i took the most simple web service from w3 schools: http://www.w3schools.com/webservices/tempconvert.asmx 
and I tried to make a web service client like the first example presented on the axis site. As I understood, it should look like this:

try{

    String endpoint =
              "http://www.w3schools.com/webservices/tempconvert.asmx";
   
          Service  service = new Service();
          Call     call    = (Call) service.createCall();
    
          call.setTargetEndpointAddress( new java.net.URL(endpoint) );
          call.setOperationName(new QName("http://tempuri.org", "CelsiusToFahrenheit"));
          call.addParameter("Celsius", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
          call.setReturnType(org.apache.axis.Constants.XSD_STRING);
          
    
          String ret = (String) call.invoke( new Object[] { "10" } );
   
          System.out.println("result: " + ret + "'");}catch{}

this should return something like <short>50</short> but instead I get a java.net.NoRouteToHostException

So what am I doing wrong?. What exactly did I missunderstood? 10x in advance






      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: new to axis

Posted by Philipp Leitner <ph...@gmx.at>.
are you connected to the internet when you run the example?

/philipp

loredana loredana wrote:
> Hy guys, I'm new to axis and I am having a small problem understanding even the begining example...ok, so i took the most simple web service from w3 schools: http://www.w3schools.com/webservices/tempconvert.asmx 
> and I tried to make a web service client like the first example presented on the axis site. As I understood, it should look like this:
> 
> try{
> 
>     String endpoint =
>               "http://www.w3schools.com/webservices/tempconvert.asmx";
>    
>           Service  service = new Service();
>           Call     call    = (Call) service.createCall();
>     
>           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
>           call.setOperationName(new QName("http://tempuri.org", "CelsiusToFahrenheit"));
>           call.addParameter("Celsius", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
>           call.setReturnType(org.apache.axis.Constants.XSD_STRING);
>           
>     
>           String ret = (String) call.invoke( new Object[] { "10" } );
>    
>           System.out.println("result: " + ret + "'");}catch{}
> 
> this should return something like <short>50</short> but instead I get a java.net.NoRouteToHostException
> 
> So what am I doing wrong?. What exactly did I missunderstood? 10x in advance
> 
> 
> 
> 
> 
> 
>       ____________________________________________________________________________________
> Luggage? GPS? Comic books? 
> Check out fitting gifts for grads at Yahoo! Search
> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org