I think you shouls set the 'bus' property of your 'clientFactory' bean.

You can achive this using new SpringBusFactory().createBus(). For usage in 
Spring you need to define the SpringBusFactory and the Bus itself as separate 
beans and then inject the bus property into the client factory.

Something liek this (pseudo code):

<bean id="BusFactory" class="full.qualified.SpringBusFactory" />

<bean id="CXFBus" factory-bean="BusFactory" factory-method="createBus" />

<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="bus" ref="CXFBus" />
        <property name="serviceClass" 
value="com.acme.services.server.TestService" />
        <property name="address" value="/testService" />
</bean>

Hope this helps. Do not know if this is the best solution because I am new to 
CXF but for me it worked.


Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 

-----Ursprüngliche Nachricht-----
Von: Richard Lawrence [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 12. Juli 2007 17:39
An: cxf-user@incubator.apache.org
Betreff: Could not find destination factory for transport

 
I am getting the following error when trying to call a client using spring with 
CXF:

16:26:12,499 ERROR DispatcherUtils:245 - Could not execute action
javax.xml.ws.soap.SOAPFaultException: Could not find destination factory for 
transport http://schemas.xmlsoap.org/soap/http
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
        at $Proxy40.test(Unknown Source)

I have browsed the mailing list and it states I should put the following jar on 
the classpath:

cxf-rt-transports-http-jetty-2.0-incubator.jar

I have this jar on my classpath and am not getting any joy. My service works as 
expected its just the corresponding client.

I am hosting the code in Tomcat 6.0.10 and using Webwork as my application 
framework (Essentially it's using the Spring IOC).

I have the following client-beans.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!--
        Licensed to the Apache Software Foundation (ASF) under one
        or more contributor license agreements. See the NOTICE file
        distributed with this work for additional information
        regarding copyright ownership. The ASF licenses this file
        to you under the Apache License, Version 2.0 (the
        "License"); you may not use this file except in compliance
        with the License. You may obtain a copy of the License at
        
        http://www.apache.org/licenses/LICENSE-2.0
        
        Unless required by applicable law or agreed to in writing,
        software distributed under the License is distributed on an
        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, either express or implied. See the License for the
        specific language governing permissions and limitations
        under the License.
-->
<!-- START SNIPPET: beans -->
<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/schema/jaxws.xsd";>

  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-http.xml"
/>

        <import
resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />  


<bean id="client" class="com.acme.services.server.TestService" 
      factory-bean="clientFactory" factory-method="create"/>
    
        <bean id="clientFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
          <property name="serviceClass"
value="com.acme.services.server.TestService"/>
          <property name="address" value="/testService"/>
        </bean>
          
</beans>
<!-- END SNIPPET: beans -->

Does anybody know what could be causing this error?
 
Regards

Richard Lawrence 

CONFIDENTIALITY NOTICE

This e-mail is confidential to the addressee. It may also be privileged. 
Neither the confidentiality nor any privilege attaching to this e-mail is 
waived lost or destroyed by reason that it has been mistakenly transmitted to a 
person or entity other than the addressee. If you are not the addressee please 
notify us immediately by telephone or fax at the numbers provided above or 
e-mail by Reply To Author and return the printed e-mail to us by post at our 
expense. We believe, but do not warrant, that this e-mail and any attachments 
are virus-free, but you should check. We may monitor traffic data of both 
business and personal e-mails. We are not liable for any opinions expressed by 
the sender where this is a non-business e-mail. If you do not receive all the 
message, or if you have difficulty with the transmission, please telephone us 
immediately.

Reply via email to