Weblogic 10.3

View: New views
13 Messages — Rating Filter:   Alert me  

Weblogic 10.3

by 刘涛-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by Freeman Fang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf maillinglist讨论过
这里有一篇blog[1], 你看一下

Freeman
On 2009-8-25, at 上午11:04, panda逍遥 wrote:

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?




-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by 刘涛-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks 

2009/8/25 Freeman Fang <freeman.fang@...>
Hi,
这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf maillinglist讨论过
这里有一篇blog[1], 你看一下

Freeman
On 2009-8-25, at 上午11:04, panda逍遥 wrote:

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?




-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com







--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by 刘涛-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

刚才的问题解决了,The signature or decryption was invalid (Cannot setup signature data structure),运行时又抛出这个异常数字签名没有通过,但是Tomcat里是可以的啊!请教  如何解决 ? 谢谢!

2009/8/25 Freeman Fang <freeman.fang@...>
Hi,
这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf maillinglist讨论过
这里有一篇blog[1], 你看一下

Freeman
On 2009-8-25, at 上午11:04, panda逍遥 wrote:

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?




-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com







--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by Freeman Fang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

在我看来,产生这个问题是因为你weblogic 环境中的两个lib wss4j和xmlsec太老的缘故
你要升级到最新的version, wss4j1.5.8和xmlsec 1.4.2

Freeman
On 2009-8-25, at 下午12:56, 刘涛 wrote:

刚才的问题解决了,The signature or decryption was invalid (Cannot setup signature data structure),运行时又抛出这个异常数字签名没有通过,但是Tomcat里是可以的啊!请教  如何解决 ? 谢谢!

2009/8/25 Freeman Fang <freeman.fang@...>
Hi,
这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf maillinglist讨论过
这里有一篇blog[1], 你看一下

Freeman
On 2009-8-25, at 上午11:04, panda逍遥 wrote:

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?




-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com











-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by 刘涛-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

看了一下,项目中的JAR包已经是最新的了。

2009/8/25 Freeman Fang <freeman.fang@...>
在我看来,产生这个问题是因为你weblogic 环境中的两个lib wss4j和xmlsec太老的缘故
你要升级到最新的version, wss4j1.5.8和xmlsec 1.4.2

Freeman

On 2009-8-25, at 下午12:56, 刘涛 wrote:

刚才的问题解决了,The signature or decryption was invalid (Cannot setup signature data structure),运行时又抛出这个异常数字签名没有通过,但是Tomcat里是可以的啊!请教  如何解决 ? 谢谢!

2009/8/25 Freeman Fang <freeman.fang@...>
Hi,
这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf maillinglist讨论过
这里有一篇blog[1], 你看一下

Freeman
On 2009-8-25, at 上午11:04, panda逍遥 wrote:

在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现“This class does not
support SAAJ 1.1”这样的问题请问如何进行修改呢?




-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com











-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com







--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by willem.jiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

你可以参考一下CXF的user guide 来解决jar的冲突问题
http://cxf.apache.org/docs/appserverguide.html#AppServerGuide-WebLogic

姜宁 (Willem)
------------------
Apache CXF, Apache Camel committer
http://willemjiang.blogspot.com/
http://www.fusesource.com

On 8月25日, 下午5时01分, 刘涛 <system...@...> wrote:

> 看了一下,项目中的JAR包已经是最新的了。
>
> 2009/8/25 Freeman Fang <freeman.f...@...>
>
> > 在我看来,产生这个问题是因为你weblogic 环境中的两个lib wss4j和xmlsec太老的缘故你要升级到最新的version,
> > wss4j1.5.8和xmlsec 1.4.2
>
> > Freeman
>
> > On 2009-8-25, at 下午12:56, 刘涛 wrote:
>
> > 刚才的问题解决了,The signature or decryption was invalid (Cannot setup signature
> > data structure),运行时又抛出这个异常数字签名没有通过,但是Tomcat里是可以的啊!请教  如何解决 ? 谢谢!
>
> > 2009/8/25 Freeman Fang <freeman.f...@...>
>
> >> Hi,这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf
> >> maillinglist讨论过
> >> 这里有一篇blog[1], 你看一下
> >> [1]
> >>http://blog.xebia.com/2009/07/14/jax-ws-cxf-and-saaj-on-oracle-weblog...
>
> >> Freeman
> >> On 2009-8-25, at 上午11:04, panda逍遥 wrote:
>
> >> 在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现"This class does not
> >> support SAAJ 1.1"这样的问题请问如何进行修改呢?
>
> >> --
> >> Freeman Fang
> >> Apache Servicemix Commiter/PMC membeer
> >> Apache Cxf Commiter/PMC member
> >> Apache Felix Commiter
>
> >> ------------------------
> >> Open Source SOA:http://fusesource.com
>
> > --
> > Freeman Fang
> > Apache Servicemix Commiter/PMC membeer
> > Apache Cxf Commiter/PMC member
> > Apache Felix Commiter
>
> > ------------------------
> > Open Source SOA:http://fusesource.com
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: Weblogic 10.3

