You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Marc Giger <gi...@gmx.ch> on 2008/11/14 14:10:17 UTC

commit: r688596 cxf 2.0.9

Hi all,

I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
and hit the following error on startup:

"Message part {0} of Message {1} cannot be processed. This can be caused
by the use of JAX-WS-specific types without the JAX-WS service factory bean."

This new check was introduced in commit 688596. What is the reason behind that?

My service class has some public setter methods for spring dependency injection,
where it fails now because these methods aren't ws-service specific methods.

What is the correct solution now?

Thanks!

Marc

Re: commit: r688596 cxf 2.0.9

Posted by Marc Giger <gi...@gmx.ch>.
On Sat, 15 Nov 2008 11:44:55 +0800
"Willem Jiang" <wi...@gmail.com> wrote:

> It is strang, which version of camel are you using ?

1.3

> Can you try to set the service class to be SalaryDeclarationPort ?

Didn't make any difference. Same exception occurs. After some debugging
it makes sense to me.

> There may be something wrong with the ReflectionServiceFactoryBean
> when it is looking up the SEI.
> Can you submit a small unit test to a Camel JIRA[1] ? we can dig the
> code for the real reason.
> 
> [1]http://issues.apache.org/activemq/browse/CAMEL

ATM very difficult to provide you a complete example. Will look that
I can bring up something if we don't get further here.

As I already mentioned above, I did some debugging in cxf.
What I found is the following:

When I set the wsdlLocation on the two cxf:cxfEndpoint 's, all
is working fine again. That's because the service is setup with
the wsdl definitions and independend from the service class.

If I don't specify the wsdlLocation (as it originally was) the following
code seems to be problematic in my case:

class JaxWsServiceConfiguration:
public Boolean isWebMethod(final Method method) {
        if (method == null
            || method.getReturnType().equals(Future.class)
            || method.getReturnType().equals(Response.class)) {
            return Boolean.FALSE;
        }
        
        WebMethod wm = method.getAnnotation(WebMethod.class);
        if (wm != null) {
            if (wm.exclude()) {
                return Boolean.FALSE;
            } else {
                return Boolean.TRUE;
            }
        } 
        if (method.getDeclaringClass().isInterface()) {
            return hasWebServiceAnnotation(method);
        }
        if (implInfo.getSEIClass() == null) {
            return hasWebServiceAnnotation(method);
        }
        return
implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass()); }

Methods in an serviceClass which don't have annotations reaches
the last line
"implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass()"

which returns true because in my case the SEIClass is
SalaryDeclarationPort and the Delcaring class is
SalaryDeclarationServiceImpl which implements SalaryDeclarationPort.

For what is the last line good for?

Thanks

Marc



