Search in sources :

Example 1 with Deserializer

use of javax.xml.rpc.encoding.Deserializer in project tdi-studio-se by Talend.

the class DynamicInvoker method getParamData.

/**
     * 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.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);
}
Also used : ElementDeserializerFactory(org.apache.axis.encoding.ser.ElementDeserializerFactory) DeserializerFactory(javax.xml.rpc.encoding.DeserializerFactory) QName(javax.xml.namespace.QName) ElementDeserializer(org.apache.axis.encoding.ser.ElementDeserializer) SimpleDeserializer(org.apache.axis.encoding.ser.SimpleDeserializer) Deserializer(javax.xml.rpc.encoding.Deserializer) TypeEntry(org.apache.axis.wsdl.symbolTable.TypeEntry) SimpleDeserializer(org.apache.axis.encoding.ser.SimpleDeserializer)

Aggregations

QName (javax.xml.namespace.QName)1 Deserializer (javax.xml.rpc.encoding.Deserializer)1 DeserializerFactory (javax.xml.rpc.encoding.DeserializerFactory)1 ElementDeserializer (org.apache.axis.encoding.ser.ElementDeserializer)1 ElementDeserializerFactory (org.apache.axis.encoding.ser.ElementDeserializerFactory)1 SimpleDeserializer (org.apache.axis.encoding.ser.SimpleDeserializer)1 TypeEntry (org.apache.axis.wsdl.symbolTable.TypeEntry)1