You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Willem Jiang <ni...@iona.com> on 2007/08/06 04:16:55 UTC

Re: CXFServlet and the EndPoint API?

Hi ,

I am sorry to reply your letter so late. If you still not find a 
solution yet, please take a look at my suggestion.

Yes, CXFServlet will try to load a bus without spring support.
But before you use the JAXWS Endpoint.publish() API , you need to setup 
the default bus with the CXFServlet bus.
The code could be

        CXFServlet servlet = getCXFServlet();
        ......
        Bus bus = servlet.getBus();
        BusFactory.setDefaultBus(bus);
        ......
        Endpoint endpoint = Endpoint.create(new GreeterImpl());
        endpoint.publish(address);
        ......


Willem.
Yeroc wrote:
> All...
>
> I've been trying to create a web service deployed as a .war file to a Tomcat
> v5.5 container whilst avoiding the usage of the Spring xml config.  The
> documentation at http://cwiki.apache.org/CXF20DOC/servlet-transport.html
> suggests it is possible to use the CXFServlet in this configuration using
> the API to publish the Endpoint (see the "Publishing an endpoint with the
> API" sub-section).  I haven't been able to get this to work successfully. 
> My first attempt used a ServletContextListener (similar to what Spring does)
> and called Endpoint.publish() from there but doing that resulted in CXF
> attempting to fire up Jetty from within Tomcat (I assume this is because my
> code was running before the servlet was initialized.)  My second attempt is
> calling the Endpoint.publish() from within a servlet filter but the
> CXFServlet seems to be looking for a JNDI server on port 1099 that doesn't
> exist.
>
> Is what I'm attempting to do possible?  How do I initialize things
> appropriately via the API when using the servlet in a container?
>
> Incidentally, the documentation suggests Spring isn't a required dependency
> but the CXFServlet can't be instantiated without Spring being on the
> classpath due to it relying on a number of Spring classes.  Is this an
> oversight that will be corrected in the future?
>
> Thanks for your help,
> Corey
>   

Re: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Posted by Willem Jiang <ni...@iona.com>.
This a well know issue, you can find the issues from the below URLs.

[1]CXF JIRA 922
https://issues.apache.org/jira/browse/CXF-922
[2]Set the SSL parament with Java API
http://www.nabble.com/Error-when-trying-to-contact-service-over-SSL-on-a-specific-port-tf4424617.html#a12654695

BTW, here is also a Chinese thread talking about this in the cxf-zh.
http://groups.google.com/group/cxf-zh/browse_thread/thread/1be279db5e9fe57c/08861d485d0a3642#08861d485d0a3642

Willem.

Roger_Wang@Dell.com wrote:
>  Willem:
> thanks a lots for your help.
> you are right.we do not need to add httpj:engine-factory to our spring config file --beans.xml.
> i solved this problem. i config ssl on my weblogic9.2. and i can use the client generated from WSDL  call the webservice with web security over https protocal.
> but if i use the spring client ,there are some error happen. i add -Dcxf.config.file=sslClient.xml to the client jvm arguments. but obviuosly, sslClient.xml does not work when i use spring client.
> how to use spring client to call https webserive? 
>
>
> thanks in advance!
>
> Roger
>
>
> --------------log  ------
> 2007-9-21 17:27:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
> 信息: Creating Service {http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService from class com.dell.dragonfx.scan.service.interfaces.HelloWorld
> 2007-9-21 17:27:14 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> 信息: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	at $Proxy32.sayHi(Unknown Source)
> 	at com.dell.dragonfx.scan.service.Client.main(Client.java:42)
> Caused by: java.io.IOException: Illegal Protocol https for HTTP URLConnection Factory.
> 	at org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnection(HttpURLConnectionFactoryImpl.java:44)
> 	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
> 	... 7 more
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not send Message.
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
> 	at $Proxy32.sayHi(Unknown Source)
> 	at com.dell.dragonfx.scan.service.Client.main(Client.java:42)
> Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	... 2 more
> Caused by: java.io.IOException: Illegal Protocol https for HTTP URLConnection Factory.
> 	at org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnection(HttpURLConnectionFactoryImpl.java:44)
> 	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
> 	... 7 more
> --------sslClient------------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:sec="http://cxf.apache.org/configuration/security"
>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>   xsi:schemaLocation="
>            http://cxf.apache.org/configuration/security
>            http://cxf.apache.org/schemas/configuration/security.xsd
>            http://cxf.apache.org/transports/http/configuration
>            http://cxf.apache.org/schemas/configuration/http-conf.xsd
>            http://www.springframework.org/schema/beans
>            http://www.springframework.org/schema/beans/spring-beans.xsd">
>
>   <http:conduit name="{http://backendService.scan.dragonfx.dell.com/}HelloWorldImplPort.http-conduit">
>     <http:tlsClientParameters>    
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                file="c:\bea\server\mykeystore"/>
>       </sec:trustManagers>
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password" 
>                 file="c:\bea\server\cacerts"/>
>       </sec:keyManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>      
>     </http:tlsClientParameters>
>    </http:conduit>
>   
>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>     </bean> 
>
> </beans>
>
> -----client-bean.xml------
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xmlns:jaxws="http://cxf.apache.org/jaxws"
> 	xmlns:sec="http://cxf.apache.org/configuration/security"
> 	xmlns:http="http://cxf.apache.org/transports/http/configuration"
> 	xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
> 	xsi:schemaLocation="
> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
>  http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
>             http://cxf.apache.org/transports/http/configuration
>             http://cxf.apache.org/schemas/configuration/http-conf.xsd
>             http://cxf.apache.org/transports/http-jetty/configuration
>             http://cxf.apache.org/schemas/configuration/http-jetty.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" />
> 	<!-- 
> 	<import resource="classpath:sslClient.xml" />
> 	 -->
> 	<bean id="client"
> 		class="com.dell.dragonfx.scan.service.interfaces.HelloWorld"
> 		factory-bean="clientFactory" factory-method="create" />
>
> 	<bean id="clientFactory"
> 		class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> 		<property name="serviceClass"
> 			value="com.dell.dragonfx.scan.service.interfaces.HelloWorld" />
> 		<property name="address"
> 			value="https://localhost:7002/LSPApp/services/HelloWorld" />
>
> 		<property name="outInterceptors">
> 			<list>
> 				<bean
> 					class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
> 				<bean
> 					class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
> 					<constructor-arg>
> 						<map>
> 							<entry key="action" value="UsernameToken" />
> 							<entry key="user" value="joe" />
> 							<entry key="passwordType"
> 								value="PasswordText" />
> 							<entry key="passwordCallbackClass"
> 								value="com.demo.wss4j.interceptors.ClientPasswordCallback" />
> 						</map>
> 					</constructor-arg>
> 				</bean>
> 			</list>
> 		</property>
> 	</bean>
> <!-- 
> 	<http:conduit
> 		name="{http://backendService.scan.dragonfx.dell.com/}HelloWorldImplPort.http-conduit">
> 		<http:tlsClientParameters>
> 			<sec:trustManagers>
> 				<sec:keyStore type="JKS" password="password"
> 					file="c:\bea\server\mykeystore" />
> 			</sec:trustManagers>
> 			<sec:keyManagers keyPassword="password">
> 				<sec:keyStore type="JKS" password="password"
> 					file="c:\bea\server\cacerts" />
> 			</sec:keyManagers>
> 			<sec:cipherSuitesFilter>
> 				<sec:include>.*_EXPORT_.*</sec:include>
> 				<sec:include>.*_EXPORT1024_.*</sec:include>
> 				<sec:include>.*_WITH_DES_.*</sec:include>
> 				<sec:include>.*_WITH_NULL_.*</sec:include>
> 				<sec:exclude>.*_DH_anon_.*</sec:exclude>
> 			</sec:cipherSuitesFilter>
>
> 		</http:tlsClientParameters>
> 	</http:conduit>
>  -->
> </beans>
>
>
> thanks
>
> Roger
>
> -----Original Message-----
> From: Willem Jiang [mailto:ning.jiang@iona.com] 
> Sent: 2007年9月21日 17:18
> To: cxf-user@incubator.apache.org
> Subject: Re: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer
>
> Sorry, I forget to attach the url.
> It is
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
>
> Willem.
>
>
> Willem Jiang wrote:
>   
>> Hi Roger,
>>
>> If you want to use the https transport by leveraging the Servlet 
>> transport , you do not need to specify the httpj:engine-factory in 
>> your bean.xml.
>> httpj:engine-factory only take effect if you use the jetty as your 
>> http transport engine.
>>
>> After I went through your bean.xml, I can't found any endpoint 
>> specification there. You did not publish any endpoint yet, so you got 
>> the error of
>>
>> "Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer"
>>
>> Please refer this [1] to publish a service without ssl transport first.
>>
>> Willem.
>>
>> Roger_Wang@Dell.com wrote:
>>   
>>     
>>> all:
>>>
>>> i want to publish CXF(2.01) webservice with WSS(user token) over SSL to weblogic 9.2. 
>>> i got this error when a client to call the service. and i donot think weblogic has publish service succesfull,but there is not error happen according to the console:
>>>
>>> 2007-9-21 9:34:54 org.apache.cxf.transport.servlet.ServletController 
>>> invoke
>>> 警告: Can't find the the request for 
>>> http://localhost:7001/LSPApp/services/HelloWorld's Observer
>>>
>>> -----------------cxfServer.xml--------------------------
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>>   xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
>>>   xmlns:jaxws="http://cxf.apache.org/jaxws"
>>>   xsi:schemaLocation="
>>>        http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
>>>             http://cxf.apache.org/transports/http/configuration
>>>             http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>>             http://cxf.apache.org/transports/http-jetty/configuration
>>>             http://cxf.apache.org/schemas/configuration/http-jetty.xsd
>>>             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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" />
>>> 	
>>>   <http:destination name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService.HelloWorldImplPort"> 
>>>   </http:destination>
>>>
>>>   <httpj:engine-factory bus="cxf">  
>>>    <httpj:engine port="7002">   
>>>     <httpj:tlsServerParameters>     
>>>       <sec:keyManagers keyPassword="password">
>>>            <sec:keyStore type="JKS" password="password" 
>>>                 file="c:\bea\server\mykeystore"/>
>>>       </sec:keyManagers>
>>>       <sec:trustManagers>
>>>           <sec:keyStore type="JKS" password="password"
>>>                file="c:\bea\server\cacerts"/>
>>>       </sec:trustManagers>
>>>       <sec:cipherSuitesFilter>
>>>         <sec:include>.*_EXPORT_.*</sec:include>
>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>>       </sec:cipherSuitesFilter>
>>>       
>>>       <sec:clientAuthentication want="true" required="true"/>
>>>       
>>>     </httpj:tlsServerParameters>
>>>    </httpj:engine>
>>>   </httpj:engine-factory>
>>>   
>>>   <!-- We need a bean named "cxf" -->
>>>
>>> </beans>
>>>
>>> -------------sslclient.xml------------------
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>>>   xsi:schemaLocation="
>>>            http://cxf.apache.org/configuration/security
>>>            http://cxf.apache.org/schemas/configuration/security.xsd
>>>            http://cxf.apache.org/transports/http/configuration
>>>            http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>>            http://www.springframework.org/schema/beans
>>>            
>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>
>>>   <http:conduit name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldImplService.HttpConduit">
>>>     <http:tlsClientParameters>
>>>     
>>>       <sec:trustManagers>
>>>           <sec:keyStore type="JKS" password="password"
>>>                file="c:\bea\server\mykeystore"/>
>>>       </sec:trustManagers>
>>>       <sec:keyManagers keyPassword="password">
>>>            <sec:keyStore type="JKS" password="password" 
>>>                 file="c:\bea\server\cacerts"/>
>>>       </sec:keyManagers>
>>>       <sec:cipherSuitesFilter>
>>>         <sec:include>.*_EXPORT_.*</sec:include>
>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>>       </sec:cipherSuitesFilter>
>>>      
>>>     </http:tlsClientParameters>
>>>    </http:conduit>
>>>   
>>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>>     </bean>
>>>
>>> </beans>
>>>
>>>
>>> thanks for any help
>>>
>>> Roger
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>   

RE: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Posted by Ro...@Dell.com.
 Willem:
thanks a lots for your help.
you are right.we do not need to add httpj:engine-factory to our spring config file --beans.xml.
i solved this problem. i config ssl on my weblogic9.2. and i can use the client generated from WSDL  call the webservice with web security over https protocal.
but if i use the spring client ,there are some error happen. i add -Dcxf.config.file=sslClient.xml to the client jvm arguments. but obviuosly, sslClient.xml does not work when i use spring client.
how to use spring client to call https webserive? 


thanks in advance!

Roger


--------------log  ------
2007-9-21 17:27:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
信息: Creating Service {http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService from class com.dell.dragonfx.scan.service.interfaces.HelloWorld
2007-9-21 17:27:14 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
信息: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	at $Proxy32.sayHi(Unknown Source)
	at com.dell.dragonfx.scan.service.Client.main(Client.java:42)
Caused by: java.io.IOException: Illegal Protocol https for HTTP URLConnection Factory.
	at org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnection(HttpURLConnectionFactoryImpl.java:44)
	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474)
	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
	... 7 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not send Message.
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
	at $Proxy32.sayHi(Unknown Source)
	at com.dell.dragonfx.scan.service.Client.main(Client.java:42)
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 2 more
Caused by: java.io.IOException: Illegal Protocol https for HTTP URLConnection Factory.
	at org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnection(HttpURLConnectionFactoryImpl.java:44)
	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474)
	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
	... 7 more
--------sslClient------------
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xsi:schemaLocation="
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

  <http:conduit name="{http://backendService.scan.dragonfx.dell.com/}HelloWorldImplPort.http-conduit">
    <http:tlsClientParameters>    
      <sec:trustManagers>
          <sec:keyStore type="JKS" password="password"
               file="c:¥bea¥server¥mykeystore"/>
      </sec:trustManagers>
      <sec:keyManagers keyPassword="password">
           <sec:keyStore type="JKS" password="password" 
                file="c:¥bea¥server¥cacerts"/>
      </sec:keyManagers>
      <sec:cipherSuitesFilter>
        <sec:include>.*_EXPORT_.*</sec:include>
        <sec:include>.*_EXPORT1024_.*</sec:include>
        <sec:include>.*_WITH_DES_.*</sec:include>
        <sec:include>.*_WITH_NULL_.*</sec:include>
        <sec:exclude>.*_DH_anon_.*</sec:exclude>
      </sec:cipherSuitesFilter>
     
    </http:tlsClientParameters>
   </http:conduit>
  
    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
    </bean> 

</beans>

-----client-bean.xml------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jaxws="http://cxf.apache.org/jaxws"
	xmlns:sec="http://cxf.apache.org/configuration/security"
	xmlns:http="http://cxf.apache.org/transports/http/configuration"
	xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
            http://cxf.apache.org/transports/http/configuration
            http://cxf.apache.org/schemas/configuration/http-conf.xsd
            http://cxf.apache.org/transports/http-jetty/configuration
            http://cxf.apache.org/schemas/configuration/http-jetty.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" />
	<!-- 
	<import resource="classpath:sslClient.xml" />
	 -->
	<bean id="client"
		class="com.dell.dragonfx.scan.service.interfaces.HelloWorld"
		factory-bean="clientFactory" factory-method="create" />

	<bean id="clientFactory"
		class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
		<property name="serviceClass"
			value="com.dell.dragonfx.scan.service.interfaces.HelloWorld" />
		<property name="address"
			value="https://localhost:7002/LSPApp/services/HelloWorld" />

		<property name="outInterceptors">
			<list>
				<bean
					class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
				<bean
					class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
					<constructor-arg>
						<map>
							<entry key="action" value="UsernameToken" />
							<entry key="user" value="joe" />
							<entry key="passwordType"
								value="PasswordText" />
							<entry key="passwordCallbackClass"
								value="com.demo.wss4j.interceptors.ClientPasswordCallback" />
						</map>
					</constructor-arg>
				</bean>
			</list>
		</property>
	</bean>
<!-- 
	<http:conduit
		name="{http://backendService.scan.dragonfx.dell.com/}HelloWorldImplPort.http-conduit">
		<http:tlsClientParameters>
			<sec:trustManagers>
				<sec:keyStore type="JKS" password="password"
					file="c:¥bea¥server¥mykeystore" />
			</sec:trustManagers>
			<sec:keyManagers keyPassword="password">
				<sec:keyStore type="JKS" password="password"
					file="c:¥bea¥server¥cacerts" />
			</sec:keyManagers>
			<sec:cipherSuitesFilter>
				<sec:include>.*_EXPORT_.*</sec:include>
				<sec:include>.*_EXPORT1024_.*</sec:include>
				<sec:include>.*_WITH_DES_.*</sec:include>
				<sec:include>.*_WITH_NULL_.*</sec:include>
				<sec:exclude>.*_DH_anon_.*</sec:exclude>
			</sec:cipherSuitesFilter>

		</http:tlsClientParameters>
	</http:conduit>
 -->
</beans>


thanks

Roger

-----Original Message-----
From: Willem Jiang [mailto:ning.jiang@iona.com] 
Sent: 2007年9月21日 17:18
To: cxf-user@incubator.apache.org
Subject: Re: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Sorry, I forget to attach the url.
It is
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

Willem.


Willem Jiang wrote:
> Hi Roger,
>
> If you want to use the https transport by leveraging the Servlet 
> transport , you do not need to specify the httpj:engine-factory in 
> your bean.xml.
> httpj:engine-factory only take effect if you use the jetty as your 
> http transport engine.
>
> After I went through your bean.xml, I can't found any endpoint 
> specification there. You did not publish any endpoint yet, so you got 
> the error of
>
> "Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer"
>
> Please refer this [1] to publish a service without ssl transport first.
>
> Willem.
>
> Roger_Wang@Dell.com wrote:
>   
>> all:
>>
>> i want to publish CXF(2.01) webservice with WSS(user token) over SSL to weblogic 9.2. 
>> i got this error when a client to call the service. and i donot think weblogic has publish service succesfull,but there is not error happen according to the console:
>>
>> 2007-9-21 9:34:54 org.apache.cxf.transport.servlet.ServletController 
>> invoke
>> 警告: Can't find the the request for 
>> http://localhost:7001/LSPApp/services/HelloWorld's Observer
>>
>> -----------------cxfServer.xml--------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>   xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
>>   xmlns:jaxws="http://cxf.apache.org/jaxws"
>>   xsi:schemaLocation="
>>        http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
>>             http://cxf.apache.org/transports/http/configuration
>>             http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>             http://cxf.apache.org/transports/http-jetty/configuration
>>             http://cxf.apache.org/schemas/configuration/http-jetty.xsd
>>             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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" />
>> 	
>>   <http:destination name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService.HelloWorldImplPort"> 
>>   </http:destination>
>>
>>   <httpj:engine-factory bus="cxf">  
>>    <httpj:engine port="7002">   
>>     <httpj:tlsServerParameters>     
>>       <sec:keyManagers keyPassword="password">
>>            <sec:keyStore type="JKS" password="password" 
>>                 file="c:¥bea¥server¥mykeystore"/>
>>       </sec:keyManagers>
>>       <sec:trustManagers>
>>           <sec:keyStore type="JKS" password="password"
>>                file="c:¥bea¥server¥cacerts"/>
>>       </sec:trustManagers>
>>       <sec:cipherSuitesFilter>
>>         <sec:include>.*_EXPORT_.*</sec:include>
>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>       </sec:cipherSuitesFilter>
>>       
>>       <sec:clientAuthentication want="true" required="true"/>
>>       
>>     </httpj:tlsServerParameters>
>>    </httpj:engine>
>>   </httpj:engine-factory>
>>   
>>   <!-- We need a bean named "cxf" -->
>>
>> </beans>
>>
>> -------------sslclient.xml------------------
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>>   xsi:schemaLocation="
>>            http://cxf.apache.org/configuration/security
>>            http://cxf.apache.org/schemas/configuration/security.xsd
>>            http://cxf.apache.org/transports/http/configuration
>>            http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>            http://www.springframework.org/schema/beans
>>            
>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>
>>   <http:conduit name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldImplService.HttpConduit">
>>     <http:tlsClientParameters>
>>     
>>       <sec:trustManagers>
>>           <sec:keyStore type="JKS" password="password"
>>                file="c:¥bea¥server¥mykeystore"/>
>>       </sec:trustManagers>
>>       <sec:keyManagers keyPassword="password">
>>            <sec:keyStore type="JKS" password="password" 
>>                 file="c:¥bea¥server¥cacerts"/>
>>       </sec:keyManagers>
>>       <sec:cipherSuitesFilter>
>>         <sec:include>.*_EXPORT_.*</sec:include>
>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>       </sec:cipherSuitesFilter>
>>      
>>     </http:tlsClientParameters>
>>    </http:conduit>
>>   
>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>     </bean>
>>
>> </beans>
>>
>>
>> thanks for any help
>>
>> Roger
>>
>>   
>>     
>
>   

Re: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Posted by Willem Jiang <ni...@iona.com>.
Sorry, I forget to attach the url.
It is
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

Willem.


Willem Jiang wrote:
> Hi Roger,
>
> If you want to use the https transport by leveraging the Servlet
> transport , you do not need to specify the httpj:engine-factory in your
> bean.xml.
> httpj:engine-factory only take effect if you use the jetty as your http
> transport engine.
>
> After I went through your bean.xml, I can't found any endpoint
> specification there. You did not publish any endpoint yet, so you got
> the error of
>
> "Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer"
>
> Please refer this [1] to publish a service without ssl transport first.
>
> Willem.
>
> Roger_Wang@Dell.com wrote:
>   
>> all:
>>
>> i want to publish CXF(2.01) webservice with WSS(user token) over SSL to weblogic 9.2. 
>> i got this error when a client to call the service. and i donot think weblogic has publish service succesfull,but there is not error happen according to the console:
>>
>> 2007-9-21 9:34:54 org.apache.cxf.transport.servlet.ServletController invoke
>> 警告: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer
>>
>> -----------------cxfServer.xml--------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>   xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
>>   xmlns:jaxws="http://cxf.apache.org/jaxws"
>>   xsi:schemaLocation="
>>        http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
>>             http://cxf.apache.org/transports/http/configuration
>>             http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>             http://cxf.apache.org/transports/http-jetty/configuration
>>             http://cxf.apache.org/schemas/configuration/http-jetty.xsd
>>             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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" /> 
>> 	
>>   <http:destination name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService.HelloWorldImplPort"> 
>>   </http:destination>
>>
>>   <httpj:engine-factory bus="cxf">  
>>    <httpj:engine port="7002">   
>>     <httpj:tlsServerParameters>     
>>       <sec:keyManagers keyPassword="password">
>>            <sec:keyStore type="JKS" password="password" 
>>                 file="c:\bea\server\mykeystore"/>
>>       </sec:keyManagers>
>>       <sec:trustManagers>
>>           <sec:keyStore type="JKS" password="password"
>>                file="c:\bea\server\cacerts"/>
>>       </sec:trustManagers>
>>       <sec:cipherSuitesFilter>
>>         <sec:include>.*_EXPORT_.*</sec:include>
>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>       </sec:cipherSuitesFilter>
>>       
>>       <sec:clientAuthentication want="true" required="true"/>
>>       
>>     </httpj:tlsServerParameters>
>>    </httpj:engine>
>>   </httpj:engine-factory>
>>   
>>   <!-- We need a bean named "cxf" -->
>>
>> </beans>
>>
>> -------------sslclient.xml------------------
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:sec="http://cxf.apache.org/configuration/security"
>>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>>   xsi:schemaLocation="
>>            http://cxf.apache.org/configuration/security
>>            http://cxf.apache.org/schemas/configuration/security.xsd
>>            http://cxf.apache.org/transports/http/configuration
>>            http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>            http://www.springframework.org/schema/beans
>>            http://www.springframework.org/schema/beans/spring-beans.xsd">
>>
>>   <http:conduit name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldImplService.HttpConduit">
>>     <http:tlsClientParameters>
>>     
>>       <sec:trustManagers>
>>           <sec:keyStore type="JKS" password="password"
>>                file="c:\bea\server\mykeystore"/>
>>       </sec:trustManagers>
>>       <sec:keyManagers keyPassword="password">
>>            <sec:keyStore type="JKS" password="password" 
>>                 file="c:\bea\server\cacerts"/>
>>       </sec:keyManagers>
>>       <sec:cipherSuitesFilter>
>>         <sec:include>.*_EXPORT_.*</sec:include>
>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>       </sec:cipherSuitesFilter>
>>      
>>     </http:tlsClientParameters>
>>    </http:conduit>
>>   
>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>     </bean> 
>>
>> </beans>
>>
>>
>> thanks for any help
>>
>> Roger
>>
>>   
>>     
>
>   

Re: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Posted by Willem Jiang <ni...@iona.com>.
Hi Roger,

If you want to use the https transport by leveraging the Servlet
transport , you do not need to specify the httpj:engine-factory in your
bean.xml.
httpj:engine-factory only take effect if you use the jetty as your http
transport engine.

After I went through your bean.xml, I can't found any endpoint
specification there. You did not publish any endpoint yet, so you got
the error of

"Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer"

Please refer this [1] to publish a service without ssl transport first.

Willem.

Roger_Wang@Dell.com wrote:
> all:
>
> i want to publish CXF(2.01) webservice with WSS(user token) over SSL to weblogic 9.2. 
> i got this error when a client to call the service. and i donot think weblogic has publish service succesfull,but there is not error happen according to the console:
>
> 2007-9-21 9:34:54 org.apache.cxf.transport.servlet.ServletController invoke
> 警告: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer
>
> -----------------cxfServer.xml--------------------------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:sec="http://cxf.apache.org/configuration/security"
>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>   xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
>   xmlns:jaxws="http://cxf.apache.org/jaxws"
>   xsi:schemaLocation="
>        http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
>             http://cxf.apache.org/transports/http/configuration
>             http://cxf.apache.org/schemas/configuration/http-conf.xsd
>             http://cxf.apache.org/transports/http-jetty/configuration
>             http://cxf.apache.org/schemas/configuration/http-jetty.xsd
>             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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" /> 
> 	
>   <http:destination name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService.HelloWorldImplPort"> 
>   </http:destination>
>
>   <httpj:engine-factory bus="cxf">  
>    <httpj:engine port="7002">   
>     <httpj:tlsServerParameters>     
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password" 
>                 file="c:\bea\server\mykeystore"/>
>       </sec:keyManagers>
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                file="c:\bea\server\cacerts"/>
>       </sec:trustManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>       
>       <sec:clientAuthentication want="true" required="true"/>
>       
>     </httpj:tlsServerParameters>
>    </httpj:engine>
>   </httpj:engine-factory>
>   
>   <!-- We need a bean named "cxf" -->
>
> </beans>
>
> -------------sslclient.xml------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:sec="http://cxf.apache.org/configuration/security"
>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>   xsi:schemaLocation="
>            http://cxf.apache.org/configuration/security
>            http://cxf.apache.org/schemas/configuration/security.xsd
>            http://cxf.apache.org/transports/http/configuration
>            http://cxf.apache.org/schemas/configuration/http-conf.xsd
>            http://www.springframework.org/schema/beans
>            http://www.springframework.org/schema/beans/spring-beans.xsd">
>
>   <http:conduit name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldImplService.HttpConduit">
>     <http:tlsClientParameters>
>     
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                file="c:\bea\server\mykeystore"/>
>       </sec:trustManagers>
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password" 
>                 file="c:\bea\server\cacerts"/>
>       </sec:keyManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>      
>     </http:tlsClientParameters>
>    </http:conduit>
>   
>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>     </bean> 
>
> </beans>
>
>
> thanks for any help
>
> Roger
>
>   

Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

Posted by Ro...@Dell.com.
all:

i want to publish CXF(2.01) webservice with WSS(user token) over SSL to weblogic 9.2. 
i got this error when a client to call the service. and i donot think weblogic has publish service succesfull,but there is not error happen according to the console:

2007-9-21 9:34:54 org.apache.cxf.transport.servlet.ServletController invoke
警告: Can't find the the request for http://localhost:7001/LSPApp/services/HelloWorld's Observer

-----------------cxfServer.xml--------------------------
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
  xmlns:jaxws="http://cxf.apache.org/jaxws"
  xsi:schemaLocation="
       http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
            http://cxf.apache.org/transports/http/configuration
            http://cxf.apache.org/schemas/configuration/http-conf.xsd
            http://cxf.apache.org/transports/http-jetty/configuration
            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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" /> 
	
  <http:destination name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldService.HelloWorldImplPort"> 
  </http:destination>

  <httpj:engine-factory bus="cxf">  
   <httpj:engine port="7002">   
    <httpj:tlsServerParameters>     
      <sec:keyManagers keyPassword="password">
           <sec:keyStore type="JKS" password="password" 
                file="c:¥bea¥server¥mykeystore"/>
      </sec:keyManagers>
      <sec:trustManagers>
          <sec:keyStore type="JKS" password="password"
               file="c:¥bea¥server¥cacerts"/>
      </sec:trustManagers>
      <sec:cipherSuitesFilter>
        <sec:include>.*_EXPORT_.*</sec:include>
        <sec:include>.*_EXPORT1024_.*</sec:include>
        <sec:include>.*_WITH_DES_.*</sec:include>
        <sec:include>.*_WITH_NULL_.*</sec:include>
        <sec:exclude>.*_DH_anon_.*</sec:exclude>
      </sec:cipherSuitesFilter>
      
      <sec:clientAuthentication want="true" required="true"/>
      
    </httpj:tlsServerParameters>
   </httpj:engine>
  </httpj:engine-factory>
  
  <!-- We need a bean named "cxf" -->

</beans>

-------------sslclient.xml------------------

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xsi:schemaLocation="
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

  <http:conduit name="{http://interfaces.service.scan.dragonfx.dell.com/}HelloWorldImplService.HttpConduit">
    <http:tlsClientParameters>
    
      <sec:trustManagers>
          <sec:keyStore type="JKS" password="password"
               file="c:¥bea¥server¥mykeystore"/>
      </sec:trustManagers>
      <sec:keyManagers keyPassword="password">
           <sec:keyStore type="JKS" password="password" 
                file="c:¥bea¥server¥cacerts"/>
      </sec:keyManagers>
      <sec:cipherSuitesFilter>
        <sec:include>.*_EXPORT_.*</sec:include>
        <sec:include>.*_EXPORT1024_.*</sec:include>
        <sec:include>.*_WITH_DES_.*</sec:include>
        <sec:include>.*_WITH_NULL_.*</sec:include>
        <sec:exclude>.*_DH_anon_.*</sec:exclude>
      </sec:cipherSuitesFilter>
     
    </http:tlsClientParameters>
   </http:conduit>
  
    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
    </bean> 

</beans>


thanks for any help

Roger

AW: AW: AW: CXFServlet and the EndPoint API?

Posted by Andreas Bucksteeg <an...@hybris.de>.
Hi, 

I think that you can hack your way to get access to another servlet, but this was not what I hoped for. 
Isnt there a more elegant way to use the CXFServlet without using XML configuration. I just wanted to 
create a little example, how to use CXF with our own product, which should be small and clean. 
Therefore the example should not contain some "tricks" to get access to the CXF servlet. So I think, will use
The XML config way instead.

Thanks, 

Andreas

> -----Ursprüngliche Nachricht-----
> Von: Willem Jiang [mailto:ning.jiang@iona.com] 
> Gesendet: Freitag, 21. September 2007 12:03
> An: cxf-user@incubator.apache.org
> Betreff: Re: AW: AW: CXFServlet and the EndPoint API?
> 
> Hi ,
> 
> You can have a look at the CXFServlet code[1] to see how it 
> setup the default transport to servlet transport :) I 
> remember there is a way to get the servlet's reference from 
> other servlet , may be you need use google to find them.
> [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/tra
> nsports/http/src/main/java/org/apache/cxf/transport/servlet/CX
> FServlet.java
> 
> Willem.
> 
> Andreas Bucksteeg wrote:
> > Hi Willem,
> >
> > I know that I have to set the CXFServelt Bus, but I do not 
> see a way to get a reference of the CXFServlet in my test 
> JSP. I find some mails where the setting of the CXFServlet 
> bus was described, but I did not find any info, on how the 
> obtain this reference. 
> >
> > Is there maybe a way to set the default transport factory 
> to CXFServletTransportFactory ?
> >
> > Andreas
> >
> >   
> >> -----Ursprüngliche Nachricht-----
> >> Von: Willem Jiang [mailto:ning.jiang@iona.com]
> >> Gesendet: Freitag, 21. September 2007 05:20
> >> An: cxf-user@incubator.apache.org
> >> Betreff: Re: AW: CXFServlet and the EndPoint API?
> >>
> >> Hi Andreas,
> >>
> >>  From your stack trace , I think you did not use the right 
> bus when 
> >> you publish the endpoint.
> >> Because it uses the JettyHttpTransportFactory , not the 
> >> CXFServletTransportFactory Can you get the CXFServlet's reference 
> >> cxfServlet?
> >> If so , you can take a look at this blew codes, which just 
> uses the 
> >> cxfServlet already loaded bus.
> >>
> >> BusFactory.setThreadDefaultBus(cxfServlet.getBus());
> >> Endpoint.publish("/Greeter", new GreeterImpl()); 
> >> BusFactory.setThreadDefaultBus(null);
> >>
> >> Willem.
> >>
> >>
> >> Andreas Bucksteeg wrote:
> >>     
> >>> Hi,
> >>>
> >>> I have the same problem and I understand what the code
> >>>       
> >> should do, but
> >>     
> >>> I dont see, how I should get access to the CXFServlet 
> from my code.
> >>>
> >>> I am trying to setup my service using the CXFServlet 
> running in an 
> >>> Tomcat using the Endpoint API.
> >>>
> >>> http://cwiki.apache.org/CXF20DOC/servlet-transport.html
> >>>       
> >> describes to
> >>     
> >>> configure the servlet in the web.xml of the webapp and 
> then just to 
> >>> use
> >>>
> >>>   
> >>>       
> >>>> Endpoint.publish("/Greeter", new GreeterImpl());
> >>>>     
> >>>>         
> >>> I am not sure, where to put this code. For tests I used a
> >>>       
> >> jsp in the
> >>     
> >>> webapp I configured the CXFServlet and using the above line
> >>>       
> >> results in:
> >>     
> >>> java.net.MalformedURLException: no protocol: /HelloWorldService
> >>> 	java.net.URL.<init>(URL.java:567)
> >>> 	java.net.URL.<init>(URL.java:464)
> >>> 	java.net.URL.<init>(URL.java:413)
> >>> 	
> >>>
> >>>       
> >> 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(Jetty
> >> H
> >>     
> >>> TT
> >>> PDestination.java:86)
> >>> 	
> >>>
> >>>       
> >> 
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createD
> >> e
> >>     
> >>> st
> >>> ination(JettyHTTPTransportFactory.java:96)
> >>> 	
> >>>
> >>>       
> >> 
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDest
> >> i
> >>     
> >>> na
> >>> tion(JettyHTTPTransportFactory.java:83)
> >>> 	
> >>>
> >>>       
> >> 
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapT
> >> r
> >>     
> >>> an
> >>> sportFactory.java:74)
> >>>
> >>> How should I get the CXFServlet to set its bus as the default bus?
> >>>
> >>> I search the docs and the mailing list, some people had the same 
> >>> problem to get CXFServlet running without xml configuration
> >>>       
> >> in Tomcar,
> >>     
> >>> but I havent found a solution yet...
> >>>
> >>> Any ideas?
> >>>
> >>> Cheers,
> >>>
> >>> Andreas
> >>>
> >>>   
> >>>       
> >
> >   
> 

