You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by rouble <r....@gmail.com> on 2011/11/08 01:15:37 UTC
@PostConstruct called twice
Looks like a bug. Or I am missing something. My spring config looks like this:
<bean id="myBean" class="com.example.MyBean" scope="singleton">
<property name="someProperty" ref="someProperty"/>
</bean>
<jaxws:endpoint
id="webserviceinterface"
implementor="#myBean"
address="/MyWebService">
</jaxws:endpoint>
Once after the property (someProperty) is set:
at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:345)
at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:124)
at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
and once when the service is deployed:
at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:345)
at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:124)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(JaxWsServerFactoryBean.java:268)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.initializeResourcesAndHandlerChain(JaxWsServerFactoryBean.java:215)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$7.run(AbstractAutowireCapableBeanFactory.java:1531)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
Is that expected?
tia,
rouble
Re: Does cxf support xsd:any?
Posted by Aki Yoshida <el...@googlemail.com>.
If you want to send out an arbitrary xml payload from a camel-cxf
endpoint, you can use the dispatch mode (i.e., specifying neither the
wsdl nor the service endpoint class at the camel-cxf endpoint).
regards, aki
2011/11/8 xuhb <xu...@tongtech.com>:
> Hi:
> I am using camel 's payload CXF component; Now I want publish a service which doesn't constraint any xml schema, and client can post any xml element to this webservice; so I define the wsdl which input message's element is xsd:any; it looks like:
>
> <wsdl:message name="anyRequest">
> <wsdl:part name="payload" element="xsd:any"/>
> </wsdl:message>
> wsdl:operation name="AnyPort">
> <wsdl:input message="tns:anyRequest"/>
> </wsdl:operation>
>
> But CXF doesn't support it now;
>
> I wonderring if this usage is valid to webservice specification? And should CXF support it or not?
>
>
Does cxf support xsd:any?
Posted by xuhb <xu...@tongtech.com>.
Hi:
I am using camel 's payload CXF component; Now I want publish a service which doesn't constraint any xml schema, and client can post any xml element to this webservice; so I define the wsdl which input message's element is xsd:any; it looks like:
<wsdl:message name="anyRequest">
<wsdl:part name="payload" element="xsd:any"/>
</wsdl:message>
wsdl:operation name="AnyPort">
<wsdl:input message="tns:anyRequest"/>
</wsdl:operation>
But CXF doesn't support it now;
I wonderring if this usage is valid to webservice specification? And should CXF support it or not?