/** * This method will create a new simple type binding with the passed in characters handler * and set this simple type as the simple type of the complex type the method was invoked on. * @param charactersHandler */ public void setSimpleType(CharactersHandler charactersHandler) { setSimpleType(new TypeBinding(charactersHandler)); }
if(el == null) el = addElement(qName, new TypeBinding());
private static void addXOPInclude(TypeBinding binding, SchemaBinding schema) { binding.setHandler(DefaultHandlers.XOP_HANDLER); if(binding.getParticle() != null) { throw new JBossXBRuntimeException( "XOP optimizable type has a particle which is unexpected, please, open a JIRA issue!" ); } TypeBinding anyUriType = schema.getType(Constants.QNAME_ANYURI); if(anyUriType == null) { log.warn("Type " + Constants.QNAME_ANYURI + " not bound."); } TypeBinding xopIncludeType = new TypeBinding(new QName(Constants.NS_XOP_INCLUDE, "Include")); xopIncludeType.setSchemaBinding(schema); xopIncludeType.addAttribute(new QName("href"), anyUriType, DefaultHandlers.ATTRIBUTE_HANDLER); xopIncludeType.setHandler(new XOPIncludeHandler(binding)); ElementBinding xopInclude = new ElementBinding(schema, new QName(Constants.NS_XOP_INCLUDE, "Include"), xopIncludeType); ParticleBinding particleBinding = new ParticleBinding(xopInclude); particleBinding.setMinOccurs(0); binding.addParticle(particleBinding); }
private void processExceptionMapping(SchemaBinding schemaBinding, ExceptionMapping exceptionMapping) { QName xmlType = exceptionMapping.getWsdlMessage(); String javaType = exceptionMapping.getExceptionType(); log.trace("processExceptionMapping: [xmlType=" + xmlType + ",javaType=" + javaType + "]"); if (schemaBinding.getType(xmlType) == null) { TypeBinding typeBinding = new TypeBinding(xmlType); ClassMetaData cmd = new ClassMetaData(); cmd.setUseNoArgCtor(Boolean.FALSE); cmd.setImpl(javaType); typeBinding.setClassMetaData(cmd); typeBinding.setSimple(false); schemaBinding.addType(typeBinding); } }
TypeBinding bootstrapType = new TypeBinding(new QName(NAMESPACE, "bootstrapType")); bootstrapType.setSimple(false); AllBinding bootstrapModel = new AllBinding(this);
TypeBinding bootstrapType = new TypeBinding(new QName(NAMESPACE, "bootstrapType")); bootstrapType.setSimple(false); AllBinding bootstrapModel = new AllBinding(this);
sequence.addParticle(particle); TypeBinding type = new TypeBinding(); type.setParticle(new ParticleBinding(sequence)); sequence.addParticle(particle); TypeBinding type = new TypeBinding(); type.setHandler(unresolvedElementHandler); type.setSimpleType(unresolvedCharactersHandler);
TypeBinding baseType = baseTypeDef == null ? null : bindType(baseTypeDef); binding = baseType == null ? new TypeBinding(typeName) : new TypeBinding(typeName, baseType);
TypeBinding xopIncludeType = new TypeBinding(new QName(Constants.NS_XOP_INCLUDE, "Include")); xopIncludeType.setSchemaBinding(schema); xopIncludeType.addAttribute(new QName("href"), anyUriType, DefaultHandlers.ATTRIBUTE_HANDLER);
log.trace("binding complex " + (typeName == null ? "anonymous type" : "type " + typeName)); binding = new TypeBinding(typeName); binding.setBaseType(baseType); binding.setSimple(false);