Re: AW: AW: CXFServlet and the EndPoint API?

Posted by Willem Jiang <ni...@iona.com>.
Hi ,

You can have a look at the CXFServlet code[1] to see how it setup the 
default transport to servlet transport :)
I remember there is a way to get the servlet's reference from other 
servlet , may be you need use google to find them.
[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java

Willem.

Andreas Bucksteeg wrote:
> Hi Willem, 
>
> I know that I have to set the CXFServelt Bus, but I do not see a way to get a reference of the CXFServlet in my test JSP. I find some mails where the setting of the CXFServlet bus was described, but I did not find any info, on how the obtain this reference. 
>
> Is there maybe a way to set the default transport factory to CXFServletTransportFactory ?
>
> Andreas
>
>   
>> -----Ursprüngliche Nachricht-----
>> Von: Willem Jiang [mailto:ning.jiang@iona.com] 
>> Gesendet: Freitag, 21. September 2007 05:20
>> An: cxf-user@incubator.apache.org
>> Betreff: Re: AW: CXFServlet and the EndPoint API?
>>
>> Hi Andreas,
>>
>>  From your stack trace , I think you did not use the right 
>> bus when you publish the endpoint.
>> Because it uses the JettyHttpTransportFactory , not the 
>> CXFServletTransportFactory Can you get the CXFServlet's 
>> reference cxfServlet?
>> If so , you can take a look at this blew codes, which just 
>> uses the cxfServlet already loaded bus.
>>
>> BusFactory.setThreadDefaultBus(cxfServlet.getBus());
>> Endpoint.publish("/Greeter", new GreeterImpl()); 
>> BusFactory.setThreadDefaultBus(null);
>>
>> Willem.
>>
>>
>> Andreas Bucksteeg wrote:
>>     
>>> Hi,
>>>
>>> I have the same problem and I understand what the code 
>>>       
>> should do, but 
>>     
>>> I dont see, how I should get access to the CXFServlet from my code.
>>>
>>> I am trying to setup my service using the CXFServlet running in an 
>>> Tomcat using the Endpoint API.
>>>
>>> http://cwiki.apache.org/CXF20DOC/servlet-transport.html 
>>>       
>> describes to 
>>     
>>> configure the servlet in the web.xml of the webapp and then just to 
>>> use
>>>
>>>   
>>>       
>>>> Endpoint.publish("/Greeter", new GreeterImpl());
>>>>     
>>>>         
>>> I am not sure, where to put this code. For tests I used a 
>>>       
>> jsp in the 
>>     
>>> webapp I configured the CXFServlet and using the above line 
>>>       
>> results in:
>>     
>>> java.net.MalformedURLException: no protocol: /HelloWorldService
>>> 	java.net.URL.<init>(URL.java:567)
>>> 	java.net.URL.<init>(URL.java:464)
>>> 	java.net.URL.<init>(URL.java:413)
>>> 	
>>>
>>>       
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyH
>>     
>>> TT
>>> PDestination.java:86)
>>> 	
>>>
>>>       
>> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDe
>>     
>>> st
>>> ination(JettyHTTPTransportFactory.java:96)
>>> 	
>>>
>>>       
>> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDesti
>>     
>>> na
>>> tion(JettyHTTPTransportFactory.java:83)
>>> 	
>>>
>>>       
>> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTr
>>     
>>> an
>>> sportFactory.java:74)
>>>
>>> How should I get the CXFServlet to set its bus as the default bus?
>>>
>>> I search the docs and the mailing list, some people had the same 
>>> problem to get CXFServlet running without xml configuration 
>>>       
>> in Tomcar, 
>>     
>>> but I havent found a solution yet...
>>>
>>> Any ideas?
>>>
>>> Cheers,
>>>
>>> Andreas
>>>
>>>   
>>>       
>
>   