> 
> Willem
> 
> On Sat, Nov 15, 2008 at 1:23 AM, Marc Giger <gi...@gmx.ch> wrote:
> 
> > Hi Willem,
> >
> > Yes, the class itself and any service methods are annotated.
> >
> > @javax.jws.WebService(name = "SalaryDeclarationPort", serviceName =
> > "SalaryDeclarationService", portName = "SalaryDeclaration",
> >        targetNamespace =
> > "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService",
> > endpointInterface =
> >
> > "ch.swissdec.schema.sd._20051002.salarydeclarationservice.SalaryDeclarationPort")
> > public class SalaryDeclarationServiceImpl implements
> > SalaryDeclarationPort {
> > ...
> >
> > @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> >    @WebResult(name = "PingResponse", targetNamespace =
> > "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes",
> > partName = "parameters") @WebMethod(operationName = "Ping") public
> > PingType ping(@WebParam(partName = "parameters", name= "Ping",
> > targetNamespace =
> > "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes")
> > PingType parameters) {
> > ...
> >
> > In my case the ReflectionServiceFactoryBean tries to setup my
> > service although I have annotated the service:
> > Caused by:
> > org.apache.cxf.service.factory.ServiceConstructionException: Service
> > class
> >
> > ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> > method setTransformer part
> > {
> > http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService}setTransformer<http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService%7DsetTransformer>
> > cannot be mapped to schema. Check for use of a JAX-WS-specific type
> > without the JAX-WS service factory bean. at
> >
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:969)
> > at
> >
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)
> >
> > Further ideas?
> >
> > Thanks
> >
> > Marc
> >
> >
> > On Fri, 14 Nov 2008 23:38:45 +0800
> > Willem Jiang <wi...@gmail.com> wrote:
> >
> > > Hi Marc,
> > >
> > > Does the
> > >
> > ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> > > has any JAXWS annotation ?
> > > If not , camel-cxf component will using the
> > > RelectionServiceFactoryBean instead of JaxWsServiceFactoryBean to
> > > create the service.
> > >
> > > Willem
> > >
> > > Marc Giger wrote:
> > > > Hi Benson
> > > >
> > > > My setup (with camel-routing) :-)
> > > > Any ideas?
> > > >
> > > > Thank you!
> > > >
> > > > Marc
> > > >
> > > > <bean id="salaryDeclarationServiceImpl"
> > > >
> > class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> > > >         <property name="userConfig" ref="userConfig"/>
> > > >         <property name="messageStore" ref="messageStore"/>
> > > >         <property name="resourceLoader"
> > > > ref="defaultResourceLoader"/> <property name="transformer"
> > > > ref="xslTransformer"/> <property name="logStore"
> > > > ref="logStore"/> <property name="defaultUser"
> > > > ref="defaultUserInstance"/> <property name="wsUtils20051002"
> > > > ref="wsUtils"/> </bean>
> > > >
> > > >     <cxf:cxfEndpoint id="routerEndpoint"
> > > > address="/SalaryDeclarationService"
> > > >
> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> > > > <cxf:outFaultInterceptors> <ref
> > > > bean="prepareMessageStoreFaultOutInterceptor"/> <ref
> > > > bean="messageStoreFaultOutInterceptor"/>
> > > > </cxf:outFaultInterceptors> </cxf:cxfEndpoint>
> > > >
> > > >     <jaxws:endpoint id="salaryDeclarationServiceJAXWS"
> > > > implementor="#salaryDeclarationServiceImpl"
> > > > address="local://SalaryDeclarationServiceJAXWS">
> > > > <jaxws:inInterceptors> <bean
> > > >
> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
> > > > <bean
> > > >
> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
> > > > <ref bean="wss4jInSignatureInterceptor"/> <ref
> > > > bean="eivWebInInterceptor"/> </jaxws:inInterceptors>
> > > > <jaxws:outInterceptors> <bean
> > > > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
> > > > <ref bean="wss4jOutSignatureInterceptor"/> <ref
> > > > bean="tamperSignatureOutInterceptor"/> <ref
> > > > bean="messageStoreAfterSignatureOutInterceptor"/> <ref
> > > > bean="wss4JOutEncryptInterceptor"/> <ref
> > > > bean="tamperEncryptionOutInterceptor"/> <ref
> > > > bean="messageStoreAfterEnctyptionOutInterceptor"/>
> > > > </jaxws:outInterceptors> <jaxws:outFaultInterceptors>
> > > >             <ref bean="faultCatcherOutInterceptor"/>
> > > >             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
> > > >             <ref bean="messageStoreFaultOutInterceptor"/>
> > > >         </jaxws:outFaultInterceptors>
> > > >         <jaxws:properties>
> > > >             <entry key="schema-validation-enabled"
> > > > value="true"/> </jaxws:properties>
> > > >         <jaxws:schemaLocations>
> > > >
> > <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
> > > >
> > <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
> > > >
> > <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
> > > >         </jaxws:schemaLocations>
> > > >     </jaxws:endpoint>
> > > >
> > > >     <cxf:cxfEndpoint id="localEndpoint"
> > > > address="local://SalaryDeclarationServiceJAXWS"
> > > > transportId="http://cxf.apache.org/transports/local"
> > > > wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
> > > >
> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
> > > > endpointName="s:SalaryDeclaration"
> > > > serviceName="s:SalaryDeclarationService"
> > > > xmlns:s="
> > http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
> > > > <cxf:properties> <entry
> > > > key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
> > > > <value type="java.lang.Boolean">true</value> </entry>
> > > >         </cxf:properties>
> > > >     </cxf:cxfEndpoint>
> > > >
> > > >
> > > > On Fri, 14 Nov 2008 08:14:03 -0500
> > > > "Benson Margulies" <bi...@gmail.com> wrote:
> > > >
> > > >> This suggests that you are using Holder or something like it
> > > >> with the wrong configuration. Details?
> > > >>
> > > >> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch>
> > > >> wrote:
> > > >>> Hi all,
> > > >>>
> > > >>> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
> > > >>> and hit the following error on startup:
> > > >>>
> > > >>> "Message part {0} of Message {1} cannot be processed. This
> > > >>> can be caused by the use of JAX-WS-specific types without the
> > > >>> JAX-WS service factory bean."
> > > >>>
> > > >>> This new check was introduced in commit 688596. What is the
> > > >>> reason behind that?
> > > >>>
> > > >>> My service class has some public setter methods for spring
> > > >>> dependency injection, where it fails now because these methods
> > > >>> aren't ws-service specific methods.
> > > >>>
> > > >>> What is the correct solution now?
> > > >>>
> > > >>> Thanks!
> > > >>>
> > > >>> Marc
> > > >>>
> > > >
> > > >
> >

Re: commit: r688596 cxf 2.0.9

