难道用了cxf后还要加载axis的jar,而且加了
Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl
后,直接run代码是可以调用webservice,但如果部署到一个web应用(应用服务器为weblogic9.2),用jsp来调用也是失败,报
出如下异常:
信息: Interceptor has thrown exception, unwinding now
org.w3c.dom.DOMException: No such Localname for SOAP URI
at
org.apache.axis.message.SOAPDocumentImpl.createElementNS(SOAPDocumentImpl.java:
379)
at org.apache.axis.SOAPPart.createElementNS(SOAPPart.java:1109)
at
org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMStreamWriter.java:
103)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:
95)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:
76)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:
57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:
207)
花了几个小时找原因,,没找到,,郁闷.
我觉得你有可能要把CXF lib中的两个SAAJ jar文件放到weblogic的endorse目录里面才能解决。
姜宁 (Willem)
------------------
http://willem.bokeland.com/
> > 花了几个小时找原因,,没找到,,郁闷.- 隐藏被引用文字 -
>
> - 显示引用的文字 -
你可以自己建立一个endoresed目录
I created an "endoresed" directory in ${WLS_HOME}/jrockiet90_150_04/
jre/lib"
CXF configuration file 支持指定文件名和指定文件URL两种方式,
具体可以参考CXF User Guide wiki (几周前我刚修订过一遍)
http://cwiki.apache.org/CXF20DOC/configuration.html
姜宁 (Willem)
------------------
http://willem.bokeland.com/
On 9月20日, 下午2时18分, willem <willem.ji...@gmail.com> wrote:
> 第一个问题可以参考cxf-user 上的一个讨论,http://www.nabble.com/Failed-to-deploy-the-sample-helloworld.war-to-W...
> > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -
姜宁 (Willem)
------------------
http://willem.bokeland.com/
详情可以参考, 都是E文的(最近比较忙,没时间翻译了),希望能对你有所帮助。
CXF JIRA 922,里面有问题原理的分析和一个work around方法
https://issues.apache.org/jira/browse/CXF-922
如何用Java API的方式设置SSL参数
http://www.nabble.com/Error-when-trying-to-contact-service-over-SSL-on-a-specific-port-tf4424617.html#a12654695
姜宁 (Willem)
------------------
http://willem.bokeland.com/
On 9月21日, 下午3时30分, willem <willem.ji...@gmail.com> wrote:
> 你的意思是将HttpConduit的设置和jaxws:client 的设置都放在一个xml文件中吗?
> 前段时间在cxf-user list 讨论过这样的问题,目前没有太好的解决方案。
>
> 详情可以参考, 都是E文的(最近比较忙,没时间翻译了),希望能对你有所帮助。
>
> CXF JIRA 922,里面有问题原理的分析和一个work around方法https://issues.apache.org/jira/browse/CXF-922
> 如何用Java API的方式设置SSL参数http://www.nabble.com/Error-when-trying-to-contact-service-over-SSL-o...
// http conduit configuration file , it supports wildcard
URL config = getClass().getResource("resources/
BethalClientConfig.cxf");
// the client bean configuration file
URL beans = getClass().getResource("resources/
BethalClientBeans.xml");
// We go through the back door, setting the default bus.
new DefaultBusFactory().createBus(config);
// Init the context which contains the client bean,
// and we use the already loaded bus to set the configuration
BusApplicationContext context = new
BusApplicationContext(beans, false);
Greeter bethal = (Greeter)context.getBean("Bethal");
// verify the client side's setting
verifyBethalClient(bethal);
You can find the detail demo code from [1]'s
testGetClientFromSpringContext()
[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/
test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
姜宁 (Willem)
------------------
http://willem.bokeland.com/