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 Rajneesh Kumar <ra...@otssolutions.com> on 2009/04/24 16:30:17 UTC

[axis2] | Problem running axis2 client

Hi All,

 

I have created and deployed a web service on axis2. Now I start to work for
client as it is given on apache axis2 site. After some effort the client
gets compiled. But I am not able to run it because it needs many approx 56
jar file at run time as apache suggest. I have tried to set all in
environment variable "CLASSPATH" but it does not accept so many file names.
Then I tried to set class path using a batch file technique also tried to
set it on command prompt directly but in each case failed and the client app
produce error on console:

 

The stack trace is given below:

 

C:\ axiswebservice\WeatherClient>java WeatherRPCClient

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axiom/om/OMNode

        at WeatherRPCClient.main(WeatherRPCClient.java:16)

Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.OMNode

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

        ... 1 more 

 

C:\ axiswebservice\WeatherClient>

 

Please suggest how to move further..

 

Thanks in advance

Rajneesh Kumar

 

 

 



===================================================================================================
Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com
===================================================================================================

RE: [axis2] | Problem running axis2 client

Posted by Martin Gainty <mg...@hotmail.com>.
axiom-api-1.2.6.jar from
http://www.java2s.com/Code/Jar/Web-Services-AXIS2/axiom-api-1.2.5.jar.htm


Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






Date: Fri, 24 Apr 2009 11:31:42 -0300
Subject: Re: [axis2] | Problem running axis2 client
From: robertlazarski@gmail.com
To: axis-user@ws.apache.org

On Fri, Apr 24, 2009 at 11:30 AM, Rajneesh Kumar <ra...@otssolutions.com> wrote:














Hi All,


 


I have created and deployed a web service on axis2. Now I
start to work for client as it is given on apache axis2 site. After some effort
the client gets compiled. But I am not able to run it because it needs many
approx 56 jar file at run time as apache suggest. I have tried to set all in
environment variable “CLASSPATH” but it does not accept so many
file names. Then I tried to set class path using a batch file technique also
tried to set it on command prompt directly but in each case failed and the
client app produce error on console:


 


The stack trace is given below:


 


C:\ axiswebservice\WeatherClient>java WeatherRPCClient


Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/axiom/om/OMNode

Use ant to execute your client, since you can list a directory with all your JAR's and ant will take care of everything for you. 


- R

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.  
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009

Re: [axis2] | Problem running axis2 client

Posted by robert lazarski <ro...@gmail.com>.
On Mon, Apr 27, 2009 at 11:36 AM, Rajneesh Kumar
<ra...@otssolutions.com> wrote:
> Hi  Robert,
>
>
>
> Thanks for suggestion…
>
> Now its running. But not processing correctly.
>
>
>
> Please see the code snap below:
>

>         if (result == null) {
>
>             System.out.println("Weather didn't initialize!"); // I am
> getting this message means result object is not initialized.
>
>             return;
>
>         }
>

Do mean the result is null ? Look at the logs from your servlet
container for clues - particularly Exceptions.

- R

RE: [axis2] | Problem running axis2 client

Posted by Rajneesh Kumar <ra...@otssolutions.com>.
Hi  Robert,

 

Thanks for suggestion.

Now its running. But not processing correctly. 

 

Please see the code snap below:

 

  EndpointReference targetEPR = new
EndpointReference("http://192.168.1.139:8080/axis2/services/WeatherService")
; // service is runnig well and producing wsdl.

        options.setTo(targetEPR);

 

        // Setting the weather

        QName opSetWeather = new QName("http://service.pojo.sample/xsd",
"setWeather");

 

        Weather w = new Weather();

 

        w.setTemperature((float)39.3);

        w.setForecast("Cloudy with showers");

        w.setRain(true);

        w.setHowMuchRain((float)4.5);

 

        Object[] opSetWeatherArgs = new Object[] { w };

 

        serviceClient.invokeRobust(opSetWeather, opSetWeatherArgs);

            

                    // Getting the weather

        QName opGetWeather =

            new QName("http://service.pojo.sample/xsd", "getWeather");

 

        Object[] opGetWeatherArgs = new Object[] { };

        Class[] returnTypes = new Class[] { Weather.class };

        

        Object[] response = serviceClient.invokeBlocking(opGetWeather,

                opGetWeatherArgs, returnTypes);

        

        Weather result = (Weather) response[0];

        

        if (result == null) {

            System.out.println("Weather didn't initialize!"); // I am
getting this message means result object is not initialized.

            return;

        }

        // Displaying the result

        System.out.println("Temperature               : " +

                           result.getTemperature());

        System.out.println("Forecast                  : " +

                           result.getForecast());

        System.out.println("Rain                      : " +

                           result.getRain());

        System.out.println("How much rain (in inches) : " +

                           result.getHowMuchRain());

 

 

Thanks in advance..

 -R

  _____  

From: robert lazarski [mailto:robertlazarski@gmail.com] 
Sent: Friday, April 24, 2009 8:02 PM
To: axis-user@ws.apache.org
Subject: Re: [axis2] | Problem running axis2 client

 

On Fri, Apr 24, 2009 at 11:30 AM, Rajneesh Kumar
<ra...@otssolutions.com> wrote:

Hi All,

 

I have created and deployed a web service on axis2. Now I start to work for
client as it is given on apache axis2 site. After some effort the client
gets compiled. But I am not able to run it because it needs many approx 56
jar file at run time as apache suggest. I have tried to set all in
environment variable "CLASSPATH" but it does not accept so many file names.
Then I tried to set class path using a batch file technique also tried to
set it on command prompt directly but in each case failed and the client app
produce error on console:

 

The stack trace is given below:

 

C:\ axiswebservice\WeatherClient>java WeatherRPCClient

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axiom/om/OMNode

 

Use ant to execute your client, since you can list a directory with all your
JAR's and ant will take care of everything for you. 

- R



===================================================================================================
Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com
===================================================================================================

Re: [axis2] | Problem running axis2 client

Posted by robert lazarski <ro...@gmail.com>.
On Fri, Apr 24, 2009 at 11:30 AM, Rajneesh Kumar <
rajneesh.kumar@otssolutions.com> wrote:

>  Hi All,
>
>
>
> I have created and deployed a web service on axis2. Now I start to work for
> client as it is given on apache axis2 site. After some effort the client
> gets compiled. But I am not able to run it because it needs many approx 56
> jar file at run time as apache suggest. I have tried to set all in
> environment variable “CLASSPATH” but it does not accept so many file names.
> Then I tried to set class path using a batch file technique also tried to
> set it on command prompt directly but in each case failed and the client app
> produce error on console:
>
>
>
> The stack trace is given below:
>
>
>
> C:\ axiswebservice\WeatherClient>java WeatherRPCClient
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/axiom/om/OMNode
>

Use ant to execute your client, since you can list a directory with all your
JAR's and ant will take care of everything for you.

- R