Posted by Willem Jiang <wi...@gmail.com>.
It is strang, which version of camel are you using ?
Can you try to set the service class to be SalaryDeclarationPort ?
There may be something wrong with the ReflectionServiceFactoryBean when it
is looking up the SEI.
Can you submit a small unit test to a Camel JIRA[1] ? we can dig the code
for the real reason.

[1]http://issues.apache.org/activemq/browse/CAMEL

Willem

On Sat, Nov 15, 2008 at 1:23 AM, Marc Giger <gi...@gmx.ch> wrote:

> Hi Willem,
>
> Yes, the class itself and any service methods are annotated.
>
> @javax.jws.WebService(name = "SalaryDeclarationPort", serviceName =
> "SalaryDeclarationService", portName = "SalaryDeclaration",
>        targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService",
> endpointInterface =
>
> "ch.swissdec.schema.sd._20051002.salarydeclarationservice.SalaryDeclarationPort")
> public class SalaryDeclarationServiceImpl implements
> SalaryDeclarationPort {
> ...
>
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>    @WebResult(name = "PingResponse", targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes",
> partName = "parameters") @WebMethod(operationName = "Ping") public
> PingType ping(@WebParam(partName = "parameters", name= "Ping",
> targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes")
> PingType parameters) {
> ...
>
> In my case the ReflectionServiceFactoryBean tries to setup my service
> although I have annotated the service:
> Caused by:
> org.apache.cxf.service.factory.ServiceConstructionException: Service
> class
>
> ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> method setTransformer part
> {
> http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService}setTransformer<http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService%7DsetTransformer>
> cannot be mapped to schema. Check for use of a JAX-WS-specific type
> without the JAX-WS service factory bean. at
>
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:969)
> at
>
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)
>
> Further ideas?
>
> Thanks
>
> Marc
>
>
> On Fri, 14 Nov 2008 23:38:45 +0800
> Willem Jiang <wi...@gmail.com> wrote:
>
> > Hi Marc,
> >
> > Does the
> >
> ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> > has any JAXWS annotation ?
> > If not , camel-cxf component will using the
> > RelectionServiceFactoryBean instead of JaxWsServiceFactoryBean to
> > create the service.
> >
> > Willem
> >
> > Marc Giger wrote:
> > > Hi Benson
> > >
> > > My setup (with camel-routing) :-)
> > > Any ideas?
> > >
> > > Thank you!
> > >
> > > Marc
> > >
> > > <bean id="salaryDeclarationServiceImpl"
> > >
> class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> > >         <property name="userConfig" ref="userConfig"/>
> > >         <property name="messageStore" ref="messageStore"/>
> > >         <property name="resourceLoader"
> > > ref="defaultResourceLoader"/> <property name="transformer"
> > > ref="xslTransformer"/> <property name="logStore" ref="logStore"/>
> > >         <property name="defaultUser" ref="defaultUserInstance"/>
> > >         <property name="wsUtils20051002" ref="wsUtils"/>
> > >     </bean>
> > >
> > >     <cxf:cxfEndpoint id="routerEndpoint"
> > > address="/SalaryDeclarationService"
> > >
> serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> > > <cxf:outFaultInterceptors> <ref
> > > bean="prepareMessageStoreFaultOutInterceptor"/> <ref
> > > bean="messageStoreFaultOutInterceptor"/> </cxf:outFaultInterceptors>
> > >     </cxf:cxfEndpoint>
> > >
> > >     <jaxws:endpoint id="salaryDeclarationServiceJAXWS"
> > > implementor="#salaryDeclarationServiceImpl"
> > > address="local://SalaryDeclarationServiceJAXWS">
> > > <jaxws:inInterceptors> <bean
> > >
> class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
> > > <bean
> > >
> class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
> > > <ref bean="wss4jInSignatureInterceptor"/> <ref
> > > bean="eivWebInInterceptor"/> </jaxws:inInterceptors>
> > > <jaxws:outInterceptors> <bean
> > > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> <ref
> > > bean="wss4jOutSignatureInterceptor"/> <ref
> > > bean="tamperSignatureOutInterceptor"/> <ref
> > > bean="messageStoreAfterSignatureOutInterceptor"/> <ref
> > > bean="wss4JOutEncryptInterceptor"/> <ref
> > > bean="tamperEncryptionOutInterceptor"/> <ref
> > > bean="messageStoreAfterEnctyptionOutInterceptor"/>
> > > </jaxws:outInterceptors> <jaxws:outFaultInterceptors>
> > >             <ref bean="faultCatcherOutInterceptor"/>
> > >             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
> > >             <ref bean="messageStoreFaultOutInterceptor"/>
> > >         </jaxws:outFaultInterceptors>
> > >         <jaxws:properties>
> > >             <entry key="schema-validation-enabled" value="true"/>
> > >         </jaxws:properties>
> > >         <jaxws:schemaLocations>
> > >
> <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
> > >
> <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
> > >
> <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
> > >         </jaxws:schemaLocations>
> > >     </jaxws:endpoint>
> > >
> > >     <cxf:cxfEndpoint id="localEndpoint"
> > > address="local://SalaryDeclarationServiceJAXWS"
> > > transportId="http://cxf.apache.org/transports/local"
> > > wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
> > >
> serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
> > > endpointName="s:SalaryDeclaration"
> > > serviceName="s:SalaryDeclarationService"
> > > xmlns:s="
> http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
> > > <cxf:properties> <entry
> > > key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
> > > <value type="java.lang.Boolean">true</value> </entry>
> > >         </cxf:properties>
> > >     </cxf:cxfEndpoint>
> > >
> > >
> > > On Fri, 14 Nov 2008 08:14:03 -0500
> > > "Benson Margulies" <bi...@gmail.com> wrote:
> > >
> > >> This suggests that you are using Holder or something like it with
> > >> the wrong configuration. Details?
> > >>
> > >> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch>
> > >> wrote:
> > >>> Hi all,
> > >>>
> > >>> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
> > >>> and hit the following error on startup:
> > >>>
> > >>> "Message part {0} of Message {1} cannot be processed. This can be
> > >>> caused by the use of JAX-WS-specific types without the JAX-WS
> > >>> service factory bean."
> > >>>
> > >>> This new check was introduced in commit 688596. What is the
> > >>> reason behind that?
> > >>>
> > >>> My service class has some public setter methods for spring
> > >>> dependency injection, where it fails now because these methods
> > >>> aren't ws-service specific methods.
> > >>>
> > >>> What is the correct solution now?
> > >>>
> > >>> Thanks!
> > >>>
> > >>> Marc
> > >>>
> > >
> > >
>