AW: AW: CXFServlet and the EndPoint API?

Posted by Andreas Bucksteeg <an...@hybris.de>.
Hi Willem, 

I know that I have to set the CXFServelt Bus, but I do not see a way to get a reference of the CXFServlet in my test JSP. I find some mails where the setting of the CXFServlet bus was described, but I did not find any info, on how the obtain this reference. 

Is there maybe a way to set the default transport factory to CXFServletTransportFactory ?

Andreas

> -----Ursprüngliche Nachricht-----
> Von: Willem Jiang [mailto:ning.jiang@iona.com] 
> Gesendet: Freitag, 21. September 2007 05:20
> An: cxf-user@incubator.apache.org
> Betreff: Re: AW: CXFServlet and the EndPoint API?
> 
> Hi Andreas,
> 
>  From your stack trace , I think you did not use the right 
> bus when you publish the endpoint.
> Because it uses the JettyHttpTransportFactory , not the 
> CXFServletTransportFactory Can you get the CXFServlet's 
> reference cxfServlet?
> If so , you can take a look at this blew codes, which just 
> uses the cxfServlet already loaded bus.
> 
> BusFactory.setThreadDefaultBus(cxfServlet.getBus());
> Endpoint.publish("/Greeter", new GreeterImpl()); 
> BusFactory.setThreadDefaultBus(null);
> 
> Willem.
> 
> 
> Andreas Bucksteeg wrote:
> > Hi,
> >
> > I have the same problem and I understand what the code 
> should do, but 
> > I dont see, how I should get access to the CXFServlet from my code.
> >
> > I am trying to setup my service using the CXFServlet running in an 
> > Tomcat using the Endpoint API.
> >
> > http://cwiki.apache.org/CXF20DOC/servlet-transport.html 
> describes to 
> > configure the servlet in the web.xml of the webapp and then just to 
> > use
> >
> >   
> >> Endpoint.publish("/Greeter", new GreeterImpl());
> >>     
> >
> > I am not sure, where to put this code. For tests I used a 
> jsp in the 
> > webapp I configured the CXFServlet and using the above line 
> results in:
> >
> > java.net.MalformedURLException: no protocol: /HelloWorldService
> > 	java.net.URL.<init>(URL.java:567)
> > 	java.net.URL.<init>(URL.java:464)
> > 	java.net.URL.<init>(URL.java:413)
> > 	
> > 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyH
> > TT
> > PDestination.java:86)
> > 	
> > 
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDe
> > st
> > ination(JettyHTTPTransportFactory.java:96)
> > 	
> > 
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDesti
> > na
> > tion(JettyHTTPTransportFactory.java:83)
> > 	
> > 
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTr
> > an
> > sportFactory.java:74)
> >
> > How should I get the CXFServlet to set its bus as the default bus?
> >
> > I search the docs and the mailing list, some people had the same 
> > problem to get CXFServlet running without xml configuration 
> in Tomcar, 
> > but I havent found a solution yet...
> >
> > Any ideas?
> >
> > Cheers,
> >
> > Andreas
> >
> >   
> 

