Package org.eclipse.wst.wsdl

Examples of org.eclipse.wst.wsdl.Part


  @SuppressWarnings("unchecked")
  <T> void createMethodResultToOperationResultMapping(CtMethod<T> m, Operation operation, String resultName, XSDTypeDefinition xsdType, javax.jws.soap.SOAPBinding.Style style, javax.jws.soap.SOAPBinding.Use use, javax.jws.soap.SOAPBinding.ParameterStyle parameterStyle){
    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);
          wsdlDocLitWrapResultMap.put(operation, el);
         
          XSDSchema schema = xsdType.getSchema();
          if (schema != null && !schema.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)){
            Vector<XSDSchema> dependencies = wsdlDependencies.get(operation.getEnclosingDefinition());
            if (!dependencies.contains(schema))
              dependencies.add(schema);
          }
        }
      } else {
       
      }
    } else if (style == javax.jws.soap.SOAPBinding.Style.RPC && use == javax.jws.soap.SOAPBinding.Use.LITERAL){
      if (wsdlRpcLitResultMap.get(m) == null){
        Part part = WSDLFactory.eINSTANCE.createPart();           
        part.setName(resultName);
        part.setTypeDefinition(xsdType);
        operation.getOutput().getMessage().addPart(part);
        wsdlRpcLitResultMap.put(m, part);
      }
    }
  }
View Full Code Here


         
          for (CtTypeReference<?> type : m.getThrownTypes()){
            if (type.getDeclaration() != null){
              if (exceptionTypes.contains(type.getDeclaration())){
                XSDComplexTypeDefinition complexType = typeXSDComplexTypeMap.get(type.getDeclaration());
                Part part = WSDLFactory.eINSTANCE.createPart();   
                part.setName(complexType.getName());
                part.setTypeDefinition(complexType);

                Message faultMessage = WSDLFactory.eINSTANCE.createMessage();
                //faultMessage.setQName(new QName(operation.getEnclosingDefinition().getTargetNamespace(), complexType.getName() + "Message"));
                faultMessage.setQName(new QName(operation.getEnclosingDefinition().getTargetNamespace(), complexType.getName()));
                //faultMessage.setQName(new QName(complexType.getName()));
View Full Code Here

  @SuppressWarnings("unchecked")
  <T> void createWsdlParameterMapping(CtMethod method, Operation operation, CtParameter<T> parameter, String paramName, XSDTypeDefinition xsdType, javax.jws.soap.SOAPBinding.Style style, javax.jws.soap.SOAPBinding.Use use, javax.jws.soap.SOAPBinding.ParameterStyle parameterStyle){
    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);
        }
      } else {
       
      }
    } else if (style == javax.jws.soap.SOAPBinding.Style.RPC && use == javax.jws.soap.SOAPBinding.Use.LITERAL){
      if (wsdlRpcLitParamMap.get(parameter) == null){
        Part part = WSDLFactory.eINSTANCE.createPart();           
        part.setName(paramName);
        part.setTypeDefinition(xsdType);
        operation.getInput().getMessage().addPart(part);
        wsdlRpcLitParamMap.put(parameter,part);
      }
    }
    XSDSchema schema = xsdType.getSchema();
View Full Code Here

        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);
        operation.getOutput().getMessage().addPart(partOut);
      } else {
       
      }
    } else if (style == javax.jws.soap.SOAPBinding.Style.RPC && use == javax.jws.soap.SOAPBinding.Use.LITERAL){
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsdl.Part

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.