I was suspected so...
Notice this bean has been generated by axis itself ...
Moreover it works with other clients...
Is the enumeration type has a kind of special treatment?
here the generated code by axis :
/**
* EnumerationStatus.java
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package ipcfm.GetConfigurationV2;
public class EnumerationStatus implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected EnumerationStatus(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _Success = "Success";
public static final java.lang.String _Warning = "Warning";
public static final java.lang.String _Failure = "Failure";
public static final EnumerationStatus Success = new
EnumerationStatus(_Success);
public static final EnumerationStatus Warning = new
EnumerationStatus(_Warning);
public static final EnumerationStatus Failure = new
EnumerationStatus(_Failure);
public java.lang.String getValue() { return _value_;}
public static EnumerationStatus fromValue(java.lang.String value)
throws java.lang.IllegalStateException {
EnumerationStatus enum = (EnumerationStatus)
_table_.get(value);
if (enum==null) throw new java.lang.IllegalStateException();
return enum;
}
public static EnumerationStatus fromString(java.lang.String value)
throws java.lang.IllegalStateException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws
java.io.ObjectStreamException { return fromValue(_value_);}
}
On 5/2/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> You must define the bean with a default constructor.
>
> On 5/2/05, lio axis <[EMAIL PROTECTED]> wrote:
> > Hello World,
> >
> > My web-services genrated with axis crashes (see the stack trace) after
> > received the whole response structure.
> >
> > the constructor of the mentionned class is ;
> >
> > // Constructor
> > protected EnumerationStatus(java.lang.String value) {
> > _value_ = value;
> > _table_.put(_value_,this);
> > }
> >
> > I don't understand why as this class has been used by other clients
> > with other web-services ...
> >
> > What's wrong?
> > Any body could help?
> >
> > Thx,
> >
> > org.xml.sax.SAXException: Unable to create JavaBean of type
> > com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> > Missing default constructor? Error was:
> > java.lang.InstantiationException:
> > com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> > at
> > org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:159)
> > at
> > org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
> > at
> > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
> > at
> > org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
> > at
> > org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
> > at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
> > at org.apache.axis.client.Call.invoke(Call.java:2272)
> > at org.apache.axis.client.Call.invoke(Call.java:2171)
> > at org.apache.axis.client.Call.invoke(Call.java:1691)
> > at
> > com.equant.refce.ipcfm.bouchon.getConfiguration.GetConfigurationV2SOAPBindingStub.getConfiguration(GetConfigurationV2SOAPBindingStub.java:228)
> > at
> > com.equant.refce.ipcfm.bouchon.testu.GetConfigurationV2ServiceTestCase.test1GetConfigurationV2GetConfiguration(GetConfigurationV2ServiceTestCase.java:52)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at junit.framework.TestCase.runTest(TestCase.java:154)
> > at junit.framework.TestCase.runBare(TestCase.java:127)
> > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > at junit.framework.TestResult.run(TestResult.java:109)
> > at junit.framework.TestCase.run(TestCase.java:118)
> > at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
> > at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
> > at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
> >
>