Hmm,
from what I understand you initialize the service proxy by instatiating
the service client class. While this may work I would rather configure
the service proxy in spring and inject the proxy into your bean.
In any case I think the problem is that cxf is not initialized
correctly. So at least you will have to do some imports. You could try a
config similar to the wsdl first example from the cxf distribution.
Take a look at the client-applicationContext.xml. I have attached the
config below.
The sample is not designed for osgi though so I am not sure if
classloading problems could cause more troubles. Btw. Is there a reason
you use servicemix for this case? I normally do such implementations as
wars in a plain tomcat. This environment is much easier to understand.
Greetings
Christian
Am 20.08.2010 00:08, schrieb Roland Villemoes:
Hi,
Sounds so nice that this should be easy to fix. I really hope that's true.
I have attached the source part of the bundle (/src) that contains the
spring part as well as the webservice proxy etc.
http://camel.465427.n5.nabble.com/file/n2641609/src2.zip src2.zip
Thanks a lot.
------------------
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:customer="http://customerservice.example.com/"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
">
<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-extension-http.xml" />
<!--
Define a cxf endpoint based on client stub generated from a
wsdl. It
is important to provide serviceName and endpointName so the wsdl is
not needed at runtime. As far as I know the serviceName and
endpointName do not have to have a special convention but it is
good
practice to use the service namespace and Service Interface name in
the names
-->
<jaxws:client id="customerService"
serviceName="customer:CustomerServiceService"
endpointName="customer:CustomerServiceEndpoint"
address="http://localhost:9090/CustomerServicePort"
serviceClass="com.example.customerservice.CustomerService">
</jaxws:client>
<bean id="tester"
class="com.example.customerservice.client.CustomerServiceTester">
<property name="customerService" ref="customerService"></property>
</bean>
</beans>
---------------------
--
----
http://www.liquid-reality.de