Fix to CXF-1890 committed to trunk. Thanks for the report.

On Tue, Oct 28, 2008 at 7:58 AM, Benson Margulies <[EMAIL PROTECTED]> wrote:
> You're right. Fix coming up.
>
> On Tue, Oct 28, 2008 at 7:56 AM, Benson Margulies <[EMAIL PROTECTED]> wrote:
>> Aegis doesn't know about Enum constructors, and I'm not sure that it
>> is supposed to. There is no rule that toString() returns a string that
>> will work as a value name.
>>
>> On Mon, Oct 27, 2008 at 11:20 PM, Coder One <[EMAIL PROTECTED]> wrote:
>>> So, this class triggers a problem using aegis.  Instead of using "A_A" and 
>>> "B_B", one can use "A", and "B" and that would work.  Anyone knows if this 
>>> is a java enum problem or if it is due to aegis?
>>>
>>> Thanks...
>>>
>>> public enum MyEnum
>>> {
>>>    A("A_A"),
>>>    B("B_B");
>>>
>>>    MyEnum(String aMsg)
>>>    {
>>>        msg = aMsg;
>>>    }
>>>
>>>    @Override
>>>    public String toString()
>>>    {
>>>        return(msg);
>>>    }
>>>
>>>    private String msg;
>>> }
>>>
>>>
>>> org.apache.cxf.interceptor.Fault: No enum const class xyz.domain.MyEnum.B_B
>>>        at 
>>> org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:49)
>>>        at 
>>> org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:34)
>>>        at 
>>> org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:235)
>>>        at 
>>> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:120)
>>>
>>> --- On Sun, 10/26/08, Coder One <[EMAIL PROTECTED]> wrote:
>>>
>>>> From: Coder One <[EMAIL PROTECTED]>
>>>> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
>>>> To: [email protected]
>>>> Date: Sunday, October 26, 2008, 11:20 PM
>>>> My enum had a special construct XyzEnumType(String a); I
>>>> think that messed up a few things for the enum valueOf().  I
>>>> stripped the Enum to a regular/bare enum with no enum member
>>>> variables and it worked.
>>>>
>>>> --- On Sun, 10/26/08, Coder One <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>> > From: Coder One <[EMAIL PROTECTED]>
>>>> > Subject: Re: CXF 2.1.3 & Simple Front End &
>>>> Spring
>>>> > To: [email protected]
>>>> > Date: Sunday, October 26, 2008, 10:31 PM
>>>> > Thanks!!!...it worked...some minor hickup though...
>>>> >
>>>> > If I stay with the default jaxb databinding, a simple
>>>> call
>>>> > ping(String msg) showed msg=null on the server side.
>>>> >
>>>> > If I use aegis, then ping works with the msg passed
>>>> through
>>>> > to the server, but then a problem on the enum popped
>>>> up...
>>>> >
>>>> >  <bean id="aegisDataBinding"
>>>> >
>>>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>>>> >
>>>> >     <bean id="mgmtServiceClientFactory"
>>>> >
>>>> class="org.apache.cxf.frontend.ClientProxyFactoryBean">
>>>> >         <property name="serviceClass"
>>>> > value="xyz.services.MgmtService"/>
>>>> >         <property name="address"
>>>> >
>>>> value="http://localhost:8084/xyz-services/mgmtService"/>
>>>> >         <property name="dataBinding"
>>>> > ref="aegisDataBinding"/>
>>>> >     </bean>
>>>> >
>>>> > My enum class is sync'ed between the server and
>>>> client,
>>>> > so I have no idea why that would happen...any idea?
>>>> >
>>>> > Thanks again!!!
>>>> >
>>>> > java.lang.IllegalArgumentException: No enum const
>>>> class
>>>> >         at
>>>> >
>>>> org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:49)
>>>> >         at
>>>> >
>>>> org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:34)
>>>> >         at
>>>> >
>>>> org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:235)
>>>> >         at
>>>> >
>>>> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:120)
>>>> >
>>>> >
>>>> >
>>>> > --- On Sun, 10/26/08, Willem Jiang
>>>> > <[EMAIL PROTECTED]> wrote:
>>>> >
>>>> > > From: Willem Jiang <[EMAIL PROTECTED]>
>>>> > > Subject: Re: CXF 2.1.3 & Simple Front End
>>>> &
>>>> > Spring
>>>> > > To: [email protected]
>>>> > > Date: Sunday, October 26, 2008, 9:05 PM
>>>> > > Oh, you are still using the jaxws front on the
>>>> client
>>>> > side.
>>>> > >
>>>> > > Please change the clientFactory's class to be
>>>> > > org.apache.cxf.frontend.ClientProxyFactoryBean
>>>> > >
>>>> > > > ---Client Spring Context---
>>>> > > > WSDL:
>>>> > >
>>>> http://localhost:8084/xyz-services/mgmtService?wsdl
>>>> > > >
>>>> > > >     <bean id="mgmtService"
>>>> > > >
>>>> > class="xyz.services.MgmtService"
>>>> > > >
>>>> factory-bean="clientFactory"
>>>> > > factory-method="create"/>
>>>> > > >
>>>> > > >     <bean id="clientFactory"
>>>> > >
>>>> >
>>>> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>>> > >
>>>> > > *** it should be
>>>> > >
>>>> >
>>>> "org.apache.cxf.frontend.ClientProxyFactoryBean"
>>>> > >
>>>> > > >         <property
>>>> > name="serviceClass"
>>>> > > value="xyz.services.MgmtService"/>
>>>> > > >         <property
>>>> name="address"
>>>> > >
>>>> >
>>>> value="http://localhost:8084/xyz-services/mgmtService"/>
>>>> > > >     </bean>
>>>> > >
>>>> > > Willem
>>>> > >
>>>> > > Coder One wrote:
>>>> > > > javax.xml.ws.WebServiceException: Could not
>>>> find
>>>> > > wsdl:binding operation info for web method
>>>> createRole.
>>>> > > >         at
>>>> > >
>>>> >
>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:113)
>>>> > > >
>>>> > > >
>>>> > > > I got the above exceptions trying to use
>>>> simple
>>>> > front
>>>> > > end with Spring.  With 2.1.1, I got the same
>>>> problem,
>>>> > but
>>>> > > the line number was 150 instead of 113.
>>>> > > >
>>>> > > > I have included by server-side and
>>>> client-side
>>>> > Spring
>>>> > > context files.  Both projects (server/client)
>>>> include
>>>> > cxf as
>>>> > > a separate maven project.  Ie. I created a
>>>> common-cxf
>>>> > maven
>>>> > > project that included all the regular CXF jars,
>>>> then
>>>> > my
>>>> > > server/client maven projects declared a
>>>> dependency on
>>>> > > common-cxf.
>>>> > > >
>>>> > > > The WSDL comes up alright with ?wsdl, so I
>>>> am at
>>>> > a
>>>> > > dead-end.  I read some post about someone
>>>> patching
>>>> > 2.1.1 to
>>>> > > fix this issue, but it seems to have not been
>>>> fixed
>>>> > ?!?
>>>> > > >
>>>> > > > Please help...appreciate all pointers!
>>>> Thanks...
>>>> > > >
>>>> > > >
>>>> > > > ---Server Spring Context---
>>>> > > > WAR context: /xyz-services
>>>> > > >
>>>> > > >         <import
>>>> > >
>>>> resource="classpath:META-INF/cxf/cxf.xml"
>>>> > />
>>>> > > >         <import
>>>> > >
>>>> >
>>>> resource="classpath:META-INF/cxf/cxf-extension-soap.xml"
>>>> > > />
>>>> > > >         <import
>>>> > >
>>>> >
>>>> resource="classpath:META-INF/cxf/cxf-servlet.xml"
>>>> > > />
>>>> > > >
>>>> > > >     <simple:server
>>>> id="roleMgmtWS"
>>>> > > >
>>>> > > serviceClass="xyz.services.MgmtService"
>>>> > > >
>>>> > > address="/mgmtService">
>>>> > > >         <simple:serviceBean>
>>>> > > >             <bean
>>>> > > class="xyz.serviceimpl.MgmtServiceImpl"
>>>> > />
>>>> > > >         </simple:serviceBean>
>>>> > > >         <simple:dataBinding>
>>>> > > >             <bean
>>>> > >
>>>> >
>>>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
>>>> > > />
>>>> > > >         </simple:dataBinding>
>>>> > > >     </simple:server>
>>>> > > >
>>>> > > > ---Client Spring Context---
>>>> > > > WSDL:
>>>> > >
>>>> http://localhost:8084/xyz-services/mgmtService?wsdl
>>>> > > >
>>>> > > >     <bean id="mgmtService"
>>>> > > >
>>>> > class="xyz.services.MgmtService"
>>>> > > >
>>>> factory-bean="clientFactory"
>>>> > > factory-method="create"/>
>>>> > > >
>>>> > > >     <bean id="clientFactory"
>>>> > >
>>>> >
>>>> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>>> > > >         <property
>>>> > name="serviceClass"
>>>> > > value="xyz.services.MgmtService"/>
>>>> > > >         <property
>>>> name="address"
>>>> > >
>>>> >
>>>> value="http://localhost:8084/xyz-services/mgmtService"/>
>>>> > > >     </bean>
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>
>>>
>>>
>>>
>>>
>>
>

Reply via email to