The Artima Developer Community
Sponsored Link

Web Services Forum
enum with axis2 doesn't work

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
ttati ttati@libero.it

Posts: 1
Nickname: ttati
Registered: Jul, 2008

enum with axis2 doesn't work Posted: Jul 11, 2008 7:21 AM
Reply to this message Reply
Advertisement
Hi,
I created a WebService like this:

//MiaClasse.java
@WebService
public class MiaClasse {
public MiaClasse(){}

@WebMethod
public void mioMetodo(MioEnum mioEnum){
....
}
}
//MioEnum.java
public enum MioEnum {
CIAO, HELLO, HI;
}
and deployed it in Tomcat
I ran:
WSIMPORT -keep http://localhost:8080/axis2/services/MiaClasseService.MiaClassePort?wsdl

if I run client :
//Client.java
...
public static void main(String []args){
MiaClasseService serv=new MiaClasseService();
MiaClasse mclass=serv.getMiaClassePort();
mclass.mioMetodo(MioEnum.CIAO);

}

It throws :

javax.xml.ws.soap.SOAPFaultException: java.lang.NoSuchMethodException: MioEnum.fromValue(java.lang.String)
at com.sun.xml.internal.ws.encoding.soap.ClientEncoderDecoder.toMessageInfo(Unknow n Source)
at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toMessageInfo(Unkno wn Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(Unkn own Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(Unkno wn Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(Unknown Source)
at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(Unknown Source)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(U nknown Source)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(Unknown Source)
at $Proxy17.createStorePermission(Unknown Source)
at clientWS.main(clientWS.java:27)



Can someone help me?

Topic: How to run a Webservice Client program? Previous Topic   Next Topic Topic: gSOAP

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use