Hi Brice
Ok, I understand better the case, I just read in surface the specification,
I am not well aware then of those recommendations.
I only saw that the jaxrs annotations are not annotated with @Inherited, but
it's okay if CXF implementation do the job to check the interfaces. I hope
this will be integrated as soon as possible to avoid bad programmation
behavior.
ok
Sorry I mixed up things yesterday night. I was thinking about Timeouts
Well our application should be coherent in the way that the integrators
should only have properties file to modify.
Here's a Spring configuration that works well, the timeouts are correctly
set on the conduit
=====================================================
<bean id="conf"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<http-conf:conduit name="*RestService.http-conduit" >
<http-conf:client
ReceiveTimeout="5000"
ConnectionTimeout="5000"
/>
<http:authorization>
<sec:UserName>usernamehere</sec:UserName>
<sec:Password>passwordhere</sec:Password>
</http:authorization>
</http-conf:conduit>
=====================================================
But if I want to use properties like that
=====================================================
<http-conf:client
ReceiveTimeout="${http.receive.timeout}"
ConnectionTimeout="${http.connection.timeout}"
/>
=====================================================
Then the xml declaration is no more valid because the properties datatype
should be unsignedInteger.
This sounds reasonable, it's not a CXF JAX-RS though. Perhaps Dan or someone
else can look at your proposal
in more details...
And last question, do you plan to create JAXRSClient factory bean, right
know using the JaxWsPRoxyFactoryBean is a bit intricate when declaring it
in
a Spring application context and setting properties like setWrapped.
Please expand on it a bit more too.
Ok, so to have a REST client we can use the following code in Java.
=====================================================
JaxWsProxyFactoryBean sf = new JaxWsProxyFactoryBean();
sf.setServiceClass(RestService.class);
sf.getServiceFactory().setWrapped(false);
sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
// Allow the client to understand Rest
sf.setAddress("http://localhost:8080/xml/");
CustomerService cs = (CustomerService)sf.create();
=====================================================
Looks like this time you're looking at the CXF-private HttpBinding - this is completely orthogonal to what CXF JAX-RS offers and
it's not well mantained.
Cheers, Sergey
However if I want to create a Spring bean of this service (without creating
a custom BeanFactory), we need to look into the factory to set some
properties like the "wrapped" one
=====================================================
<bean id="serviceFactory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="wrapped" value="false" />
</bean>
<bean id="clientFactoryBean"
class="org.apache.cxf.jaxws.JaxWsClientFactoryBean">
<property name="serviceFactory" ref="serviceFactory" />
<property name="serviceClass" value="com.rest.tryout.RestService" />
</bean>
<bean id="restServiceProxyFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="clientFactoryBean" ref="clientFactoryBean" />
<property name="address" value="${server.http.address}" />
<property name="bindingId">
<util:constant
static-field="org.apache.cxf.binding.http.HttpBindingFactory.HTTP_BINDING_ID"
/>
</property>
</bean>
<bean id="restServiceClient"
class="com.rest.tryout.RestService"
factory-bean="restServiceProxyFactory"
factory-method="create" />
=====================================================
I was mentionning the intricacy of this declaration, and I did this work
while still on 2.0.5, however I believe the Spring jaxrs bean declarations
still doesn't propose to set such properties.
Cheers, Sergey
Thx in advance for your answers.
Btw CXF is really a Great work :)
--
Brice Dutheil
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
--
Brice Dutheil
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland