【发布时间】:2016-12-15 10:19:17
【问题描述】:
有人可以帮我解决一个奇怪的问题吗?
我有一个服务:
@WebMethod
@WebResult(name = "sendCustomerCommunicationResponse", targetNamespace = "......something/Underwriting/Correspondance/V1", partName = "Body")
public SendCustomerCommunicationResponse sendCustomerCommunication(
@WebParam(name = "sendCustomerCommunicationRequest", targetNamespace = "........something/Underwriting/Correspondance/V1", partName = "Body")
SendCustomerCommunicationRequest body)
throws ServiceException_Exception, SystemException_Exception
;
我在本地调用它:
SendCustomerCommunicationResponse response = correspondanceServicePort.sendCustomerCommunication(sendCustomerCommunicationRequest);
这很好用。但是当我在另一台服务器上部署应用程序时,我收到:
"java.lang.ClassCastException:
it.usi.xframe.ub1.batch.services.esb.SendCustomerCommunicationRequest incompatible with
it.usi.xframe.ub1.batch.services.esb.SendCustomerCommunicationResponse"
附注应用程序正在 WebSphere 服务器上运行
请求是:
<soapenv:Envelope ...someSchema...>
<soapenv:Header>
<v1:TechnicalHeader>
<v1:correlationId>12742</v1:correlationId>
<v1:sender>userName</v1:sender>
<v1:countryCode/>
<v1:channelId/>
<v1:userID>userName</v1:userID>
<v1:operationId>CHANGE_STATUS</v1:operationId>
</v1:TechnicalHeader>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>someUser</wsse:Username>
<wsse:Password>somePassoword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<v11:sendCustomerCommunicationRequest>
<v11:eventCode>{"header":{"publishingDate":1474016634749,"eventId":"DEL-NEG","applicationCode":"UB3","correlationId":"9999","language":"IT","channelId":"MOB"},"body":{"ndg":"5106215","additionalInfo":{}}}</v11:eventCode>
</v11:sendCustomerCommunicationRequest>
</soapenv:Body>
</soapenv:Envelope>
【问题讨论】:
-
没有人吗?什么都没有?:(
-
某事试图将请求对象分配给响应变量,反之亦然。异常的调用堆栈应显示查找位置。
-
执行错误 java.lang.ClassCastException: it.usi.xframe.ub1.batch.services.esb.customerCommunication2.SendCustomerCommunicationRequest 与 it.usi.xframe.ub1.batch.services.esb 不兼容。 customerCommunication2.SendCustomerCommunicationResponseQ ZQat com.sun.proxy.$Proxy84.sendCustomerCommunication(Unknown Source)QZQat it.usi.xframe.ub1.batch.steps.close.ST002CLO.callEsbForPo 位置(ST002CLO.java:241)QZQat it.usi.xframe .ub1.batch.steps.close.ST002CLO.managePositionList(ST002CLO.java:367)QZQat it.usi.xfram e.ub1.batch.steps.close.ST002CLO.run(ST002CLO.java:1
-
这似乎与代理有关,但我不明白出了什么问题。代理可能期望 SendCustomerCommunicationResponse 而不是 SendCustomerCommunicationRequest 作为输入,但我不明白为什么
-
我也尝试使用 wsimport -target 2.0 重新生成客户端,但结果是一样的
标签: java web-services soap websphere