Package javax.xml.rpc.namespace

Examples of javax.xml.rpc.namespace.QName


    public Object makeValue(String source) {
        int colon = source.lastIndexOf(":");
        String namespace = colon < 0 ? "" :
                context.getNamespaceURI(source.substring(0, colon));
        String localPart = colon < 0 ? source : source.substring(colon + 1);
        return new QName(namespace, localPart);
    } // makeValue
View Full Code Here


     */
    public void serialize(QName name, Attributes attributes,
                          Object value, SerializationContext context)
        throws IOException
    {
        QName qname = (QName) value;
        String str = context.qName2String(qname);
        context.startElement(name, attributes);
        context.writeString(str);
        context.endElement();
    }
View Full Code Here

        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        // The "" namespace is literal (no encoding).
        tm.setSupportedNamespaces(new String[] {Constants.URI_CURRENT_SOAP_ENC});
        reg.register(Constants.URI_CURRENT_SOAP_ENC, tm);

        QName beanQName = new QName("typeNS", "TheBean");
        tm.register(AttributeBean.class,
                    beanQName,
                    new BeanSerializerFactory(AttributeBean.class, beanQName),
                    new BeanDeserializerFactory(AttributeBean.class, beanQName));
View Full Code Here

        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        // The "" namespace is literal (no encoding).
        tm.setSupportedNamespaces(new String[] {Constants.URI_CURRENT_SOAP_ENC});
        reg.register(Constants.URI_CURRENT_SOAP_ENC, tm);

        QName beanQName = new QName("typeNS", "Bean");
        tm.register(SimpleBean.class,
                    beanQName,
                    new SimpleNonPrimitiveSerializerFactory(SimpleBean.class, beanQName),
                    new SimpleDeserializerFactory(SimpleBean.class, beanQName));
View Full Code Here

            setValue(null, new Integer(curIndex++));
            return null;
        }

        // Get the type
        QName itemType = context.getTypeFromAttributes(namespace,
                                                       localName,
                                                       attributes);
        // Get the deserializer
        Deserializer dSer = null;
        if (itemType != null) {
View Full Code Here

        TypeMappingRegistry reg = context.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        tm.setSupportedNamespaces(new String[] {Constants.URI_CURRENT_SOAP_ENC});
        reg.register(Constants.URI_CURRENT_SOAP_ENC, tm);

        QName dataQName = new QName("typeNS", "Data");
        tm.register(Data.class, dataQName, new DataSerFactory(), new DataDeserFactory());

        msg.output(context);
       
        String msgString = stringWriter.toString();
View Full Code Here

                FieldDesc field = typeDesc.getFieldByName(propName);
                // skip it if its not an attribute
                if (field == null || field.isElement())
                    continue;

                QName qname = field.getXmlName();
                if (qname == null) {
                    qname = new QName("", propName);
                }

                if (propertyDescriptor[i].isReadable() &&
                    !propertyDescriptor[i].isIndexed()) {
                    // add to our attributes
                    Object propValue = propertyDescriptor[i].get(value);
                    // If the property value does not exist, don't serialize
                    // the attribute.  In the future, the decision to serializer
                    // the attribute may be more sophisticated.  For example, don't
                    // serialize if the attribute matches the default value.
                    if (propValue != null) {
                        String propString = propValue.toString();
                       
                        String namespace = qname.getNamespaceURI();
                        String localName = qname.getLocalPart();
                       
                        attrs.addAttribute(namespace,
                                           localName,
                                           context.qName2String(qname),
                                           "CDATA",
View Full Code Here

            // Set default namespace if appropriate (to avoid prefix mappings
            // in literal style).  Do this only if there is no encodingStyle.
            if (encodingStyle.equals("")) {
                context.registerPrefixForURI("", getNamespaceURI());
            }
            context.startElement(new QName(namespaceURI,name), attributes);
        }

        for (int i = 0; i < params.size(); i++) {
            RPCParam param = (RPCParam)params.elementAt(i);
            if (!isRPC && encodingStyle.equals("")) {
View Full Code Here

        // Register all known flavors of the namespace.
        try {
            if (xmlType.getNamespaceURI().equals(
                       Constants.URI_CURRENT_SCHEMA_XSD)) {
                for (int i=0; i < Constants.URIS_SCHEMA_XSD.length; i++) {
                    QName qName = new QName(Constants.URIS_SCHEMA_XSD[i],
                                            xmlType.getLocalPart());
                    super.register(javaType, qName, sf, df);
                }
            }
            else if (xmlType.getNamespaceURI().equals(
                       Constants.URI_CURRENT_SOAP_ENC)) {
                for (int i=0; i < Constants.URIS_SOAP_ENC.length; i++) {
                    QName qName = new QName(Constants.URIS_SOAP_ENC[i],
                                            xmlType.getLocalPart());
                    super.register(javaType, qName, sf, df);
                }
            }
            // Register with the specified xmlType.
View Full Code Here

    try {
      Service  service = new Service();
      Call     call    = (Call) service.createCall();

      call.setTargetEndpointAddress( new URL(registryURL) );
      call.setOperationName( new QName("http://www.soapinterop.org/Register", "Register" ));
      call.addParameter("ServiceName", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("ServiceUrl", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("ServiceType", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("ServiceWSDL", XMLType.XSD_STRING, ParameterMode.IN);
     
View Full Code Here

TOP

Related Classes of javax.xml.rpc.namespace.QName

Copyright © 2018 www.massapicom. 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.