Re: commit: r688596 cxf 2.0.9

Posted by Benson Margulies <bi...@gmail.com>.
I'm out of my depth given the Camel connection, so I have to defer to Willem.

On Fri, Nov 14, 2008 at 12:23 PM, Marc Giger <gi...@gmx.ch> wrote:
> Hi Willem,
>
> Yes, the class itself and any service methods are annotated.
>
> @javax.jws.WebService(name = "SalaryDeclarationPort", serviceName =
> "SalaryDeclarationService", portName = "SalaryDeclaration",
>        targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService",
> endpointInterface =
> "ch.swissdec.schema.sd._20051002.salarydeclarationservice.SalaryDeclarationPort")
> public class SalaryDeclarationServiceImpl implements
> SalaryDeclarationPort {
> ...
>
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>    @WebResult(name = "PingResponse", targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes",
> partName = "parameters") @WebMethod(operationName = "Ping") public
> PingType ping(@WebParam(partName = "parameters", name= "Ping",
> targetNamespace =
> "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes")
> PingType parameters) {
> ...
>
> In my case the ReflectionServiceFactoryBean tries to setup my service
> although I have annotated the service:
> Caused by:
> org.apache.cxf.service.factory.ServiceConstructionException: Service
> class
> ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> method setTransformer part
> {http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService}setTransformer
> cannot be mapped to schema. Check for use of a JAX-WS-specific type
> without the JAX-WS service factory bean. at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:969)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)
>
> Further ideas?
>
> Thanks
>
> Marc
>
>
> On Fri, 14 Nov 2008 23:38:45 +0800
> Willem Jiang <wi...@gmail.com> wrote:
>
>> Hi Marc,
>>
>> Does the
>> ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
>> has any JAXWS annotation ?
>> If not , camel-cxf component will using the
>> RelectionServiceFactoryBean instead of JaxWsServiceFactoryBean to
>> create the service.
>>
>> Willem
>>
>> Marc Giger wrote:
>> > Hi Benson
>> >
>> > My setup (with camel-routing) :-)
>> > Any ideas?
>> >
>> > Thank you!
>> >
>> > Marc
>> >
>> > <bean id="salaryDeclarationServiceImpl"
>> >           class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
>> >         <property name="userConfig" ref="userConfig"/>
>> >         <property name="messageStore" ref="messageStore"/>
>> >         <property name="resourceLoader"
>> > ref="defaultResourceLoader"/> <property name="transformer"
>> > ref="xslTransformer"/> <property name="logStore" ref="logStore"/>
>> >         <property name="defaultUser" ref="defaultUserInstance"/>
>> >         <property name="wsUtils20051002" ref="wsUtils"/>
>> >     </bean>
>> >
>> >     <cxf:cxfEndpoint id="routerEndpoint"
>> > address="/SalaryDeclarationService"
>> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
>> > <cxf:outFaultInterceptors> <ref
>> > bean="prepareMessageStoreFaultOutInterceptor"/> <ref
>> > bean="messageStoreFaultOutInterceptor"/> </cxf:outFaultInterceptors>
>> >     </cxf:cxfEndpoint>
>> >
>> >     <jaxws:endpoint id="salaryDeclarationServiceJAXWS"
>> > implementor="#salaryDeclarationServiceImpl"
>> > address="local://SalaryDeclarationServiceJAXWS">
>> > <jaxws:inInterceptors> <bean
>> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
>> > <bean
>> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
>> > <ref bean="wss4jInSignatureInterceptor"/> <ref
>> > bean="eivWebInInterceptor"/> </jaxws:inInterceptors>
>> > <jaxws:outInterceptors> <bean
>> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> <ref
>> > bean="wss4jOutSignatureInterceptor"/> <ref
>> > bean="tamperSignatureOutInterceptor"/> <ref
>> > bean="messageStoreAfterSignatureOutInterceptor"/> <ref
>> > bean="wss4JOutEncryptInterceptor"/> <ref
>> > bean="tamperEncryptionOutInterceptor"/> <ref
>> > bean="messageStoreAfterEnctyptionOutInterceptor"/>
>> > </jaxws:outInterceptors> <jaxws:outFaultInterceptors>
>> >             <ref bean="faultCatcherOutInterceptor"/>
>> >             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
>> >             <ref bean="messageStoreFaultOutInterceptor"/>
>> >         </jaxws:outFaultInterceptors>
>> >         <jaxws:properties>
>> >             <entry key="schema-validation-enabled" value="true"/>
>> >         </jaxws:properties>
>> >         <jaxws:schemaLocations>
>> >             <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
>> >             <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
>> >             <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
>> >         </jaxws:schemaLocations>
>> >     </jaxws:endpoint>
>> >
>> >     <cxf:cxfEndpoint id="localEndpoint"
>> > address="local://SalaryDeclarationServiceJAXWS"
>> > transportId="http://cxf.apache.org/transports/local"
>> > wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
>> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
>> > endpointName="s:SalaryDeclaration"
>> > serviceName="s:SalaryDeclarationService"
>> > xmlns:s="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
>> > <cxf:properties> <entry
>> > key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
>> > <value type="java.lang.Boolean">true</value> </entry>
>> >         </cxf:properties>
>> >     </cxf:cxfEndpoint>
>> >
>> >
>> > On Fri, 14 Nov 2008 08:14:03 -0500
>> > "Benson Margulies" <bi...@gmail.com> wrote:
>> >
>> >> This suggests that you are using Holder or something like it with
>> >> the wrong configuration. Details?
>> >>
>> >> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch>
>> >> wrote:
>> >>> Hi all,
>> >>>
>> >>> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
>> >>> and hit the following error on startup:
>> >>>
>> >>> "Message part {0} of Message {1} cannot be processed. This can be
>> >>> caused by the use of JAX-WS-specific types without the JAX-WS
>> >>> service factory bean."
>> >>>
>> >>> This new check was introduced in commit 688596. What is the
>> >>> reason behind that?
>> >>>
>> >>> My service class has some public setter methods for spring
>> >>> dependency injection, where it fails now because these methods
>> >>> aren't ws-service specific methods.
>> >>>
>> >>> What is the correct solution now?
>> >>>
>> >>> Thanks!
>> >>>
>> >>> Marc
>> >>>
>> >
>> >
>

