You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ajay Paibir (JIRA)" <ji...@apache.org> on 2007/09/07 16:23:31 UTC
[jira] Created: (CXF-980) Configuring a JAX-WS Dispatch Client via
Spring ApplicationContext
Configuring a JAX-WS Dispatch Client via Spring ApplicationContext
------------------------------------------------------------------
Key: CXF-980
URL: https://issues.apache.org/jira/browse/CXF-980
Project: CXF
Issue Type: New Feature
Components: Configuration
Affects Versions: 2.0.1
Reporter: Ajay Paibir
Assignee: Ajay Paibir
There is a requirement to create Dispatch Clients that deal with JAXB or Source data models but leave the EndpointName and Url to be set in the config files.So that the application code need not be compiled if data has to be switched to some other endpoint.
Currently as per the link http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html it is possible to create a prxoy by specifying the ProxyFactory in the config
Along the same lines if it is possbile to create a Dispatch Instance and return it for the user to Dispatch his objects would be great.
So effectively the spring config would look something like ...
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<bean id="proxyFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceName" value="{http://foo}HWService"/>
<property name="portName" value="{http://foo}HWPort"/>
<property name="address" value="http://localhost:9002/HelloWorld"/>
<property name="bindingId" value="soap_binding_id"/>
<property name="serviceMode" value="PAYLOAD or MESSAGE"/>
<property name="dataFormat" value="Source.class or JAXB Classes"/>
</bean>
<bean id="Client1" class="javax.xml.ws.Dispatch"
factory-bean="proxyFactory" factory-method="createDispatch"/>
</beans>
The Client Mainline would then be
BusApplicationContext bac = Bus.getExtension(BusApplicationContext .class);
Dispatch disp = (Dispatch)bac.getBean("Client1");
disp.invoke(...);
Is this possible?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.