Erreur webservice (Salome)
Bonjour,
ce post fait suite à celui-ci :
http://www.developpez.net/forums/d86...e-webservices/
Cette fois ci mon problème porte plus sur la partie webservice.
En effet j'ai créé un WS de type HelloWorld qui fonctionne bien.
Je l'appelle avec ce code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
try {
// l'URI a contacter
String endpointURL = "http://localhost:8080/Test_Salome_WebS/services/Hello";
// Le service à executer
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
// l'operation du service
call.setOperationName( new QName("http://DefaultNamespace", "sayHello") );
// L'appel
String ret = (String) call.invoke( new Object[] { } );
System.out.println("-->"+ret);
} catch (Exception e) {
System.err.println("erreur "+ e.toString());
} |
Tout fonctionne et je récupère bien la réponse du WS.
Maintenant lorsque j'exécute ce code dans Salome avec le plugin Beanshell j'ai d'abord cette erreur :
Code:
1 2
|
bsh % Sourced file: inline evaluation of: ``import javax.xml.namespace.QName; import org.apache.axis.client.Call; import . . . '' : Typed variable declaration : Object constructor : at Line: 11 : in file: inline evaluation of: ``import javax.xml.namespace.QName; import org.apache.axis.client.Call; import . . . '' : new Service ( ) Target exception: java.lang.ExceptionInInitializerError done run... |
Puis si j'essaye de réexécuter le code celle-ci :
Code:
1 2
|
Sourced file: inline evaluation of: ``import javax.xml.namespace.QName; import org.apache.axis.client.Call; import . . . '' : Typed variable declaration : Object constructor : at Line: 13 : in file: inline evaluation of: ``import javax.xml.namespace.QName; import org.apache.axis.client.Call; import . . . '' : new Service ( ) Target exception: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient done run... |
Pourtant je pense avoir bien configurer mes classpath avec les jar qu'il faut (axis.jar, jaxrpc.jar, ...).
J'ai tenter de rajouter le path des jar dans mon code beanshell mais ça n'a aucun effet.
Une idée sur la façon de résoudre ce pb?