Re: commit: r688596 cxf 2.0.9

Posted by Marc Giger <gi...@gmx.ch>.
Hi Willem,

Yes, the class itself and any service methods are annotated.

@javax.jws.WebService(name = "SalaryDeclarationPort", serviceName =
"SalaryDeclarationService", portName = "SalaryDeclaration",
        targetNamespace =
"http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService",
endpointInterface =
"ch.swissdec.schema.sd._20051002.salarydeclarationservice.SalaryDeclarationPort")
public class SalaryDeclarationServiceImpl implements
SalaryDeclarationPort {
...

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    @WebResult(name = "PingResponse", targetNamespace =
"http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes",
partName = "parameters") @WebMethod(operationName = "Ping") public
PingType ping(@WebParam(partName = "parameters", name= "Ping",
targetNamespace =
"http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes")
PingType parameters) {
...

In my case the ReflectionServiceFactoryBean tries to setup my service
although I have annotated the service: 
Caused by:
org.apache.cxf.service.factory.ServiceConstructionException: Service
class
ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
method setTransformer part
{http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService}setTransformer
cannot be mapped to schema. Check for use of a JAX-WS-specific type
without the JAX-WS service factory bean. at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:969)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)

Further ideas?

Thanks

Marc


On Fri, 14 Nov 2008 23:38:45 +0800
Willem Jiang <wi...@gmail.com> wrote:

> Hi Marc,
> 
> Does the
> ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
> has any JAXWS annotation ?
> If not , camel-cxf component will using the
> RelectionServiceFactoryBean instead of JaxWsServiceFactoryBean to
> create the service.
> 
> Willem
> 
> Marc Giger wrote:
> > Hi Benson
> > 
> > My setup (with camel-routing) :-)
> > Any ideas?
> > 
> > Thank you!
> > 
> > Marc
> > 
> > <bean id="salaryDeclarationServiceImpl"
> >           class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> >         <property name="userConfig" ref="userConfig"/>
> >         <property name="messageStore" ref="messageStore"/>
> >         <property name="resourceLoader"
> > ref="defaultResourceLoader"/> <property name="transformer"
> > ref="xslTransformer"/> <property name="logStore" ref="logStore"/>
> >         <property name="defaultUser" ref="defaultUserInstance"/>
> >         <property name="wsUtils20051002" ref="wsUtils"/>
> >     </bean>
> > 
> >     <cxf:cxfEndpoint id="routerEndpoint"
> > address="/SalaryDeclarationService"
> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
> > <cxf:outFaultInterceptors> <ref
> > bean="prepareMessageStoreFaultOutInterceptor"/> <ref
> > bean="messageStoreFaultOutInterceptor"/> </cxf:outFaultInterceptors>
> >     </cxf:cxfEndpoint>
> > 
> >     <jaxws:endpoint id="salaryDeclarationServiceJAXWS"
> > implementor="#salaryDeclarationServiceImpl"
> > address="local://SalaryDeclarationServiceJAXWS">
> > <jaxws:inInterceptors> <bean
> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
> > <bean
> > class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
> > <ref bean="wss4jInSignatureInterceptor"/> <ref
> > bean="eivWebInInterceptor"/> </jaxws:inInterceptors>
> > <jaxws:outInterceptors> <bean
> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> <ref
> > bean="wss4jOutSignatureInterceptor"/> <ref
> > bean="tamperSignatureOutInterceptor"/> <ref
> > bean="messageStoreAfterSignatureOutInterceptor"/> <ref
> > bean="wss4JOutEncryptInterceptor"/> <ref
> > bean="tamperEncryptionOutInterceptor"/> <ref
> > bean="messageStoreAfterEnctyptionOutInterceptor"/>
> > </jaxws:outInterceptors> <jaxws:outFaultInterceptors>
> >             <ref bean="faultCatcherOutInterceptor"/>
> >             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
> >             <ref bean="messageStoreFaultOutInterceptor"/>
> >         </jaxws:outFaultInterceptors>
> >         <jaxws:properties>
> >             <entry key="schema-validation-enabled" value="true"/>
> >         </jaxws:properties>
> >         <jaxws:schemaLocations>
> >             <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
> >             <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
> >             <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
> >         </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> > 
> >     <cxf:cxfEndpoint id="localEndpoint"
> > address="local://SalaryDeclarationServiceJAXWS"
> > transportId="http://cxf.apache.org/transports/local"
> > wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
> > serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
> > endpointName="s:SalaryDeclaration"
> > serviceName="s:SalaryDeclarationService"
> > xmlns:s="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
> > <cxf:properties> <entry
> > key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
> > <value type="java.lang.Boolean">true</value> </entry>
> >         </cxf:properties>        
> >     </cxf:cxfEndpoint>
> > 
> > 
> > On Fri, 14 Nov 2008 08:14:03 -0500
> > "Benson Margulies" <bi...@gmail.com> wrote:
> > 
> >> This suggests that you are using Holder or something like it with
> >> the wrong configuration. Details?
> >>
> >> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch>
> >> wrote:
> >>> Hi all,
> >>>
> >>> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
> >>> and hit the following error on startup:
> >>>
> >>> "Message part {0} of Message {1} cannot be processed. This can be
> >>> caused by the use of JAX-WS-specific types without the JAX-WS
> >>> service factory bean."
> >>>
> >>> This new check was introduced in commit 688596. What is the
> >>> reason behind that?
> >>>
> >>> My service class has some public setter methods for spring
> >>> dependency injection, where it fails now because these methods
> >>> aren't ws-service specific methods.
> >>>
> >>> What is the correct solution now?
> >>>
> >>> Thanks!
> >>>
> >>> Marc
> >>>
> > 
> > 

Re: commit: r688596 cxf 2.0.9

Posted by Willem Jiang <wi...@gmail.com>.
Hi Marc,

Does the
ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl
has any JAXWS annotation ?
If not , camel-cxf component will using the RelectionServiceFactoryBean
instead of JaxWsServiceFactoryBean to create the service.

Willem

