You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christian Schneider <ch...@die-schneider.net> on 2008/10/26 23:01:14 UTC

JAX-WS / JAXB and maps

Hi,

is it possible to define a JAX-WS / JAXB wsdl and binding for a 
weservice so that the code generation of cxf creates a java map from it?

I was able to generate a wsdl from a map but on the conversion back to 
java it did not use a map. Can I define this in a jaxb:binding?

Greetings

Christian

-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: JAX-WS / JAXB and maps

Posted by Christian Schneider <ch...@die-schneider.net>.
Let?s see if they can help...
http://forums.java.net/jive/thread.jspa?threadID=52553

Daniel Kulp schrieb:
> Interesting question.   I'm not really seeing anything in chapter 7 of the 
> jaxb spec to do this.   Might be something worth asking on the list at 
> jaxb.dev.java.net.
>
> Dan
>
>
> On Sunday 26 October 2008 6:01:14 pm Christian Schneider wrote:
>   
>> Hi,
>>
>> is it possible to define a JAX-WS / JAXB wsdl and binding for a
>> weservice so that the code generation of cxf creates a java map from it?
>>
>> I was able to generate a wsdl from a map but on the conversion back to
>> java it did not use a map. Can I define this in a jaxb:binding?
>>
>> Greetings
>>
>> Christian
>>     
>
>
>
>   


-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: JAX-WS / JAXB and maps

Posted by Daniel Kulp <dk...@apache.org>.
Interesting question.   I'm not really seeing anything in chapter 7 of the 
jaxb spec to do this.   Might be something worth asking on the list at 
jaxb.dev.java.net.

Dan


On Sunday 26 October 2008 6:01:14 pm Christian Schneider wrote:
> Hi,
>
> is it possible to define a JAX-WS / JAXB wsdl and binding for a
> weservice so that the code generation of cxf creates a java map from it?
>
> I was able to generate a wsdl from a map but on the conversion back to
> java it did not use a map. Can I define this in a jaxb:binding?
>
> Greetings
>
> Christian



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Sprin

Posted by Benson Margulies <bi...@gmail.com>.
Fix to CXF-1890 committed to trunk. Thanks for the report.

On Tue, Oct 28, 2008 at 7:58 AM, Benson Margulies <bi...@gmail.com> wrote:
> You're right. Fix coming up.
>
> On Tue, Oct 28, 2008 at 7:56 AM, Benson Margulies <bi...@gmail.com> 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 <co...@yahoo.com> 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 <co...@yahoo.com> wrote:
>>>
>>>> From: Coder One <co...@yahoo.com>
>>>> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
>>>> To: users@cxf.apache.org
>>>> 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 <co...@yahoo.com>
>>>> wrote:
>>>>
>>>> > From: Coder One <co...@yahoo.com>
>>>> > Subject: Re: CXF 2.1.3 & Simple Front End &
>>>> Spring
>>>> > To: users@cxf.apache.org
>>>> > 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
>>>> > <wi...@gmail.com> wrote:
>>>> >
>>>> > > From: Willem Jiang <wi...@gmail.com>
>>>> > > Subject: Re: CXF 2.1.3 & Simple Front End
>>>> &
>>>> > Spring
>>>> > > To: users@cxf.apache.org
>>>> > > 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>
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>
>>>
>>>
>>>
>>>
>>
>

Re: Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Sprin

Posted by Benson Margulies <bi...@gmail.com>.
You're right. Fix coming up.

On Tue, Oct 28, 2008 at 7:56 AM, Benson Margulies <bi...@gmail.com> 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 <co...@yahoo.com> 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 <co...@yahoo.com> wrote:
>>
>>> From: Coder One <co...@yahoo.com>
>>> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
>>> To: users@cxf.apache.org
>>> 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 <co...@yahoo.com>
>>> wrote:
>>>
>>> > From: Coder One <co...@yahoo.com>
>>> > Subject: Re: CXF 2.1.3 & Simple Front End &
>>> Spring
>>> > To: users@cxf.apache.org
>>> > 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
>>> > <wi...@gmail.com> wrote:
>>> >
>>> > > From: Willem Jiang <wi...@gmail.com>
>>> > > Subject: Re: CXF 2.1.3 & Simple Front End
>>> &
>>> > Spring
>>> > > To: users@cxf.apache.org
>>> > > 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>
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>
>>
>>
>>
>>
>

