Package javax.xml.rpc.encoding

Examples of javax.xml.rpc.encoding.TypeMapping


/*  75 */     CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/*  76 */     if ((detail != null) && (msgContext != null))
/*     */     {
/*  78 */       log.debug("Processing detail");
/*  79 */       SerializationContext serContext = msgContext.getSerializationContext();
/*  80 */       TypeMapping typeMapping = serContext.getTypeMapping();
/*     */
/*  82 */       Iterator it = detail.getDetailEntries();
/*  83 */       while (it.hasNext())
/*     */       {
/*  85 */         DetailEntry deElement = (DetailEntry)it.next();
/*  86 */         QName xmlName = deElement.getElementQName();
/*  87 */         log.debug("Processing detail entry: " + xmlName);
/*     */
/*  89 */         OperationMetaData opMetaData = msgContext.getOperationMetaData();
/*  90 */         FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
/*  91 */         if (faultMetaData != null)
/*     */         {
/*  93 */           log.debug("Deserialize fault: " + faultMetaData);
/*  94 */           QName xmlType = faultMetaData.getXmlType();
/*  95 */           Class faultBeanClass = faultMetaData.getFaultBean();
/*     */
/*  98 */           AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(faultBeanClass, xmlType);
/*  99 */           if (desFactory == null) {
/* 100 */             throw new WebServiceException("Cannot obtain deserializer factory: xmlType=" + xmlType + ", javaType=" + faultBeanClass);
/*     */           }
/*     */
/* 104 */           String prefix = deElement.getPrefix();
View Full Code Here


/*     */
/* 104 */     CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/* 105 */     if ((detail != null) && (msgContext != null))
/*     */     {
/* 107 */       SerializationContext serContext = msgContext.getSerializationContext();
/* 108 */       TypeMapping typeMapping = serContext.getTypeMapping();
/*     */
/* 110 */       Iterator it = detail.getDetailEntries();
/* 111 */       while (it.hasNext())
/*     */       {
/* 113 */         DetailEntry deElement = (DetailEntry)it.next();
/* 114 */         Name deName = deElement.getElementName();
/* 115 */         QName xmlName = new QName(deName.getURI(), deName.getLocalName());
/*     */
/* 117 */         OperationMetaData opMetaData = msgContext.getOperationMetaData();
/* 118 */         FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
/* 119 */         if (faultMetaData != null)
/*     */         {
/* 121 */           if (log.isDebugEnabled())
/* 122 */             log.debug("Deserialize fault: " + faultMetaData);
/* 123 */           QName xmlType = faultMetaData.getXmlType();
/* 124 */           Class javaType = faultMetaData.getJavaType();
/*     */
/* 127 */           AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(javaType, xmlType);
/* 128 */           if (desFactory == null) {
/* 129 */             throw new JAXRPCException("Cannot obtain deserializer factory for: " + xmlType);
/*     */           }
/*     */
/*     */           try
View Full Code Here

/*     */     }
/* 253 */     else if ((faultCause != null) && (!(faultCause instanceof RuntimeException)))
/*     */     {
/* 255 */       Class javaType = faultCause.getClass();
/*     */
/* 257 */       TypeMapping typeMapping = serContext.getTypeMapping();
/*     */
/* 259 */       OperationMetaData opMetaData = msgContext.getOperationMetaData();
/* 260 */       if ((opMetaData != null) && (opMetaData.getFaultMetaData(javaType) != null))
/*     */       {
/* 262 */         FaultMetaData faultMetaData = opMetaData.getFaultMetaData(javaType);
/* 263 */         QName xmlName = faultMetaData.getXmlName();
/* 264 */         QName xmlType = faultMetaData.getXmlType();
/*     */
/* 266 */         xmlName = nsRegistry.registerQName(xmlName);
/*     */
/* 269 */         AbstractSerializerFactory serFactory = (AbstractSerializerFactory)typeMapping.getSerializer(javaType, xmlType);
/* 270 */         if (serFactory == null) {
/* 271 */           throw new JAXRPCException("Cannot obtain serializer factory for: " + xmlType);
/*     */         }
/*     */         try
/*     */         {
View Full Code Here

                serviceFactory.createService(orgWsdlUrl,
                        new QName(nameSpaceUri, serviceName));

        // Add the typemapping entries
        TypeMappingRegistry registry = addressBookService.getTypeMappingRegistry();
        TypeMapping map = registry.getDefaultTypeMapping();
        map.register(test.wsdl.addrNoImplSEI.Address.class,
                new QName("urn:AddrNoImplSEI", "Address"),
                new org.apache.axis.encoding.ser.BeanSerializerFactory(test.wsdl.addrNoImplSEI.Address.class, new QName("urn:AddrNoImplSEI", "Address")),
                new org.apache.axis.encoding.ser.BeanDeserializerFactory(test.wsdl.addrNoImplSEI.Address.class, new QName("urn:AddrNoImplSEI", "Address")));
        map.register(test.wsdl.addrNoImplSEI._Phone.class,
                new QName("urn:AddrNoImplSEI", "_Phone"),
                new org.apache.axis.encoding.ser.BeanSerializerFactory(test.wsdl.addrNoImplSEI._Phone.class, new QName("urn:AddrNoImplSEI", "_Phone")),
                new org.apache.axis.encoding.ser.BeanDeserializerFactory(test.wsdl.addrNoImplSEI._Phone.class, new QName("urn:AddrNoImplSEI", "_Phone")));
        map.register(test.wsdl.addrNoImplSEI.StateType.class,
                new QName("urn:AddrNoImplSEI", "StateType"),
                new org.apache.axis.encoding.ser.EnumSerializerFactory(test.wsdl.addrNoImplSEI.StateType.class, new QName("urn:AddrNoImplSEI", "StateType")),
                new org.apache.axis.encoding.ser.EnumDeserializerFactory(test.wsdl.addrNoImplSEI.StateType.class, new QName("urn:AddrNoImplSEI", "StateType")));

        AddressBookNoImplSEI myProxy = (AddressBookNoImplSEI) addressBookService.getPort(AddressBookNoImplSEI.class);
View Full Code Here

            // registered, throw a DataEncodingUnknown fault as per the
            // SOAP 1.2 spec.
            if (encodingStyle != null &&
                    sc.equals(SOAPConstants.SOAP12_CONSTANTS) &&
                    (mc.getOperationStyle() != Style.MESSAGE)) {
                TypeMapping tm = mc.getTypeMappingRegistry().
                        getTypeMapping(encodingStyle);
                if (tm == null ||
                        (tm.equals(mc.getTypeMappingRegistry().
                                                getDefaultTypeMapping()))) {
                    AxisFault badEncodingFault = new AxisFault(
                            Constants.FAULT_SOAP12_DATAENCODINGUNKNOWN,
                            "bad encoding style", null, null);
                    throw badEncodingFault;
View Full Code Here

            // registered, throw a DataEncodingUnknown fault as per the
            // SOAP 1.2 spec.
            if (encodingStyle != null &&
                    sc.equals(SOAPConstants.SOAP12_CONSTANTS) &&
                    (mc.getOperationStyle() != Style.MESSAGE)) {
                TypeMapping tm = mc.getTypeMappingRegistry().
                        getTypeMapping(encodingStyle);
                if (tm == null ||
                        (tm.equals(mc.getTypeMappingRegistry().
                                                getDefaultTypeMapping()))) {
                    AxisFault badEncodingFault = new AxisFault(
                            Constants.FAULT_SOAP12_DATAENCODINGUNKNOWN,
                            "bad encoding style", null, null);
                    throw badEncodingFault;
View Full Code Here

TOP

Related Classes of javax.xml.rpc.encoding.TypeMapping

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.