Marc Giger wrote:
> Hi Benson
> 
> My setup (with camel-routing) :-)
> Any ideas?
> 
> Thank you!
> 
> Marc
> 
> <bean id="salaryDeclarationServiceImpl"
>           class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
>         <property name="userConfig" ref="userConfig"/>
>         <property name="messageStore" ref="messageStore"/>
>         <property name="resourceLoader" ref="defaultResourceLoader"/>
>         <property name="transformer" ref="xslTransformer"/>
>         <property name="logStore" ref="logStore"/>
>         <property name="defaultUser" ref="defaultUserInstance"/>
>         <property name="wsUtils20051002" ref="wsUtils"/>
>     </bean>
> 
>     <cxf:cxfEndpoint id="routerEndpoint" address="/SalaryDeclarationService"
>                      serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
>         <cxf:outFaultInterceptors>
>             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
>             <ref bean="messageStoreFaultOutInterceptor"/>
>         </cxf:outFaultInterceptors>
>     </cxf:cxfEndpoint>
> 
>     <jaxws:endpoint id="salaryDeclarationServiceJAXWS" implementor="#salaryDeclarationServiceImpl"
>                     address="local://SalaryDeclarationServiceJAXWS">
>         <jaxws:inInterceptors>
>             <bean class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
>             <bean class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
>             <ref bean="wss4jInSignatureInterceptor"/>
>             <ref bean="eivWebInInterceptor"/>
>         </jaxws:inInterceptors>
>         <jaxws:outInterceptors>
>             <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
>             <ref bean="wss4jOutSignatureInterceptor"/>
>             <ref bean="tamperSignatureOutInterceptor"/>
>             <ref bean="messageStoreAfterSignatureOutInterceptor"/>
>             <ref bean="wss4JOutEncryptInterceptor"/>
>             <ref bean="tamperEncryptionOutInterceptor"/>
>             <ref bean="messageStoreAfterEnctyptionOutInterceptor"/>
>         </jaxws:outInterceptors>
>         <jaxws:outFaultInterceptors>
>             <ref bean="faultCatcherOutInterceptor"/>
>             <ref bean="prepareMessageStoreFaultOutInterceptor"/>
>             <ref bean="messageStoreFaultOutInterceptor"/>
>         </jaxws:outFaultInterceptors>
>         <jaxws:properties>
>             <entry key="schema-validation-enabled" value="true"/>
>         </jaxws:properties>
>         <jaxws:schemaLocations>
>             <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
>             <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
>             <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
>         </jaxws:schemaLocations>
>     </jaxws:endpoint>
> 
>     <cxf:cxfEndpoint id="localEndpoint" address="local://SalaryDeclarationServiceJAXWS"
>                      transportId="http://cxf.apache.org/transports/local"
>                      wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
>                      serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
>                      endpointName="s:SalaryDeclaration"
>                      serviceName="s:SalaryDeclarationService"
>                      xmlns:s="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
>         <cxf:properties>
>             <entry key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
>                 <value type="java.lang.Boolean">true</value>
>             </entry>
>         </cxf:properties>        
>     </cxf:cxfEndpoint>
> 
> 
> On Fri, 14 Nov 2008 08:14:03 -0500
> "Benson Margulies" <bi...@gmail.com> wrote:
> 
>> This suggests that you are using Holder or something like it with the
>> wrong configuration. Details?
>>
>> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch> wrote:
>>> Hi all,
>>>
>>> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
>>> and hit the following error on startup:
>>>
>>> "Message part {0} of Message {1} cannot be processed. This can be caused
>>> by the use of JAX-WS-specific types without the JAX-WS service factory bean."
>>>
>>> This new check was introduced in commit 688596. What is the reason behind that?
>>>
>>> My service class has some public setter methods for spring dependency injection,
>>> where it fails now because these methods aren't ws-service specific methods.
>>>
>>> What is the correct solution now?
>>>
>>> Thanks!
>>>
>>> Marc
>>>
> 
> 


Re: commit: r688596 cxf 2.0.9

Posted by Marc Giger <gi...@gmx.ch>.
Hi Benson

My setup (with camel-routing) :-)
Any ideas?

Thank you!

Marc

