我得到了一个 websphere 9,需要部署基于 jax-rpc 的 SOAP webservice。客户端拒绝升级,要求必须是jax-rpc,不能是jax-ws。我使用 Axis1 创建 web 服务,它列出了一组 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.
尽管有投诉列表,但 Web 服务仍部署到 websphere 9,但在调用 Web 服务时,我遇到了以下错误:
[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
这就是为什么 web 服务不能在 websphere 9 上运行的原因吗?
我需要知道是否有可能在 websphere 9 上托管一个 jax-rpc SOAP webservice 并且仍然可以由客户端使用。如果是,请告诉我如何使它工作。如果不是,请说明原因。