Examples of DeserializerImpl


Examples of org.apache.axis.encoding.DeserializerImpl

        //  </method>
        // so that a list of 3 items is created.
        // Failure to register the target would result in the last
        // item not being added to the list
        if (context.isNil(attributes)) {
          Deserializer nilDSer =  new DeserializerImpl();
          nilDSer.registerValueTarget(
             new MethodTarget(currentParam,
                              RPCParam.getValueSetMethod()));
          return (SOAPHandler) nilDSer;
        }
       
        Deserializer dser = null;
        if ((type == null) && (namespace != null) && (!namespace.equals(""))) {
            dser = context.getDeserializerForType(qname);
        } else {
            dser = context.getDeserializer(destClass, type);
        }
       
        if (dser == null) {
          if (type != null) {
              dser = context.getDeserializerForType(type);
              if(null != destClass && dser == null && destClass.isAssignableFrom( org.w3c.dom.Element.class )){
                //If a DOM element is expected, as last resort always allow direct mapping
                // of parameter's SOAP xml to a DOM element.  Support of literal  parms by default.
                dser = context.getDeserializer(destClass, Constants.SOAP_ELEMENT);

              }
              if (dser == null) {
                  throw new SAXException(Messages.getMessage(
                          "noDeser01", localName,"" + type));
              }
              if (paramDesc != null && paramDesc.getJavaType() != null) {
                  // If we have an xsi:type, make sure it makes sense
                  // with the current paramDesc type
                  Class xsiClass =
                          context.getTypeMapping().getClassForQName(type);
                  if (null != xsiClass  && !JavaUtils.isConvertable(xsiClass, destClass)) {
                      throw new SAXException("Bad types (" +
                                             xsiClass + " -> " + destClass + ")"); // FIXME!
                  }
              }
          } else {
              dser = new DeserializerImpl();
              if (dser == null) {
                  throw new SAXException(Messages.getMessage(
                          "noDeser01", localName,"" + type));
              }
          }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

        //  </method>
        // so that a list of 3 items is created.
        // Failure to register the target would result in the last
        // item not being added to the list
        if (context.isNil(attributes)) {
          Deserializer nilDSer =  new DeserializerImpl();
          nilDSer.registerValueTarget(
             new MethodTarget(currentParam,
                              RPCParam.getValueSetMethod()));
          return (SOAPHandler) nilDSer;
        }
       
        Deserializer dser = null;
        if ((type == null) && (namespace != null) && (!namespace.equals(""))) {
            dser = context.getDeserializerForType(qname);
        } else {
            dser = context.getDeserializer(destClass, type);
        }
       
        if (dser == null) {
          if (type != null) {
              dser = context.getDeserializerForType(type);
              if (dser == null) {
                  throw new SAXException(JavaUtils.getMessage(
                          "noDeser01", localName,"" + type));
              }
              if (paramDesc != null && paramDesc.getJavaType() != null) {
                  // If we have an xsi:type, make sure it makes sense
                  // with the current paramDesc type
                  Class xsiClass =
                          context.getTypeMapping().getClassForQName(type);
                  if (!JavaUtils.isConvertable(xsiClass, destClass)) {
                      throw new SAXException("Bad types (" +
                                             xsiClass + " -> " + destClass + ")"); // FIXME!
                  }
              }
          } else {
              dser = new DeserializerImpl();
              if (dser == null) {
                  throw new SAXException(JavaUtils.getMessage(
                          "noDeser01", localName,"" + type));
              }
          }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

            // If no deserializer is
            // found, the deserializer is set to DeserializerImpl().
            // It is possible that the element has an href, thus we
            // won't know the type until the definitition is encountered.
            if (dSer == null) {
                dSer = new DeserializerImpl();
                // Determine a default type for the deserializer
                if (itemType == null) {
                    dSer.setDefaultType(defaultType);
                }
            }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

        Deserializer dSer = null;
        if (itemType != null) {
           dSer = context.getDeserializerForType(itemType);
        }
        if (dSer == null) {
            dSer = new DeserializerImpl();
        }

        // When the value is deserialized, inform us.
        // Need to pass the index because multi-ref stuff may
        // result in the values being deserialized in a different order.
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

                                            attributes.getValue("href"),
                                            context);
        // It is an error if the dSer is not found, the base
        // deserializer impl is returned so that it can generate the correct message.
        if (dSer == null) {
            dSer = new DeserializerImpl();
            return (SOAPHandler)dSer;
        }

        // Register value target
        if (propDesc.isWriteable()) {
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

            // default type is used if the href'd element does
            // not have an xsi:type.
            if (href == null) {
                dSer = context.getDeserializer(javaType, defaultXMLType);
            } else {
                dSer = new DeserializerImpl();
                dSer.setDefaultType(defaultXMLType);
            }
        }
        if (javaType.equals(String.class) &&
            dSer instanceof SimpleDeserializer) {
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

                                                            attributes);
            Deserializer dser = context.getDeserializerForType(typeQName);

            // If no deserializer, use the base DeserializerImpl.
            if (dser == null)
                dser = new DeserializerImpl();

            // When the child value is ready, we
            // want our set method to be invoked.
            // To do this register a DeserializeTarget on the
            // new Deserializer.
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

      }
*/
      QName itemType = context.getTypeFromAttributes(namespace, localName, attributes);
      Deserializer deserializer = null;
      if (itemType != null) deserializer = context.getDeserializerForType(itemType);
      if (deserializer == null) deserializer = new DeserializerImpl();

      deserializer.registerValueTarget(new DeserializerTarget(this, localName));
      addChildDeserializer(deserializer);

      return (SOAPHandler)deserializer;
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

        Deserializer dSer = null;
        if (itemType != null) {
           dSer = context.getDeserializerForType(itemType);
        }
        if (dSer == null) {
            dSer = new DeserializerImpl();
        }

        // When the value is deserialized, inform us.
        // Need to pass the index because multi-ref stuff may
        // result in the values being deserialized in a different order.
View Full Code Here

Examples of org.apache.axis.encoding.DeserializerImpl

       
        // If no deserializer, use the base DeserializerImpl.
        // There may not be enough information yet to choose the
        // specific deserializer.
        if (dSer == null) {
            dSer = new DeserializerImpl();
            // determine a default type for this child element
            TypeMapping tm = context.getTypeMapping();
            Class type = propDesc.getType();
            dSer.setDefaultType(tm.getTypeQName(type));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.