<bean id="salaryDeclarationServiceImpl"
          class="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
        <property name="userConfig" ref="userConfig"/>
        <property name="messageStore" ref="messageStore"/>
        <property name="resourceLoader" ref="defaultResourceLoader"/>
        <property name="transformer" ref="xslTransformer"/>
        <property name="logStore" ref="logStore"/>
        <property name="defaultUser" ref="defaultUserInstance"/>
        <property name="wsUtils20051002" ref="wsUtils"/>
    </bean>

    <cxf:cxfEndpoint id="routerEndpoint" address="/SalaryDeclarationService"
                     serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl">
        <cxf:outFaultInterceptors>
            <ref bean="prepareMessageStoreFaultOutInterceptor"/>
            <ref bean="messageStoreFaultOutInterceptor"/>
        </cxf:outFaultInterceptors>
    </cxf:cxfEndpoint>

    <jaxws:endpoint id="salaryDeclarationServiceJAXWS" implementor="#salaryDeclarationServiceImpl"
                    address="local://SalaryDeclarationServiceJAXWS">
        <jaxws:inInterceptors>
            <bean class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.IDInInterceptor"/>
            <bean class="ch.itserve.lohnstandard.refapps2.shared.webservice.server.interceptors.RemoveInterceptorsInterceptor"/>
            <ref bean="wss4jInSignatureInterceptor"/>
            <ref bean="eivWebInInterceptor"/>
        </jaxws:inInterceptors>
        <jaxws:outInterceptors>
            <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
            <ref bean="wss4jOutSignatureInterceptor"/>
            <ref bean="tamperSignatureOutInterceptor"/>
            <ref bean="messageStoreAfterSignatureOutInterceptor"/>
            <ref bean="wss4JOutEncryptInterceptor"/>
            <ref bean="tamperEncryptionOutInterceptor"/>
            <ref bean="messageStoreAfterEnctyptionOutInterceptor"/>
        </jaxws:outInterceptors>
        <jaxws:outFaultInterceptors>
            <ref bean="faultCatcherOutInterceptor"/>
            <ref bean="prepareMessageStoreFaultOutInterceptor"/>
            <ref bean="messageStoreFaultOutInterceptor"/>
        </jaxws:outFaultInterceptors>
        <jaxws:properties>
            <entry key="schema-validation-enabled" value="true"/>
        </jaxws:properties>
        <jaxws:schemaLocations>
            <jaxws:schemaLocation>wsdl/SalaryDeclaration.xsd</jaxws:schemaLocation>
            <jaxws:schemaLocation>wsdl/SalaryDeclarationContainer.xsd</jaxws:schemaLocation>
            <jaxws:schemaLocation>wsdl/SalaryDeclarationServiceTypes.xsd</jaxws:schemaLocation>
        </jaxws:schemaLocations>
    </jaxws:endpoint>

    <cxf:cxfEndpoint id="localEndpoint" address="local://SalaryDeclarationServiceJAXWS"
                     transportId="http://cxf.apache.org/transports/local"
                     wsdlURL="wsdl/wsdl/SalaryDeclarationService.wsdl"
                     serviceClass="ch.itserve.lohnstandard.refapps2.receiver.ws20051002.service.SalaryDeclarationServiceImpl"
                     endpointName="s:SalaryDeclaration"
                     serviceName="s:SalaryDeclarationService"
                     xmlns:s="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationService">
        <cxf:properties>
            <entry key="org.apache.cxf.transport.local.LocalConduit.directDispatch">
                <value type="java.lang.Boolean">true</value>
            </entry>
        </cxf:properties>        
    </cxf:cxfEndpoint>


On Fri, 14 Nov 2008 08:14:03 -0500
"Benson Margulies" <bi...@gmail.com> wrote:

> This suggests that you are using Holder or something like it with the
> wrong configuration. Details?
> 
> On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch> wrote:
> > Hi all,
> >
> > I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
> > and hit the following error on startup:
> >
> > "Message part {0} of Message {1} cannot be processed. This can be caused
> > by the use of JAX-WS-specific types without the JAX-WS service factory bean."
> >
> > This new check was introduced in commit 688596. What is the reason behind that?
> >
> > My service class has some public setter methods for spring dependency injection,
> > where it fails now because these methods aren't ws-service specific methods.
> >
> > What is the correct solution now?
> >
> > Thanks!
> >
> > Marc
> >


-- 

itServe AG
Marc Giger
Länggassstrasse 26
3000 Bern 9
Tel.: +41 31 305 16 16
Fax:  +41 31 305 16 17

Direkt +41 31 305 43 27
Email marc.giger@itserve.ch

http://www.itserve.ch

Re: commit: r688596 cxf 2.0.9

Posted by Benson Margulies <bi...@gmail.com>.
This suggests that you are using Holder or something like it with the
wrong configuration. Details?

On Fri, Nov 14, 2008 at 8:10 AM, Marc Giger <gi...@gmx.ch> wrote:
> Hi all,
>
> I've tried to upgrade cxf from 2.0.7 to cxf 2.0.9
> and hit the following error on startup:
>
> "Message part {0} of Message {1} cannot be processed. This can be caused
> by the use of JAX-WS-specific types without the JAX-WS service factory bean."
>
> This new check was introduced in commit 688596. What is the reason behind that?
>
> My service class has some public setter methods for spring dependency injection,
> where it fails now because these methods aren't ws-service specific methods.
>
> What is the correct solution now?
>
> Thanks!
>
> Marc
>