by 刘涛-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

org.apache.ws.security.WSSecurityException: The signature or decryption was invalid (Cannot setup signature data structure); nested exception is: 
org.apache.xml.security.exceptions.XMLSecurityException: Cannot create a http://www.w3.org/2000/09/xmldsig#:Signature from a http://www.w3.org/2000/09/xmldsig#:Signature element
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:199)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:97)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:326)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:243)
at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:198)
at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:77)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104)
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:452)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:196)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:220)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFServlet.java:211)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.apache.xml.security.exceptions.XMLSecurityException: Cannot create a http://www.w3.org/2000/09/xmldsig#:Signature from a http://www.w3.org/2000/09/xmldsig#:Signature element
at org.apache.xml.security.utils.ElementCheckerImpl$InternedNsChecker.guaranteeThatElementInCorrectSpace(Unknown Source)
at org.apache.xml.security.utils.ElementProxy.guaranteeThatElementInCorrectSpace(Unknown Source)
at org.apache.xml.security.utils.ElementProxy.<init>(Unknown Source)
at org.apache.xml.security.utils.SignatureElementProxy.<init>(Unknown Source)
at org.apache.xml.security.signature.XMLSignature.<init>(Unknown Source)
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:197)
... 26 more
麻烦您了,这是我的项目在Weblogic中出现的异常,这些问题都是加了安全验证之后出现的问题。谢谢!

2009/8/25 willem <willem.jiang@...>
你可以参考一下CXF的user guide 来解决jar的冲突问题
http://cxf.apache.org/docs/appserverguide.html#AppServerGuide-WebLogic

姜宁 (Willem)
------------------
Apache CXF, Apache Camel committer
http://willemjiang.blogspot.com/
http://www.fusesource.com

On 8月25日, 下午5时01分, 刘涛 <system...@...> wrote:
> 看了一下,项目中的JAR包已经是最新的了。
>
> 2009/8/25 Freeman Fang <freeman.f...@...>
>
> > 在我看来,产生这个问题是因为你weblogic 环境中的两个lib wss4j和xmlsec太老的缘故你要升级到最新的version,
> > wss4j1.5.8和xmlsec 1.4.2
>
> > Freeman
>
> > On 2009-8-25, at 下午12:56, 刘涛 wrote:
>
> > 刚才的问题解决了,The signature or decryption was invalid (Cannot setup signature
> > data structure),运行时又抛出这个异常数字签名没有通过,但是Tomcat里是可以的啊!请教  如何解决 ? 谢谢!
>
> > 2009/8/25 Freeman Fang <freeman.f...@...>
>
> >> Hi,这是因为Weblogic 10.3用的saaj的版本太老了,cxf要用saaj 1.3, 这个问题以前在cxf
> >> maillinglist讨论过
> >> 这里有一篇blog[1], 你看一下
> >> [1]
> >>http://blog.xebia.com/2009/07/14/jax-ws-cxf-and-saaj-on-oracle-weblog...
>
> >> Freeman
> >> On 2009-8-25, at 上午11:04, panda逍遥 wrote:
>
> >> 在Tomcat中部署CXF加数字签名能够正常的运行,部署到Weblogic 10.3上出现"This class does not
> >> support SAAJ 1.1"这样的问题请问如何进行修改呢?
>
> >> --
> >> Freeman Fang
> >> Apache Servicemix Commiter/PMC membeer
> >> Apache Cxf Commiter/PMC member
> >> Apache Felix Commiter
>
> >> ------------------------
> >> Open Source SOA:http://fusesource.com
>
> > --
> > Freeman Fang
> > Apache Servicemix Commiter/PMC membeer
> > Apache Cxf Commiter/PMC member
> > Apache Felix Commiter
>
> > ------------------------
> > Open Source SOA:http://fusesource.com



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

by wangsheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

参照网页http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html介绍的内容使用xml配置的方式设置客户端访问的ReceiveTimeout等参数,但总是不奏效。 
不知道是什么原因,难道是文档有错。
但使用编程的方式是可以的。示例如下:

ClassPathXmlApplicationContext context

            = new ClassPathXmlApplicationContext(new String[] {"demo/spring/client/client-beans.xml"});

 

        HelloWorld client = (HelloWorld)context.getBean("client");

        org.apache.cxf.endpoint.Client cxfClient = ClientProxy.getClient(client);

        HTTPConduit http = (HTTPConduit) cxfClient.getConduit();

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

 

        httpClientPolicy.setConnectionTimeout(36000);

        httpClientPolicy.setAllowChunking(false);

        httpClientPolicy.setReceiveTimeout(4000);

 

        http.setClient(httpClientPolicy);

 

        String response = client.sayHi("Joe");
 
 
哪位朋友能解释一下如何用配置的方法设置这些参数。谢谢。
 

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

by willem.jiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

不知道你使用的XML配置文件是什么样的?
还有你用的CXF版本是什么。
文档应该是正确的, 关键看你配置的 port 那么是否正确。

姜宁 (Willem)
------------------
Apache CXF, Apache Camel committer
http://willemjiang.blogspot.com/
http://www.fusesource.com

On 9月1日, 下午4时54分, "wangsheng" <luckysh...@...> wrote:

> 参照网页
> <http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
>
> http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
> 介绍的内容使用xml配置的方式设置客户端访问的ReceiveTimeout等参数,但总是不奏
> 效。
> 不知道是什么原因,难道是文档有错。
> 但使用编程的方式是可以的。示例如下:
> ClassPathXmlApplicationContext context
>
>             = new ClassPathXmlApplicationContext(new String[]
> {"demo/spring/client/client-beans.xml"});
>
>         HelloWorld client = (HelloWorld)context.getBean("client");
>
>         org.apache.cxf.endpoint.Client cxfClient =
> ClientProxy.getClient(client);
>
>         HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
>
>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>
>         httpClientPolicy.setConnectionTimeout(36000);
>
>         httpClientPolicy.setAllowChunking(false);
>
>         httpClientPolicy.setReceiveTimeout(4000);
>
>         http.setClient(httpClientPolicy);
>
>         String response = client.sayHi("Joe");
>
> 哪位朋友能解释一下如何用配置的方法设置这些参数。谢谢。
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

by wangsheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
配置文件主要内容是:
 
“<http-conf:conduit id="myconduit" name="*.http-conduit">
  <http-conf:client ConnectionTimeout="100000"
   ReceiveTimeout="1000" />
 </http-conf:conduit>
 
 <bean id="client" class="demo.spring.HelloWorld"
  factory-bean="clientFactory" factory-method="create" />
 <bean id="clientFactory"
  class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
  <property name="serviceClass" value="demo.spring.HelloWorld" />
  <property name="address"
   value="http://localhost:8088/cxfdemo/services/demoInfo" />
  <property name="inInterceptors">
   <list>
    <ref bean="TimestampSignEncrypt_Response" />
   </list>
  </property>
  <property name="outInterceptors">
   <list>
    <ref bean="GZIPStream"/>
    <ref bean="TimestampSignEncrypt_Request" />
   </list>
  </property>
 </bean>”
 <cxf:bus>
        <cxf:features>
            <p:policies/>
        </cxf:features>
    </cxf:bus>
 
CXF版本是2.1.3.
谢谢。
 

