I could be off here, but this might be as simple as importing the HTTP
extension:

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

- Dan

On 7/21/07, Jiang, Ning (Willem) <[EMAIL PROTECTED]> wrote:

I got what's you want.

I filled a JIRA for it[1]. And You could watch it and try out the
snapshots when I close the JIRA.

[1]https://issues.apache.org/jira/browse/CXF-821

Willem.

-----Original Message-----
From: Diego Xu [mailto:[EMAIL PROTECTED]
Sent: Fri 7/20/2007 18:38
To: [email protected]
Subject: Re: Could not find destination factory for transport


Hi Willem:
    Thanks alot for ur reply.
    And definitly u r right. i have tried it out, and it turn's out work
fine.
    you also make the trick more clear, i got that. thks again:)

    while as u just mentioned: one can not  put both server and client in
one spring context... that make me come up with a senario that in some
cases
we need an spring application be both the web service provider and
consumer.
is your saying meant that there will be problem work this out?

    well, this 'problem' is not proved by code anyway. but i realy
interested about it.


----------------------------------------------------------------------------------------

Willem Jiang-2 wrote:
>
> Hi Diego,
>
> I just went through your mail, and found you put the server and client
> in one spring application context.
> That is wrong. because they have different context.
> And I also found that the log should be "Could not find conduit
> initiator for ***"
>
> There some transport URI conflict between servlet transport and the
> standalone http transport.
> We just split them into cxf-extension-http-jetty.xml  and
cxf-servlet.xml.
> And there is no http conduit  initiatior defined in the servlet
> transport factory.
>
> And in your case , you just put the cxf-servlet.xml in you spring
> application context, so the client http conduit Initiator will not be
> found for the client.
>
> You need to create the client with another spring application context
> file likes this:
>
> <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";>
>
>     <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-jetty.xml"
> />
>
>
>
>     <bean id="client" class="com.net2com.webservice.HelloWorld"
>       factory-bean="clientFactory" factory-method="create"/>
>
>     <bean id="clientFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>         <property name="serviceClass"
> value="com.net2com.webservice.HelloWorld"/>
>         <property name="address"
> value="http://localhost:8080/interface/webservice/HelloWorld"/>
>     </bean>
> </beans>
>
> Cheers,
>
> Willem.
>
> Diego Xu wrote:
>> Hi:
>>   I'm using CXF2.0 release version for my first try of jax-ws, and now
>> got
>> blocked by an error throwed by server.
>>   I'm using JDK5.0, Tomcat5.5, Spring2.0.6.
>>
>>   here is my HellowWorld interface:
>> ---------------------------------
>> package com.net2com.webservice;
>>
>> import javax.jws.WebService;
>>
>> @WebService
>> public interface HelloWorld {
>>     String sayHi(String text);
>> }
>>
>>   and impl:
>> ------------------------------------
>> package com.net2com.webservice;
>>
>> import javax.jws.WebService;
>>
>> @WebService(endpointInterface = "com.net2com.webservice.HelloWorld")
>> public class HelloWorldImpl implements HelloWorld {
>>
>>     public String sayHi(String text) {
>>         return "Hello " + text;
>>     }
>> }
>>
>>
>> Spring config: (I put both server and client into one application)
>> -------------------------------
>>
>> <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";>
>>
>>     <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-servlet.xml" />
>>       .......
>>       <jaxws:endpoint id="helloWorld"
>>              implementor="com.net2com.webservice.HelloWorldImpl"
>>              address="/HelloWorld" />
>>
>>       <bean id="client" class="com.net2com.webservice.HelloWorld"
>>       factory-bean="clientFactory" factory-method="create"/>
>>
>>      <bean id="clientFactory"
>> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>        <property name="serviceClass"
>> value="com.net2com.webservice.HelloWorld"/>
>>        <property name="address"
>> value="http://localhost:8080/interface/webservice/HelloWorld"/>
>>      </bean>
>> </beans>
>>
>>  tomcat web.xml
>> ------------------------------------
>> <web-app>
>>             .......
>>      <servlet>
>>              <servlet-name>CXFServlet</servlet-name>
>>              <display-name>CXF Servlet</display-name>
>>              <servlet-class>
>>                      org.apache.cxf.transport.servlet.CXFServlet
>>              </servlet-class>
>>              <load-on-startup>1</load-on-startup>
>>      </servlet>
>>
>>      <servlet-mapping>
>>              <servlet-name>CXFServlet</servlet-name>
>>              <url-pattern>/webservice/*</url-pattern>
>>      </servlet-mapping>
>>            ..............
>> </web-app>
>>
>> and i already put following deps into WEB-INF/lib
>> -----------------------------------
>> commons-logging-1.1.jar
>> geronimo-activation_1.1_spec-1.0-M1.jar
>> geronimo-annotation_1.0_spec-1.1.jar
>> geronimo-javamail_1.4_spec-1.0-M1.jar
>> geronimo-servlet_2.5_spec-1.1-M1.jar
>> geronimo-ws-metadata_2.0_spec-1.1.1.jar
>> jaxb-api-2.0.jar
>> jaxb-impl-2.0.5.jar
>> jaxws-api-2.0.jar
>> saaj-api-1.3.jar
>> saaj-impl-1.3.jar
>> stax-api-1.0.1.jar
>> wsdl4j-1.6.1.jar
>> wstx-asl-3.2.1.jar
>> XmlSchema-1.2.jar
>>
>> spring-2.0.6.jar
>>
>> cxf-2.0-incubator.jar
>>
>> -----------------------------#
>>
>> that's all my did to run the first spring demo, but when i try to
invoke
>> server side impl through:
>>
>> this.helloWorldService = (HelloWorld) wac.getBean("client");  // get ws
>> client bean from spring context
>> ...
>> String greet = helloWorldService.sayHi("CXF");
>>
>> i got following error:
>>
>> 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 $Proxy15.sayHi(Unknown Source)
>>      at
>>
com.net2com.face.action.thirdinterface.ThirdInterfaceQueryAction.queryOutBoundInterface
(ThirdInterfaceQueryAction.java:75)
>>    .......
>> Caused by: java.lang.RuntimeException: Could not find destination
factory
>> for transport http://schemas.xmlsoap.org/soap/http
>>      at
>> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(
SoapTransportFactory.java:148)
>>     .......
>>
>>
>> I already checked out some threads, some say their is another
dependency
>> needed:
>> cxf-rt-transports-http-2.0-incubator.jar
>> but i wonder it's not what i want coz i have tried it out, while still
>> doesn't work.
>>
>> I got stuck for a whole day to work this out, could any body here give
me
>> a
>> hand?
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/Could-not-find-destination-factory-for-transport-tf4103147.html#a11705898
Sent from the cxf-user mailing list archive at Nabble.com.





--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Reply via email to