Re: Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Sprin

Posted by Benson Margulies <bi...@gmail.com>.
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 <co...@yahoo.com> 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 <co...@yahoo.com> wrote:
>
>> From: Coder One <co...@yahoo.com>
>> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
>> To: users@cxf.apache.org
>> 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 <co...@yahoo.com>
>> wrote:
>>
>> > From: Coder One <co...@yahoo.com>
>> > Subject: Re: CXF 2.1.3 & Simple Front End &
>> Spring
>> > To: users@cxf.apache.org
>> > 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
>> > <wi...@gmail.com> wrote:
>> >
>> > > From: Willem Jiang <wi...@gmail.com>
>> > > Subject: Re: CXF 2.1.3 & Simple Front End
>> &
>> > Spring
>> > > To: users@cxf.apache.org
>> > > 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>
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>
>
>
>
>

Re: Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Spring

Posted by Coder One <co...@yahoo.com>.
A hunch: AEGIS is using toString() to serialize the enum.  If so, AEGIS needs to use name()...

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html


--- On Mon, 10/27/08, Coder One <co...@yahoo.com> wrote:

> From: Coder One <co...@yahoo.com>
> Subject: Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Spring
> To: users@cxf.apache.org
> Date: Monday, October 27, 2008, 8:20 PM
> 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 <co...@yahoo.com>
> wrote:
> 
> > From: Coder One <co...@yahoo.com>
> > Subject: Re: CXF 2.1.3 & Simple Front End &
> Spring
> > To: users@cxf.apache.org
> > 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
> <co...@yahoo.com>
> > wrote:
> > 
> > > From: Coder One <co...@yahoo.com>
> > > Subject: Re: CXF 2.1.3 & Simple Front End
> &
> > Spring
> > > To: users@cxf.apache.org
> > > 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
> > > <wi...@gmail.com> wrote:
> > > 
> > > > From: Willem Jiang
> <wi...@gmail.com>
> > > > Subject: Re: CXF 2.1.3 & Simple Front
> End
> > &
> > > Spring
> > > > To: users@cxf.apache.org
> > > > 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>
> > > > > 
> > > > > 
> > > > >       
> > > > > 
> > > > >


      


Weird Error Condition with AEGIS ? Re: CXF 2.1.3 & Simple Front End & Spring

Posted by Coder One <co...@yahoo.com>.
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 <co...@yahoo.com> wrote:

> From: Coder One <co...@yahoo.com>
> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
> To: users@cxf.apache.org
> 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 <co...@yahoo.com>
> wrote:
> 
> > From: Coder One <co...@yahoo.com>
> > Subject: Re: CXF 2.1.3 & Simple Front End &
> Spring
> > To: users@cxf.apache.org
> > 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
> > <wi...@gmail.com> wrote:
> > 
> > > From: Willem Jiang <wi...@gmail.com>
> > > Subject: Re: CXF 2.1.3 & Simple Front End
> &
> > Spring
> > > To: users@cxf.apache.org
> > > 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>
> > > > 
> > > > 
> > > >       
> > > > 
> > > >


      


Re: CXF 2.1.3 & Simple Front End & Spring

Posted by Coder One <co...@yahoo.com>.
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 <co...@yahoo.com> wrote:

> From: Coder One <co...@yahoo.com>
> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
> To: users@cxf.apache.org
> 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
> <wi...@gmail.com> wrote:
> 
> > From: Willem Jiang <wi...@gmail.com>
> > Subject: Re: CXF 2.1.3 & Simple Front End &
> Spring
> > To: users@cxf.apache.org
> > 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>
> > > 
> > > 
> > >       
> > > 
> > >


      


Re: CXF 2.1.3 & Simple Front End & Spring

Posted by Coder One <co...@yahoo.com>.
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 <wi...@gmail.com> wrote:

> From: Willem Jiang <wi...@gmail.com>
> Subject: Re: CXF 2.1.3 & Simple Front End & Spring
> To: users@cxf.apache.org
> 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>
> > 
> > 
> >       
> > 
> >


      


Re: CXF 2.1.3 & Simple Front End & Spring

Posted by Willem Jiang <wi...@gmail.com>.
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>
> 
> 
>       
> 
> 


CXF 2.1.3 & Simple Front End & Spring

Posted by Coder One <co...@yahoo.com>.
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>