> Date: Tue, 1 Sep 2009 02:44:36 -0700
> Subject: [cxf-zh] Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?
> From: willem.jiang@...
> To: cxf-zh@...
>
> 不知道你使用的XML配置文件是什么样的?
> 还有你用的CXF版本是什么。
> 文档应该是正确的, 关键看你配置的 port 那么是否正确。
>
> 姜宁 (Willem)
> ------------------
> Apache CXF, Apache Camel committer
> http://willemjiang.blogspot.com/
> http://www.fusesource.com
>
> On 9月1日, 下午4时54分, "wangsheng" <luckysh...@...> wrote:
> > 参照网页
> > <http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
> >
> > http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
> > 介绍的内容使用xml配置的方式设置客户端访问的ReceiveTimeout等参数,但总是不奏
> > 效。
> > 不知道是什么原因,难道是文档有错。
> > 但使用编程的方式是可以的。示例如下:
> > ClassPathXmlApplicationContext context
> >
> > = new ClassPathXmlApplicationContext(new String[]
> > {"demo/spring/client/client-beans.xml"});
> >
> > HelloWorld client = (HelloWorld)context.getBean("client");
> >
> > org.apache.cxf.endpoint.Client cxfClient =
> > ClientProxy.getClient(client);
> >
> > HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
> >
> > HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> >
> > httpClientPolicy.setConnectionTimeout(36000);
> >
> > httpClientPolicy.setAllowChunking(false);
> >
> > httpClientPolicy.setReceiveTimeout(4000);
> >
> > http.setClient(httpClientPolicy);
> >
> > String response = client.sayHi("Joe");
> >
> > 哪位朋友能解释一下如何用配置的方法设置这些参数。谢谢。
> --~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


答复: Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

by wangsheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


CXF版本是2.1.3
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"
        xmlns:cxf="http://cxf.apache.org/core"
       
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
        xmlns:p="http://cxf.apache.org/policy"
        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
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd">

        <http-conf:conduit id="myconduit" name="*.http-conduit">
                <http-conf:client ConnectionTimeout="100000"
                        ReceiveTimeout="1000" />
        </http-conf:conduit>
       
        <bean id="client" class="demo.spring.HelloWorld"
                factory-bean="clientFactory" factory-method="create" />

        <bean id="clientFactory"
                class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
                <property name="serviceClass" value="demo.spring.HelloWorld"
/>
                <property name="address"
       
value="http://localhost:8088/cxfdemo/services/demoInfo" />
                <property name="inInterceptors">
                        <list>
                                <ref bean="TimestampSignEncrypt_Response" />
                        </list>
                </property>
                <property name="outInterceptors">
                        <list>
                                <ref bean="GZIPStream"/>
                                <ref bean="TimestampSignEncrypt_Request" />
                        </list>
                </property>
        </bean>
        <!--
                This bean is an Out interceptor which will add a timestamp,
                sign the timestamp and body, and then encrypt the timestamp
                and body.  It uses 3DES as the symmetric key algorithm.
        -->
        <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
                id="TimestampSignEncrypt_Request">
                <constructor-arg>
                        <map>
                            <!-- note: "Encrypt" being removed from "action"
-->
                                <entry key="action" value="Timestamp
Signature" />
                                <entry key="user" value="alice" />
                                <entry key="signaturePropFile"
       
value="demo/spring/client/clientKeystore.properties" />
                                <entry key="encryptionPropFile"
       
value="demo/spring/client/clientKeystore.properties" />
                                <entry key="encryptionUser" value="bob" />
                                <entry key="signatureKeyIdentifier"
                                        value="DirectReference" />
                                <entry key="passwordCallbackClass"
       
value="demo.spring.client.ClientKeystorePasswordCallback" />
                                <entry key="signatureParts"
       
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wss
ecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/
envelope/}Body" />
                                <entry key="encryptionParts"
       
value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http
://schemas.xmlsoap.org/soap/envelope/}Body" />
                                <entry key="encryptionSymAlgorithm"
       
value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
                        </map>
                </constructor-arg>
        </bean>

        <!--    
                This bean is an In interceptor which will validate a signed,

                encrypted response, and timestamp it.    
        -->
        <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"
                id="TimestampSignEncrypt_Response">
                <constructor-arg>
                        <map>
                                <entry key="action" value="Timestamp
Signature Encrypt" />
                                <entry key="signaturePropFile"
       
value="demo/spring/client/clientKeystore.properties" />
                                <entry key="decryptionPropFile"
       
value="demo/spring/client/clientKeystore.properties" />
                                <entry key="passwordCallbackClass"
       
value="demo.spring.client.ClientKeystorePasswordCallback" />
                        </map>
                </constructor-arg>
        </bean>

        <bean id="GZIPStream"
class="demo.spring.interceptor.StreamInterceptor"/>
        <cxf:bus>
        <cxf:features>
            <p:policies/>
        </cxf:features>
    </cxf:bus>