Re: AW: CXFServlet and the EndPoint API?

Posted by Willem Jiang <ni...@iona.com>.
Hi Andreas,

 From your stack trace , I think you did not use the right bus when you 
publish the endpoint.
Because it uses the JettyHttpTransportFactory , not the 
CXFServletTransportFactory
Can you get the CXFServlet's reference cxfServlet?
If so , you can take a look at this blew codes, which just uses the 
cxfServlet already loaded bus.

BusFactory.setThreadDefaultBus(cxfServlet.getBus());
Endpoint.publish("/Greeter", new GreeterImpl());
BusFactory.setThreadDefaultBus(null);

Willem.


Andreas Bucksteeg wrote:
> Hi, 
>
> I have the same problem and I understand what the code should do, but I
> dont see, how I should get access to the CXFServlet from my code. 
>
> I am trying to setup my service using the CXFServlet running in an
> Tomcat using the Endpoint API. 
>
> http://cwiki.apache.org/CXF20DOC/servlet-transport.html describes to
> configure the servlet in the web.xml of the webapp and then just to use 
>
>   
>> Endpoint.publish("/Greeter", new GreeterImpl());
>>     
>
> I am not sure, where to put this code. For tests I used a jsp in the
> webapp I configured the CXFServlet and using the above line results in: 
>
> java.net.MalformedURLException: no protocol: /HelloWorldService
> 	java.net.URL.<init>(URL.java:567)
> 	java.net.URL.<init>(URL.java:464)
> 	java.net.URL.<init>(URL.java:413)
> 	
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTT
> PDestination.java:86)
> 	
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDest
> ination(JettyHTTPTransportFactory.java:96)
> 	
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestina
> tion(JettyHTTPTransportFactory.java:83)
> 	
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTran
> sportFactory.java:74)
>
> How should I get the CXFServlet to set its bus as the default bus?
>
> I search the docs and the mailing list, some people had the same problem
> to get CXFServlet running without xml configuration in Tomcar, but I
> havent found a solution yet... 
>
> Any ideas?
>
> Cheers,
>
> Andreas
>
>   

