JAX-WS生成的WebService客户端与Axis2怎么会有关系,怎么能让它们独立运行?
背景:
项目原引用axis2框架作为Webservice的server端,运行正常。使用的是1.51的包。
现状:
今增加了一个移植过来的Webservice客户端,由eclipse在JAX-WS框架上生成。
问题描述:
1、JAX-WS客户端独立可正常运行。但是在和原项目的Axis2包放在一起就有如下问题。
1.1 首先提示代理接口和server端方法不一致(少一个),重新生成客户端代理后该问题已解决。
【Caused by: javax.xml.ws.WebServiceException: The Endpoint validation failed to validate due to the following errors: :: Invalid Endpoint Interface :: :: The operation names in the WSDL portType do not match the method names in the SEI or Web service implementation class. wsdl operations = [methodA、methodB、methodC ] dispatch operations = [methodA、methodB 】。 异常由axis类抛出。
1.2 现在的问题是:
javax.xml.ws.soap.SOAPFaultException: Stream write error
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1249)
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:975)
at org.apache.axis2.jaxws.marshaller.impl.alt.RPCLitMethodMarshaller.demarshalFaultResponse(RPCLitMethodMarshaller.java:553)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:443)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:406)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:330)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
at $Proxy9.getPersonInfoALL(Unknown Source)
at test.HansXNHApiImpl.GetPersonInfoALL(HansXNHApiImpl.java:224)
at test.Serv1216000999.searchXNHMenberList(Serv1216000999.java:37)
at test.Serv1216000999.main(Serv1216000999.java:77)
纳闷的是如上异常都由Axis2类抛出,可是这个客户端是由JAX-WS生成,与axis没关系呀,如何解决呢?