为什么在注册表"

时间:2018-06-02 15:47:22

标签: java spring-boot soap

我正在尝试调用soap服务器并在下面的类中遇到问题,因为没有发现血清,然后将serilizaion代码添加到下面的类中,如下所示,然后得到错误,如下所示。

请查看以下详细信息:

我无法理解为什么我得到的错误是"没有为注册表中的类java.lang.Class找到序列化程序"

类别:

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "StatementListReferenceTypes")
@XmlEnum
public enum StatementListReferenceTypes implements java.io.Serializable{

    @XmlEnumValue("Account")
    ACCOUNT("Account"),
    @XmlEnumValue("Card")
    CARD("Card");
    private final String value;

    StatementListReferenceTypes(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static StatementListReferenceTypes fromValue(String v) {
        for (StatementListReferenceTypes c: StatementListReferenceTypes.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(StatementListReferenceTypes.class, true);

    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}

错误:

java.io.IOException: No serializer found for class java.lang.Class in registry org.apache.axis.encoding.TypeMappingDelegate@3f9563cb
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507) ~[axis-1.4.jar:?]
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980) ~[axis-1.4.jar:?]
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734) ~[axis-1.4.jar:?]
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230) [axis-1.4.jar:?]
    at 

任何人都可以对此感到满意。

0 个答案:

没有答案