</beans>
<!-- END SNIPPET: beans -->”

帮忙看一下,非常感谢。

-----邮件原件-----
发件人: cxf-zh@... [mailto:cxf-zh@...] 代表 willem
发送时间: 2009年9月1日 17:45
收件人: cxf-zh
主题: [cxf-zh] Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

不知道你使用的XML配置文件是什么样的?
还有你用的CXF版本是什么。
文档应该是正确的, 关键看你配置的 port 那么是否正确。

姜宁 (Willem)
------------------
Apache CXF, Apache Camel committer
http://willemjiang.blogspot.com/
http://www.fusesource.com

On 9月1日, 下午4时54分, "wangsheng" <luckysh...@...> wrote:
> 参照网页
> <http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
>
> http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
> 介绍的内容使用xml配置的方式设置客户端访问的ReceiveTimeout等参数,但总是不

> 效。
> 不知道是什么原因,难道是文档有错。
> 但使用编程的方式是可以的。示例如下:
> ClassPathXmlApplicationContext context
>
>             = new ClassPathXmlApplicationContext(new String[]
> {"demo/spring/client/client-beans.xml"});
>
>         HelloWorld client = (HelloWorld)context.getBean("client");
>
>         org.apache.cxf.endpoint.Client cxfClient =
> ClientProxy.getClient(client);
>
>         HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
>
>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>
>         httpClientPolicy.setConnectionTimeout(36000);
>
>         httpClientPolicy.setAllowChunking(false);
>
>         httpClientPolicy.setReceiveTimeout(4000);
>
>         http.setClient(httpClientPolicy);
>
>         String response = client.sayHi("Joe");
>
> 哪位朋友能解释一下如何用配置的方法设置这些参数。谢谢。



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---


Re: 答复: Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?

by willem.jiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


建议你用CXF 2.1.6 试一下。
2.1.3 应该是去年发布的版本,我不太确定这个版本是不是修复了有关Spring配置加载的问题。
如果你不能升级CXF,你可以把有关http conduit配置的内容放到 cxf.xml ,  
并把这个文件发到相关的class path中试一下。

姜宁 (Willem)
------------------
Apache CXF, Apache Camel committer
http://willemjiang.blogspot.com/
http://www.fusesource.com

On 9月8日, 下午2时26分, "wangsheng" <luckysh...@...> wrote:

> CXF版本是2.1.3
> 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"
>         xmlns:cxf="http://cxf.apache.org/core"
>
> xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
>         xmlns:p="http://cxf.apache.org/policy"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsdhttp://cxf.apache.org/jaxwshttp://cxf.apache.org/schema/jaxws.xsdhttp://cxf.apache.org/transports/http/configurationhttp://cxf.apache.org/schemas/configuration/http-conf.xsdhttp://cxf.apache.org/corehttp://cxf.apache.org/schemas/core.xsdhttp://cxf.apache.org/policyhttp://cxf.apache.org/schemas/policy.xsd">
>
>         <http-conf:conduit id="myconduit" name="*.http-conduit">
>                 <http-conf:client ConnectionTimeout="100000"
>                         ReceiveTimeout="1000" />
>         </http-conf:conduit>
>
>         <bean id="client" class="demo.spring.HelloWorld"
>                 factory-bean="clientFactory" factory-method="create" />
>
>         <bean id="clientFactory"
>                 class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>                 <property name="serviceClass" value="demo.spring.HelloWorld"
> />
>                 <property name="address"
>
> value="http://localhost:8088/cxfdemo/services/demoInfo" />
>                 <property name="inInterceptors">
>                         <list>
>                                 <ref bean="TimestampSignEncrypt_Response" />
>                         </list>
>                 </property>
>                 <property name="outInterceptors">
>                         <list>
>                                 <ref bean="GZIPStream"/>
>                                 <ref bean="TimestampSignEncrypt_Request" />
>                         </list>
>                 </property>
>         </bean>
>         <!--
>                 This bean is an Out interceptor which will add a timestamp,
>                 sign the timestamp and body, and then encrypt the timestamp
>                 and body.  It uses 3DES as the symmetric key algorithm.
>         -->
>         <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
>                 id="TimestampSignEncrypt_Request">
>                 <constructor-arg>
>                         <map>
>                             <!-- note: "Encrypt" being removed from "action"
> -->
>                                 <entry key="action" value="Timestamp
> Signature" />
>                                 <entry key="user" value="alice" />
>                                 <entry key="signaturePropFile"
>
> value="demo/spring/client/clientKeystore.properties" />
>                                 <entry key="encryptionPropFile"
>
> value="demo/spring/client/clientKeystore.properties" />
>                                 <entry key="encryptionUser" value="bob" />
>                                 <entry key="signatureKeyIdentifier"
>                                         value="DirectReference" />
>                                 <entry key="passwordCallbackClass"
>
> value="demo.spring.client.ClientKeystorePasswordCallback" />
>                                 <entry key="signatureParts"
>
> value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wss
> ecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/
> envelope/}Body" />
>                                 <entry key="encryptionParts"
>
> value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http
> ://schemas.xmlsoap.org/soap/envelope/}Body" />
>                                 <entry key="encryptionSymAlgorithm"
>
> value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
>                         </map>
>                 </constructor-arg>
>         </bean>
>
>         <!--        
>                 This bean is an In interceptor which will validate a signed,
>
>                 encrypted response, and timestamp it.    
>         -->
>         <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"
>                 id="TimestampSignEncrypt_Response">
>                 <constructor-arg>
>                         <map>
>                                 <entry key="action" value="Timestamp
> Signature Encrypt" />
>                                 <entry key="signaturePropFile"
>
> value="demo/spring/client/clientKeystore.properties" />
>                                 <entry key="decryptionPropFile"
>
> value="demo/spring/client/clientKeystore.properties" />
>                                 <entry key="passwordCallbackClass"
>
> value="demo.spring.client.ClientKeystorePasswordCallback" />
>                         </map>
>                 </constructor-arg>
>         </bean>
>
>         <bean id="GZIPStream"
> class="demo.spring.interceptor.StreamInterceptor"/>
>         <cxf:bus>
>         <cxf:features>
>             <p:policies/>
>         </cxf:features>
>     </cxf:bus>
> </beans>
> <!-- END SNIPPET: beans -->"
>
> 帮忙看一下,非常感谢。
>
> -----邮件原件-----
> 发件人: cxf-zh@... [mailto:cxf-zh@...] 代表 willem
> 发送时间: 2009年9月1日 17:45
> 收件人: cxf-zh
> 主题: [cxf-zh] Re: 如何在cxf实现的客户端代码中设置ReceiveTimeout等参数?
>
> 不知道你使用的XML配置文件是什么样的?
> 还有你用的CXF版本是什么。
> 文档应该是正确的, 关键看你配置的 port 那么是否正确。
>
> 姜宁 (Willem)
> ------------------
> Apache CXF, Apache Camel committerhttp://willemjiang.blogspot.com/http://www.fusesource.com
>
> On 9月1日, 下午4时54分, "wangsheng" <luckysh...@...> wrote:
>
>
>
> > 参照网页
> > <http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
>
> >http://cxf.apache.org/docs/client-http-transport-including-ssl-suppor...
> > 介绍的内容使用xml配置的方式设置客户端访问的ReceiveTimeout等参数,但总是不
> 奏
> > 效。
> > 不知道是什么原因,难道是文档有错。
> > 但使用编程的方式是可以的。示例如下:
> > ClassPathXmlApplicationContext context
>
> >             = new ClassPathXmlApplicationContext(new String[]
> > {"demo/spring/client/client-beans.xml"});
>
> >         HelloWorld client = (HelloWorld)context.getBean("client");
>
> >         org.apache.cxf.endpoint.Client cxfClient =
> > ClientProxy.getClient(client);
>
> >         HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
>
> >         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>
> >         httpClientPolicy.setConnectionTimeout(36000);
>
> >         httpClientPolicy.setAllowChunking(false);
>
> >         httpClientPolicy.setReceiveTimeout(4000);
>
> >         http.setClient(httpClientPolicy);
>
> >         String response = client.sayHi("Joe");
>
> > 哪位朋友能解释一下如何用配置的方法设置这些参数。谢谢。
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
 要在此论坛发帖,请发电子邮件到 cxf-zh@...
 要退订此论坛,请发邮件至 cxf-zh-unsubscribe@...
 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
-~----------~----~----~----~------~----~------~--~---