Examples of XSDElementDeclaration


Examples of org.eclipse.xsd.XSDElementDeclaration

    if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_XSD_ELEMENT_ATTRIBUTE))
      {
      if (definition != null)
      {
          QName elementQName = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_XSD_ELEMENT_ATTRIBUTE));
          XSDElementDeclaration newElement = ((DefinitionImpl)definition).resolveElementDeclaration(elementQName.getNamespaceURI(), elementQName.getLocalPart());
          if (newElement != null && newElement != getXSDElement()) {
            setXSDElement(newElement);
          }
           
      }
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

  }
 
 
  <T> XSDElementDeclaration createFieldToElementMapping(CtMethod<T> m, ASTNodeData methodNodeData, ASTNodeData typeNodeData){
    String propertyName = getBeanPropertyName(m);
    XSDElementDeclaration el = null;
    if (!propertyName.equals("")){
      // default mapping
       if (m.getParameters().size() == 1 && m.getSimpleName().startsWith("set")){
        //scan(m.getParameters().get(0));
        resolveTypeReference(m.getParameters().get(0).getType(),typeNodeData);
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

    if (parentType.getContent() != null && parentType.getContent() instanceof XSDParticle){
      XSDParticle parentParticle = (XSDParticle)parentType.getContent();
      if (parentParticle.getContent() != null && parentParticle.getContent() instanceof XSDModelGroup){
        XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();
        XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
        XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
        localElementParticle.setContent(el);
        if (setTargetNamespace)
          el.setTargetNamespace(targetNamespace);
        if (!fieldType.getTargetNamespace().equals(parentType.getSchema().getTargetNamespace())){
          XSDSchema parentSchema = parentType.getSchema();
          XSDSchema fieldSchema = fieldType.getSchema();
         
          HashSet<XSDSchema> dependencies = schemaDependencies.get(parentSchema);
          if (fieldSchema != null){
            if (!dependencies.contains(fieldSchema) && !fieldSchema.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)){
              dependencies.add(fieldSchema);
            }
          }
        }
        el.setName(elementName);
        el.setTypeDefinition(fieldType);       
        parentModelGroup.getContents().add(localElementParticle);
        complexTypePropMap.get(parentType).add(el);
        return el;
      }
    }
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

      }   
    }
  }
 
  <T> XSDElementDeclaration createFieldTypeMapping(CtField<T> f, XSDTypeDefinition fieldType){
    XSDElementDeclaration el = null;
    XSDComplexTypeDefinition parentType = typeXSDComplexTypeMap.get(f.getDeclaringType());
    if (parentType != null && fieldType != null){
      //if (f.getAnnotation(javax.xml.bind.annotation.XmlElement.class) != null && f.getParent() instanceof CtClass)
      //  el = createJAXBFieldToElementMapping(f,parentType,fieldType);
      //else
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

    if (style == javax.jws.soap.SOAPBinding.Style.DOCUMENT && use == javax.jws.soap.SOAPBinding.Use.LITERAL){
      if (parameterStyle == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED){
        if (wsdlDocLitWrapResultMap.get(operation) == null){
          Part part = (Part)operation.getOutput().getMessage().getPart("parameters");
 
          XSDElementDeclaration parentElement = part.getElementDeclaration();
          XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition)parentElement.getType();       
          XSDParticle parentParticle = (XSDParticle)complexType.getContent();           
          XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();       
         
          XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
          el.setName(resultName);
          el.setTypeDefinition(xsdType);
         
          XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
          localElementParticle.setContent(el);                 
         
          parentModelGroup.getContents().add(localElementParticle);
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

    if (style == javax.jws.soap.SOAPBinding.Style.DOCUMENT && use == javax.jws.soap.SOAPBinding.Use.LITERAL){
      if (parameterStyle == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED){
        if (wsdlDocLitWrapParamMap.get(parameter) == null){
          Part part = (Part)operation.getInput().getMessage().getPart("parameters");
         
          XSDElementDeclaration parentElement = part.getElementDeclaration();
          XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition)parentElement.getType();
         
          XSDParticle parentParticle = (XSDParticle)complexType.getContent();           
          XSDModelGroup parentModelGroup = (XSDModelGroup)parentParticle.getContent();
          XSDParticle localElementParticle = XSDFactory.eINSTANCE.createXSDParticle();
          XSDElementDeclaration el = XSDFactory.eINSTANCE.createXSDElementDeclaration();
          localElementParticle.setContent(el);
          el.setName(paramName);
          el.setTypeDefinition(xsdType);         
          parentModelGroup.getContents().add(localElementParticle);
          if (wsdlDocLitParamElemMap.get(operation) == null)
            wsdlDocLitParamElemMap.put(operation, new LinkedList<XSDElementDeclaration>());
          wsdlDocLitParamElemMap.get(operation).add(el);
          wsdlDocLitWrapParamMap.put(parameter, el);
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

        particle.setContent(modelGroup);
       
        XSDComplexTypeDefinition complexType = XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
        complexType.setContent(particle);
       
        XSDElementDeclaration elIn = XSDFactory.eINSTANCE.createXSDElementDeclaration();
        elIn.setName(operationName);
        elIn.setAnonymousTypeDefinition(complexType);
        schema.getContents().add(elIn);
       
        Part partIn = WSDLFactory.eINSTANCE.createPart();
        partIn.setName("parameters");
        partIn.setElementDeclaration(elIn);
        operation.getInput().getMessage().addPart(partIn);
       
        particle = XSDFactory.eINSTANCE.createXSDParticle();
        modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
        modelGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
        particle.setContent(modelGroup);
       
        complexType = XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
        complexType.setContent(particle);
       
        XSDElementDeclaration elOut = XSDFactory.eINSTANCE.createXSDElementDeclaration();
        elOut.setName(operationName + "Response");
        elOut.setAnonymousTypeDefinition(complexType);
        schema.getContents().add(elOut);
       
        Part partOut = WSDLFactory.eINSTANCE.createPart();
        partOut.setName("parameters");
        partOut.setElementDeclaration(elOut);
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

        if (soapBinding == null ||
            (soapBinding != null &&
            soapBinding.style() == javax.jws.soap.SOAPBinding.Style.DOCUMENT &&
            soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL &&
            soapBinding.parameterStyle() == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)){
          XSDElementDeclaration el = wsdlDocLitParamElemMap.get(operation).get(argIndex);
          //toQuery.setValue("$" + tmp.getName() + "." + msgParts.get(0).getName() + "/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
          to.setPart(msgParts.get(0));
          toQuery.setValue("/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
          to.setQuery(toQuery);
        } else if (soapBinding != null &&
            soapBinding.style() == javax.jws.soap.SOAPBinding.Style.RPC &&
            soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL){
          //toQuery.setValue("$" + tmp.getName() + "." + msgParts.get(argIndex).getName());
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

    if (soapBinding == null ||
        (soapBinding != null &&
        soapBinding.style() == javax.jws.soap.SOAPBinding.Style.DOCUMENT &&
        soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL &&
        soapBinding.parameterStyle() == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)){
      XSDElementDeclaration el = wsdlDocLitWrapResultMap.get(operation);
      //fromQuery.setValue("$" + tmp.getName() + "." + msgParts.get(0).getName() + "/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
      from.setPart(msgParts.get(0));
      fromQuery.setValue("/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
      from.setQuery(fromQuery);
    } else if (soapBinding != null &&
        soapBinding.style() == javax.jws.soap.SOAPBinding.Style.RPC &&
        soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL){
      //fromQuery.setValue("$" + tmp.getName() + "." + msgParts.get(argIndex).getName());
View Full Code Here

Examples of org.eclipse.xsd.XSDElementDeclaration

        if (soapBinding == null ||
            (soapBinding != null &&
            soapBinding.style() == javax.jws.soap.SOAPBinding.Style.DOCUMENT &&
            soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL &&
            soapBinding.parameterStyle() == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)){
          XSDElementDeclaration el = wsdlDocLitParamElemMap.get(operation).get(argIndex);
          //fromQuery.setValue("$" + tmp.getName() + "." + msgParts.get(0).getName() + "/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
          from.setPart(msgParts.get(0));
          fromQuery.setValue("/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
          from.setQuery(fromQuery);
        } else if (soapBinding != null &&
            soapBinding.style() == javax.jws.soap.SOAPBinding.Style.RPC &&
            soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL){
          //fromQuery.setValue("$" + tmp.getName() + "." + msgParts.get(argIndex).getName());
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.