Examples of TypeMapping


Examples of org.codehaus.xfire.aegis.type.TypeMapping

        this.typeMappingRegistry = typeMappingRegistry;
    }

    public void initializeTypes()
    {
        TypeMapping tm = typeMappingRegistry.getDefaultTypeMapping();
        tm.register(new CustomType());
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

        OperationInfo operation = service.getServiceInfo().getOperation("echo");
        MessagePartInfo mp = (MessagePartInfo) operation.getInputMessage().getMessageParts().get(0);

        AegisBindingProvider bp = (AegisBindingProvider) getBean("xfire.aegisBindingProvider");
       
        TypeMapping dtypeMapping = bp.getTypeMappingRegistry().getDefaultTypeMapping();

        TypeMapping typeMapping = bp.getTypeMapping(service);
        assertEquals(((CustomTypeMapping)typeMapping).getParent(), dtypeMapping);
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

    public void testDurationType() throws Exception
    {
        DefaultTypeMappingRegistry registry = new DefaultTypeMappingRegistry();
        registry.createDefaultMappings();
       
        TypeMapping tm = registry.getDefaultTypeMapping();
       
        MockControl readerControl = MockControl.createControl(MessageReader.class);
        MessageReader reader = (MessageReader) readerControl.getMock();
       
        reader.getValue();
        readerControl.setDefaultReturnValue("-P120D");
       
        readerControl.replay();
       
        DurationType dType = (DurationType) tm.getType(Duration.class);
        assertNotNull(dType);
        Duration d = (Duration) dType.readObject(reader, new MessageContext());
        assertEquals(120, d.getDays());
       
        readerControl.verify();
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

public class JibxTypeRegistry extends DefaultTypeMappingRegistry
{
   
    protected TypeMapping createTypeMapping(TypeMapping parent, boolean autoTypes)
    {
        TypeMapping tm = super.createTypeMapping(parent, autoTypes);
       
        createDefaultMappings(tm);
       
        return tm;
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

    public void testXMLGregorian() throws Exception
    {
        DefaultTypeMappingRegistry registry = new DefaultTypeMappingRegistry();
        registry.createDefaultMappings();
       
        TypeMapping tm = registry.getDefaultTypeMapping();

        Type type = tm.getType(XMLGregorianCalendar.class);
        assertEquals("dateTime", type.getSchemaType().getLocalPart());
       
        MockControl readerControl = MockControl.createControl(MessageReader.class);
        MessageReader reader = (MessageReader) readerControl.getMock();
       
        reader.getValue();
        readerControl.setDefaultReturnValue("---28");
       
        readerControl.replay();
       
        XMLGregorianCalendarType xType = (XMLGregorianCalendarType) tm.getType(XMLGregorianCalendar.class);
        assertNotNull(xType);
        XMLGregorianCalendar cal = (XMLGregorianCalendar) xType.readObject(reader, new MessageContext());
        assertEquals(28, cal.getDay());
       
        readerControl.verify();
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

        osf.setStyle(SoapConstants.STYLE_DOCUMENT);
        Service service = getServiceFactory().create(BeanService.class, "Bean", "urn:Bean", null);

        getServiceRegistry().register(service);

        TypeMapping tm = ((AegisBindingProvider) osf.getBindingProvider()).getTypeMapping(service);
       
        BeanType type = new BeanType();
        tm.register(SimpleBean.class, new QName("urn:Bean", "SimpleBean"), type);
       
        ServiceInfo info = service.getServiceInfo();
        OperationInfo o = info.getOperation("getSubmitBean");
        MessageInfo inMsg = o.getInputMessage();
        MessagePartInfo p = inMsg.getMessagePart(new QName("urn:Bean", "bean"));
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.TypeMapping

        service = getServiceFactory().create(BeanService.class);

        getServiceRegistry().register(service);

        ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory();
        TypeMapping tm = ((AegisBindingProvider) osf.getBindingProvider()).getTypeMapping(service);
       
        BeanType type = new BeanType();
        type.setTypeClass(SimpleBean.class);
        type.setSchemaType(new QName("urn:ReallyNotSoSimpleBean", "SimpleBean"));
        type.setTypeMapping(tm);
View Full Code Here

Examples of org.eclipse.persistence.internal.descriptors.TypeMapping

            }
            Object attributeValue = attributeValueEnum.next();
            if (attributeValue == Helper.getNullWrapper()) {
                attributeValue = null;
            }
            associations.addElement(new TypeMapping(fieldValue, attributeValue));
        }

        return associations;
    }
View Full Code Here

Examples of org.geotools.data.complex.config.TypeMapping

        config.setCatalog("mappedPolygons.oasis.xml");

        /**
         * Create mock TypeMapping objects to be set inside config in the test cases
         */
        dtoMappingName = new TypeMapping();
        dtoMappingName.setMappingName(MAPPING_NAME);
        dtoMappingName.setSourceDataStore(SOURCE_ID);
        dtoMappingName.setSourceTypeName(MAPPING_FILE);
        dtoMappingName.setTargetElementName(TARGET_ELEMENT_NAME);

        dtoNoMappingName = new TypeMapping();
        dtoNoMappingName.setSourceDataStore(SOURCE_ID);
        dtoNoMappingName.setSourceTypeName(MAPPING_FILE);
        dtoNoMappingName.setTargetElementName(TARGET_ELEMENT_NAME);
    }
View Full Code Here

Examples of org.jbpm.pvm.internal.type.TypeMapping

   
    TypesDescriptor typesDescriptor = new TypesDescriptor();
   
    List<Element> typeElements = XmlUtil.elements(element, "type");
    for (Element typeElement: typeElements) {
      TypeMapping typeMapping = parseTypeMapping(typeElement, parse, parser);
      typesDescriptor.addTypeMapping(typeMapping);
    }
    return typesDescriptor;
  }
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.