AW: CXFServlet and the EndPoint API?

Posted by Andreas Bucksteeg <an...@hybris.de>.
Hi, 

I have the same problem and I understand what the code should do, but I
dont see, how I should get access to the CXFServlet from my code. 

I am trying to setup my service using the CXFServlet running in an
Tomcat using the Endpoint API. 

http://cwiki.apache.org/CXF20DOC/servlet-transport.html describes to
configure the servlet in the web.xml of the webapp and then just to use 

>Endpoint.publish("/Greeter", new GreeterImpl());

I am not sure, where to put this code. For tests I used a jsp in the
webapp I configured the CXFServlet and using the above line results in: 

java.net.MalformedURLException: no protocol: /HelloWorldService
	java.net.URL.<init>(URL.java:567)
	java.net.URL.<init>(URL.java:464)
	java.net.URL.<init>(URL.java:413)
	
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTT
PDestination.java:86)
	
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDest
ination(JettyHTTPTransportFactory.java:96)
	
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestina
tion(JettyHTTPTransportFactory.java:83)
	
org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTran
sportFactory.java:74)

How should I get the CXFServlet to set its bus as the default bus?

I search the docs and the mailing list, some people had the same problem
to get CXFServlet running without xml configuration in Tomcar, but I
havent found a solution yet... 

Any ideas?

Cheers,

Andreas