【发布时间】:2021-05-26 01:19:16
【问题描述】:
场景: 我们有一个 3rd 方 CRM 应用程序,它提供了一组 JAX-WS 服务。可以使用 SOAP-Ui 成功调用它们。
我们现在在 WebSphere 上有客户端代码,它调用这些相同的服务端点,使用 JAX-WS 客户端,部署在 WebSphere JEE 应用程序中。所有的工作,除了 1 个调用,它第一次工作,然后再没有,直到 WebSphere 重新启动。 SOAP 数据包通过网络传递给我们,但似乎没有正确解组。我们的症状是 JAX-WS 客户端返回的 Java PoJo 中没有响应元素(ReadAccountResponse)。
SOAP 响应包含;
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns2:WSResponse xmlns:ns2="http://www.finxxx.com/wscomposer/operationtypes"> <p:ReadAccountResponse xmlns:p="http://www.finxxx.com/wscomposer/ReadAccount"> </p:ReadAccountResponse> </ns2:WSResponse> </soapEnv:Body> </soapenv:Envelope>
我们已经对此进行了大量的追踪,但恐怕在没有一些帮助的情况下无法走得更远。我们有工作案例和失败案例的详细 WebSphere Trace 日志。跟踪文件有点大 :-) 但是,我在下面粘贴了我认为每种情况下的一些相关行。这里的一个猜测是,WebSphere 第一次为 SOAP 响应创建了某种 demarshaller,并且可能缓存了它。第二次似乎试图检索它,但不能。如果对任何人有帮助,我可以粘贴更多信息。
代码(客户端和服务器)部署在 WebSphere Application Server ND 8.5.5 上。
提取成功案例,解析SOAP Response;
[12/02/21 10:13:07:329 GMT] 000000b6 BuilderUtil 1 org.apache.axis2.builder.BuilderUtil getCharSetEncoding char set encoding set from default =UTF-8
[12/02/21 10:13:07:329 GMT] 000000b6 StAXUtils 1 org.apache.axiom.om.util.StAXUtils createXMLStreamReader XMLStreamReader is org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper
[12/02/21 10:13:07:330 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 7
[12/02/21 10:13:07:330 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState START_ELEMENT:
[12/02/21 10:13:07:330 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://schemas.xmlsoap.org/soap/envelope/}Envelope
[12/02/21 10:13:07:330 GMT] 000000b6 StAXSOAPModel 1 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder constructNode Starting to process SOAP 1.1 message
[12/02/21 10:13:07:330 GMT] 000000b6 StAXSOAPModel 1 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder createOMElement Build the OMElement Envelope by the StaxSOAPModelBuilder
[12/02/21 10:13:07:330 GMT] 000000b6 AxisEngine 3 org.apache.axis2.engine.AxisEngine receive [MessageContext: logID=634c0f2975acb69481788a9d87a47ac49dc1ccb72dc039e5] receive:urn:uuid:212f0707-68f8-4ec3-9a30-dcde597aed6e
[12/02/21 10:13:07:331 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 1
[12/02/21 10:13:07:331 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState START_ELEMENT:
[12/02/21 10:13:07:331 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://schemas.xmlsoap.org/soap/envelope/}Body
[12/02/21 10:13:07:331 GMT] 000000b6 StAXSOAPModel 1 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder createOMElement Build the OMElement Body by the StaxSOAPModelBuilder
[12/02/21 10:13:07:331 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 1
.
. A lot of stuff here , Axis Engine transport related.
.
[12/02/21 10:13:07:352 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState START_ELEMENT:
[12/02/21 10:13:07:352 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://www.fineos.com/wscomposer/operationtypes}WSResponse
[12/02/21 10:13:07:352 GMT] 000000b6 StAXSOAPModel 1 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder createOMElement Build the OMElement WSResponse by the StaxSOAPModelBuilder
[12/02/21 10:13:07:352 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 1
[12/02/21 10:13:07:352 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState START_ELEMENT:
[12/02/21 10:13:07:352 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://www.fineos.com/wscomposer/ReadAccount}ReadAccountResponse
[12/02/21 10:13:07:352 GMT] 000000b6 StAXSOAPModel 1 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder createOMElement Build the OMElement ReadAccountResponse by the StaxSOAPModelBuilder
[12/02/21 10:13:07:353 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 1
[12/02/21 10:13:07:353 GMT] 000000b6 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState CHARACTERS:
[12/02/21 10:13:07:353 GMT] 000000b6 XOPDecodingSt 1 org.apache.axiom.util.stax.xop.XOPDecodingStreamReader next Received Element Type is : 4
从失败的场景中提取;
[23/02/21 11:12:09:594 GMT] 00000143 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState START_ELEMENT:
[23/02/21 11:12:09:594 GMT] 00000143 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://www.fineos.com/wscomposer/operationtypes}WSResponse
[23/02/21 11:12:09:595 GMT] 00000143 StAXOMBuilder 1 org.apache.axiom.om.impl.builder.StAXOMBuilder createWithCustomBuilder Invoking CustomBuilder, org.apache.axis2.datasource.jaxb.JAXBCustomBuilder@7f5109cb, to the OMNode for {http://www.fineos.com/wscomposer/operationtypes}WSResponse
[23/02/21 11:12:09:595 GMT] 00000143 JAXBCustomBui 1 org.apache.axis2.datasource.jaxb.JAXBCustomBuilder create create namespace = http://www.fineos.com/wscomposer/operationtypes
[23/02/21 11:12:09:595 GMT] 00000143 JAXBCustomBui 1 org.apache.axis2.datasource.jaxb.JAXBCustomBuilder create localPart = WSResponse
[23/02/21 11:12:09:595 GMT] 00000143 JAXBCustomBui 1 org.apache.axis2.datasource.jaxb.JAXBCustomBuilder create reader = class org.apache.axiom.util.stax.xop.XOPDecodingStreamReader
.
. Seems to be looking for a cached unmarshaller, perhaps?
.
[23/02/21 11:12:09:599 GMT] 00000143 JAXBUtils 1 org.apache.axis2.jaxws.message.databinding.JAXBUtils getJAXBUnmarshaller Unmarshaller created [not in pool]
[23/02/21 11:12:09:599 GMT] 00000143 JAXBDSContext 1 org.apache.axis2.datasource.jaxb.JAXBDSContext unmarshal Adding JAXBAttachmentUnmarshaller to Unmarshaller
[23/02/21 11:12:09:599 GMT] 00000143 JAXBDSContext 1 org.apache.axis2.datasource.jaxb.JAXBDSContext unmarshalByElement Invoking unMarshalByElement
[23/02/21 11:12:09:599 GMT] 00000143 CompoundClass > loadClass com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub this=com.ibm.ws.classloader.CompoundClassLoader@46aa37bd[PF][app:m6-cif-integration-ear_HAVEN_SIT] Entry
[23/02/21 11:12:09:600 GMT] 00000143 SinglePathCla 3 failed to read com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub from /opt/WebSphere8.5/AppServer/profiles/AppSvr01/installedApps/rhm6homvd1Cell01/m6-cif-integration-ear_HAVEN_SIT.ear/lib/m6-wscomposer-client-jar-0.0.1-SNAPSHOT.jar
[23/02/21 11:12:09:600 GMT] 00000143 JIT_StubPlugi > defineStubClass: com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub Entry
[23/02/21 11:12:09:600 GMT] 00000143 JIT_StubPlugi < defineStubClass: null Exit
[23/02/21 11:12:09:600 GMT] 00000143 CompoundClass < loadClass com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub failed Exit
[23/02/21 11:12:09:604 GMT] 00000143 CompoundClass > loadClass com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub this=com.ibm.ws.classloader.CompoundClassLoader@46aa37bd[PF][app:m6-cif-integration-ear_HAVEN_SIT] Entry
[23/02/21 11:12:09:604 GMT] 00000143 SinglePathCla 3 failed to read com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub from /opt/WebSphere8.5/AppServer/profiles/AppSvr01/installedApps/rhm6homvd1Cell01/m6-cif-integration-ear_HAVEN_SIT.ear/lib/m6-wscomposer-client-jar-0.0.1-SNAPSHOT.jar
[23/02/21 11:12:09:604 GMT] 00000143 JIT_StubPlugi > defineStubClass: com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub Entry
[23/02/21 11:12:09:604 GMT] 00000143 JIT_StubPlugi < defineStubClass: null Exit
[23/02/21 11:12:09:604 GMT] 00000143 CompoundClass < loadClass com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse_JAXB_Deserialization_Stub failed Exit
[23/02/21 11:12:09:605 GMT] 00000143 JAXBUtils 1 org.apache.axis2.jaxws.message.databinding.JAXBUtils releaseJAXBUnmarshaller Unmarshaller placed back into pool
[23/02/21 11:12:09:606 GMT] 00000143 JAXBCustomBui 1 org.apache.axis2.datasource.jaxb.JAXBCustomBuilder create Successfully unmarshalled jaxb object com.fineos.wscomposer.operationtypes.contract.read.ReadAccountResponse@7f429fef
[23/02/21 11:12:09:606 GMT] 00000143 JAXBCustomBui 1 org.apache.axis2.datasource.jaxb.JAXBCustomBuilder create The JAXBDataSource is org.apache.axis2.datasource.jaxb.JAXBDataSource@c63fe9a9
[23/02/21 11:12:09:606 GMT] 00000143 OMSourcedElem 1 org.apache.axiom.om.impl.llom.OMSourcedElementImpl <init> OMSourcedElementImpl(String, OMNamespace, OMFactory, OMDataSource) ctor
[23/02/21 11:12:09:606 GMT] 00000143 OMSourcedElem 1 org.apache.axiom.om.impl.llom.OMSourcedElementImpl isComplete isComplete : isExpanded false
[23/02/21 11:12:09:606 GMT] 00000143 StAXOMBuilder 1 org.apache.axiom.om.impl.builder.StAXOMBuilder createWithCustomBuilder The CustomBuilder, org.apache.axis2.datasource.jaxb.JAXBCustomBuilder@7f5109cbsuccessfully constructed the OMNode for {http://www.fineos.com/wscomposer/operationtypes}WSResponse
[23/02/21 11:12:09:606 GMT] 00000143 StAXOMBuilder 1 org.apache.axiom.om.impl.builder.StAXOMBuilder createWithCustomBuilder The current state of the parser is:
[23/02/21 11:12:09:606 GMT] 00000143 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState END_ELEMENT:
[23/02/21 11:12:09:606 GMT] 00000143 StAXOMBuilder 3 org.apache.axiom.om.impl.builder.StAXOMBuilder logParserState QName: {http://schemas.xmlsoap.org/soap/envelope/}Body
【问题讨论】:
标签: java soap websphere jax-ws