我得到了一个websphere 9,并且需要部署基于jax-rpc的SOAP webservice。客户端拒绝升级,并要求它必须是jax-rpc,而不是jax-ws。我使用Axis1创建set服务,它列出了一组jax-rpc抱怨。
The service class "com.aiab.pna.webservices.PlanName" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
The value type "org.apache.axis.description.TypeDesc" used via the service class "com.aiab.pna.webservices.PlanName" does not have a public default constructor. Chapter 5.4 of the JAX-RPC 1.1 specification requires a value type to have a public default constructor, otherwise a JAX-RPC 1.1 compliant Web service engine may be unable to construct an instance of the value type during deserialization.
The value type "org.apache.axis.utils.BeanPropertyDescriptor" used via the service class "com.aiab.pna.webservices.PlanName" does not have a public default constructor. Chapter 5.4 of the JAX-RPC 1.1 specification requires a value type to have a public default constructor, otherwise a JAX-RPC 1.1 compliant Web service engine may be unable to construct an instance of the value type during deserialization.
The value type "org.apache.axis.description.FieldDesc" used via the service class "com.aiab.pna.webservices.PlanName" does not have a public default constructor. Chapter 5.4 of the JAX-RPC 1.1 specification requires a value type to have a public default constructor, otherwise a JAX-RPC 1.1 compliant Web service engine may be unable to construct an instance of the value type during deserialization.
The field or property "searchPlanListByKeywordAndCategoryReturn" on the value type "com.aiab.pna.webservices.bean.SearchPlanListByKeywordAndCategoryResponse" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Object", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "noClasses" on the value type "org.apache.axis.description.TypeDesc" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Class", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "noObjects" on the value type "org.apache.axis.description.TypeDesc" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Object", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "actualType" on the value type "org.apache.axis.utils.BeanPropertyDescriptor" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Class", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "type" on the value type "org.apache.axis.utils.BeanPropertyDescriptor" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Class", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "propertyDescriptorMap" on the value type "org.apache.axis.description.TypeDesc" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.util.Map", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "javaType" on the value type "org.apache.axis.description.FieldDesc" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Class", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The field or property "getBasicPlanCategoryReturn" on the value type "com.aiab.pna.webservices.bean.GetBasicPlanCategoryResponse" used via the service class "com.aiab.pna.webservices.PlanName" has a data type, "java.lang.Object", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.webservice被部署到websphere 9,尽管有抱怨列表,但在调用webservice时,我遇到了这个错误:
[4/24/19 10:02:54:402 SGT] 000000a3 SOAPPart E com.ibm.ws.webservices.engine.SOAPPart _getWebServicesInputSource WSWS3227E: Error: Exception:
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: java.io.IOException: WSWS3037E: Error: Serialization cannot occur for com.aiab.pna.webservices.bean.GetBasicPlanCategoryResponse.
faultActor: null
faultDetail:
java.io.IOException: WSWS3037E: Error: Serialization cannot occur for com.aiab.pna.webservices.bean.GetBasicPlanCategoryResponse.
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:283)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:925)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:840)但是我已经在GetBasicPlanCategoryResponse上实现了Serializable
public class GetBasicPlanCategoryResponse implements java.io.Serializable {
private java.lang.Object[] getBasicPlanCategoryReturn;
public GetBasicPlanCategoryResponse() {
}我还发现websphere 9不推荐使用jax-rpc:https://www.ibm.com/support/knowledgecenter/en/SSEQTP_9.0.0/com.ibm.websphere.base.doc/ae/rmig_depfeat.html
这就是webservice在websphere 9上不能工作的原因吗?
我需要知道是否有可能在websphere 9上托管一个jax-rpc SOAP webservice,并且客户端仍然可以使用它。如果是,请告诉我如何让它工作。如果没有,请解释原因。
发布于 2020-04-20 06:16:41
注意序列化,不仅主对象必须是可序列化的,而且所有子对象也必须是可序列化的。我注意到您的类包含一个属性:getBasicPlanCategoryReturn
这是Object数组类型。是否确定此数组中的所有项都是实现Serialisable的类?
https://stackoverflow.com/questions/55821499
复制相似问题