cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: c#调用cxf出问题
Date Fri, 28 Aug 2015 02:44:49 GMT
Hi Guys,

All discussion in this forum should be in English, this way you can get help easily, also
more wide audiences can get benefit from the discussion, this is truly how open source works
across different cultures IMO.

And as Aki pointed out, this exception comes from that the C# client send message using unexpected
namespace, you need fix it in your C# code.

Cheers
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



> On Aug 27, 2015, at 9:02 PM, 杨华杰 <yhjhoo@gmail.com> wrote:
> 
> 你用soapUI 测试一下,如果还是有问题就是C#的问题啦
> 
> On Thu, Aug 27, 2015 at 12:01 PM, zjrzxy83 <zjrzxy83@163.com> wrote:
> 
>> 我用cxf写的服务,用java写的客户端访问都正常的。但同事用c#访问老是报错。
>> 
>> cxf配置:
>> xml配置:
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>> 
>> <jaxws:endpoint id="hxjcService"
>>  implementor="com.hxjc.ws.impl.HxjcClient"
>>  address="/HxjcService" />
>> 
>> 接口类:
>> @WebService
>> public interface IHxjcClient {
>> /**
>>  *  通过调用接口,实现高压电离室数据的传输,解析,展示和存储
>>  * @param xml-高压电离室相关数据
>>  * @return 返回参数true:成果,其他值:失败
>>  */
>> public  String getRealTimeDataByPowerRoom(String xml);
>> .....
>> 实现类:
>> @WebService(endpointInterface = "com.hxjc.ws.IHxjcClient")
>> public class HxjcClient implements IHxjcClient {
>> protected final Log log = LogFactory.getLog(HxjcClient.class.getName());
>> private Watched watched;
>> private Watcher watcher;
>> private Map<String, Object> rtDataMap = new HashMap<String, Object>();
>> private Map<String, Object> naiDataMap = new HashMap<String, Object>();
>> 
>> /**
>>  * 通过调用接口,实现高压电离室数据的传输,解析,展示和存储
>>  *
>>  * @param xml
>>  *            -高压电离室相关数据
>>  * @return 返回参数true:成功,其他值:失败
>>  */
>> public String getRealTimeDataByPowerRoom(String xml) {
>>  System.out.println(xml);
>> 
>> 
>> c#调用错误如下:
>> 
>> 八月 26, 2015 8:42:55 下午 org.apache.cxf.phase.PhaseInterceptorChain
>> doDefaultLogging
>> WARNING: Interceptor for {
>> http://impl.ws.hxjc.com/}HxjcClientService#{http://ws.hxjc.com/}insertEquipmentData
>> has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Unexpected wrapper element {
>> http://ws.com}insertEquipmentData found.   Expected {
>> http://ws.hxjc.com/}insertEquipmentData.
>> at
>> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:106)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>> at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>> at
>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:200)
>> at
>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
>> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>> at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>> at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> at org.eclipse.jetty.server.Server.handle(Server.java:370)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
>> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
>> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>> at
>> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>> at
>> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
>> at
>> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>> at java.lang.Thread.run(Thread.java:722)
>> 
>> 
>> 2015-08-27
>> 
>> 
>> zjrzxy83


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message