Java 类javax.xml.rpc.encoding.Deserializer 实例源码

项目:parabuild-ci    文件:DynamicInvoker.java   
/**
 * Method getParamData
 *
 * @param c
 * @param arg
 */
private Object getParamData(org.apache.axis.client.Call c, Parameter p, String arg) throws Exception {
    // Get the QName representing the parameter type
    QName paramType = org.apache.axis.wsdl.toJava.Utils.getXSIType(p);

    TypeEntry type = p.getType();
    if (type instanceof BaseType && ((BaseType) type).isBaseType()) {
        DeserializerFactory factory = c.getTypeMapping().getDeserializer(paramType);
        Deserializer deserializer = factory.getDeserializerAs(Constants.AXIS_SAX);
        if (deserializer instanceof SimpleDeserializer) {
            return ((SimpleDeserializer)deserializer).makeValue(arg);
        }
    }
    throw new RuntimeException("not know how to convert '" + arg
                               + "' into " + c);
}
项目:Lucee4    文件:StringDeserializerFactory.java   
public Deserializer getDeserializerAs(String mechanismType) {
    if (javaType == String.class) {
        return new StringDeserializer(javaType, xmlType);
    }

    return super.getDeserializerAs(mechanismType);
}
项目:Lucee    文件:StringDeserializerFactory.java   
@Override
public Deserializer getDeserializerAs(String mechanismType) {
    if (javaType == String.class) {
        return new StringDeserializer(javaType, xmlType);
    }

    return super.getDeserializerAs(mechanismType);
}