Package org.jboss.ws.metadata.wsdl.xmlschema

Examples of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel


            return sepMetaData;

         // Sanity check: read the generated WSDL and initialize the schema model
         // Note, this should no longer be needed, look into removing it
         WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
         JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
         serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);

         // Note, that @WebContext needs to be defined on the endpoint not the SEI
         processWebContext(dep, sepClass, linkName, sepMetaData);
View Full Code Here


   {
      QName xmlType = paramMetaData.getXmlType();

      // An XOP parameter is detected if it is a complex type that derives from xsd:base64Binary
      WSDLTypes wsdlTypes = operation.getWsdlInterface().getWsdlDefinitions().getWsdlTypes();
      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlTypes);
      String localPart = xmlType.getLocalPart() != null ? xmlType.getLocalPart() : "";
      String ns = xmlType.getNamespaceURI() != null ? xmlType.getNamespaceURI() : "";
      XSTypeDefinition xsType = schemaModel.getTypeDefinition(localPart, ns);
      XOPScanner scanner = new XOPScanner();
      if (scanner.findXOPTypeDef(xsType) != null | (localPart.equals("base64Binary") && ns.equals(Constants.NS_SCHEMA_XSD)))
      {
         // FIXME: read the xmime:contentType from the element declaration
         // See SchemaUtils#findXOPTypeDef(XSTypeDefinition typeDef) for details
View Full Code Here

         TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
         SerializerFactory serFactory = typeMapping.getSerializer(javaType, xmlType);
         if (serFactory instanceof JBossXBSerializerFactory)
         {
            SchemaGenerator xsdGenerator = new SchemaGenerator();
            JBossXSModel model = xsdGenerator.generateXSDSchema(xmlType, javaType);
            typesMetaData.addSchemaModel(model);
         }
      }
   }
View Full Code Here

   protected void generateType(QName xmlType, Class javaType, Map<String, QName> elementNames) throws IOException
   {
      if(Holder.class.isAssignableFrom(javaType))
         javaType = WSDLUtils.getInstance().getJavaTypeForHolder(javaType);
      JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType, elementNames);
      String namespace = getNamespace(javaType, xmlType.getNamespaceURI());
      //  Now that the schema object graph is built,
      //  ask JavaToXSD to provide a list of xsmodels to be plugged
      //  into WSDLTypes
      if (xsModel == null)
View Full Code Here

   protected void generateElement(QName xmlName, QName xmlType)
   {
      WSDLTypes types = wsdl.getWsdlTypes();
      String namespaceURI = xmlType.getNamespaceURI();
      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(types);

      XSTypeDefinition type;
      if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
         type = SchemaUtils.getInstance().getSchemaBasicType(xmlType.getLocalPart());
      else
         type = schemaModel.getTypeDefinition(xmlType.getLocalPart(), namespaceURI);

      WSSchemaUtils utils = WSSchemaUtils.getInstance(schemaModel.getNamespaceRegistry(), null);
      JBossXSElementDeclaration element =
         utils.createGlobalXSElementDeclaration(xmlName.getLocalPart(), type, xmlName.getNamespaceURI());
      schemaModel.addXSElementDeclaration(element);

      wsdl.registerNamespaceURI(xmlName.getNamespaceURI(), null);
   }
View Full Code Here

   public SchemaBinding getSchemaBinding()
   {
      JavaWsdlMapping wsdlMapping = getJavaWsdlMapping();
      if (schemaBinding == null && getEncodingStyle() == Use.LITERAL && wsdlMapping != null)
      {
         JBossXSModel xsModel = types.getSchemaModel();
         SchemaBindingBuilder bindingBuilder = new SchemaBindingBuilder();
         schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
      }
      return schemaBinding;
   }
View Full Code Here

      if (definitions != null)
      {
         WSDLTypes types = definitions.getWsdlTypes();
         if (types != null)
         {
            JBossXSModel model = WSDLUtils.getSchemaModel(types);
            if (model != null)
               model.eagerInitialize();
         }
      }

      // Initialize jaxrpc-mapping data
      getJavaWsdlMapping();
View Full Code Here

         {
            ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
            String eventSourceNS = wsdlInterface.getName().getNamespaceURI() + "/" + wsdlInterface.getName().getLocalPart();

            // extract the schema model
            JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
            String[] notificationSchema = EventingUtils.extractNotificationSchema(schemaModel);

            // extract the root element NS
            String notificationRootElementNS = null;
            WSDLInterfaceOperation wsdlInterfaceOperation = wsdlInterface.getOperations()[0];
View Full Code Here

         }

         if (len > 0)
         {
            JavaToXSD jxsd = new JavaToXSD();
            JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
            WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
         }
      }
      else
      {
View Full Code Here

   private void constructDOCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
   {
      WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
      WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(wiop);

      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
      MethodParamPartsMapping mpin = null;

      boolean holder = false;

      if (win != null)
      {
         QName xmlName = win.getElement();
         QName xmlType = win.getXMLType();
         String partName = win.getPartName();
         String wsdlMessageName = win.getMessageName().getLocalPart();
         XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());

         boolean wrapped = isWrapped();

         if (wrapped)
         {
            wrapped = unwrapRequest(semm, wsdlMessageName, xmlName.getLocalPart(), xt);
         }

         if (wrapped == false)
         {
            if (xt instanceof XSSimpleTypeDefinition)
               xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
            String paramMode = "IN";
            holder = output != null && xmlName.equals(output.getElement());
            if (holder == true)
            {
               paramMode = "INOUT";
            }

            mpin = getMethodParamPartsMapping(semm, xmlName, xmlType, 0, wsdlMessageName, paramMode, partName, false, true);
            semm.addMethodParamPartsMapping(mpin);
         }
      }

      if (holder == false && output != null)
      {
         QName xmlName = output.getElement();
         QName xmlType = output.getXMLType();
         boolean primitive = true;

         String targetNS = wsdlDefinitions.getTargetNamespace();
         QName messageName = new QName(targetNS, output.getMessageName().getLocalPart(), WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS);

         String partName = output.getPartName();
         String containingElement = xmlName.getLocalPart();
         boolean array = false;
         XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());

         ReturnTypeUnwrapper unwrapper = new ReturnTypeUnwrapper(xmlType, schemaModel, isWrapped());
         if (unwrapper.unwrap())
         {
            if (unwrapper.unwrappedElement != null)
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel

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.