Package org.eclipse.wst.wsdl

Examples of org.eclipse.wst.wsdl.Operation


  public void reconcileReferences(boolean deep)
  {
    if (element != null)
    {
      BindingOperation bop = (BindingOperation)getContainer();
      Operation op = bop.getEOperation();
      if (op != null)
      {
        setInput(op.getEInput());
      }
    }
    super.reconcileReferences(deep);
  }
View Full Code Here


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setOperation(Operation newOperation) {
    Operation oldOperation = operation;
    operation = newOperation;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BPELPackage.PARTNER_ACTIVITY__OPERATION, oldOperation, operation));
  }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setOperation(Operation newOperation) {
    Operation oldOperation = operation;
    operation = newOperation;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BPELPackage.ON_EVENT__OPERATION, oldOperation, operation));
  }
View Full Code Here

   */
 
  public static Operation getOperation(URI uri, PortType portType, Element activityElement, String operationAttribute) {
    if (!activityElement.hasAttribute(operationAttribute)) return null;
    String operationSignature = activityElement.getAttribute(operationAttribute);
    Operation operation = new OperationProxy(uri, portType, operationSignature);
    return operation;
  }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setOperation(Operation newOperation) {
    Operation oldOperation = operation;
    operation = newOperation;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BPELPackage.ON_MESSAGE__OPERATION, oldOperation, operation));
  }
View Full Code Here

    @SuppressWarnings("unchecked")
  public static Operation findOperation (PortType portType, String operationName) {              
        if (portType != null) {
          Iterator<Operation> it = portType.getOperations().iterator();
          while (it.hasNext()) {
                Operation operation = it.next();
                if (operation.getName().equals(operationName)) {
                    return operation;
                }
            }
        }
        return null;
View Full Code Here

    parameterNodeData.xsdTypeQName = typeNodeData.xsdTypeQName;
   
    if (parameterNodeData.xsdType != null && parameterNodeData.xsdTypeQName != null){
      if (parameter.getParent() instanceof CtMethod){
        CtMethod method = (CtMethod)parameter.getParent();
        Operation operation = methodOperationMap.get(method);
        if (operation != null){
          createWsdlParameterMapping(method,operation,parameter,typeNodeData.xsdType);
        }       
      }
    }
View Full Code Here

          Variable variable = fieldVariableMap.get(e);
          variable.updateElement();
          fireAddMappingEvent(new JbprocessElementMapping(e,variable.getElement()));
        }
        if (methodOperationMap.get(e) != null){
          Operation operation = methodOperationMap.get(e);
          operation.updateElement();
          fireAddMappingEvent(new JbprocessElementMapping(e,operation.getElement()));
        }
        if (typeXSDComplexTypeMap.get(e) != null){
          XSDComplexTypeDefinition complexType = typeXSDComplexTypeMap.get(e);
          complexType.updateElement();
          fireAddMappingEvent(new JbprocessElementMapping(e,complexType.getElement()));
View Full Code Here

      }
    }
  }
 
  <T> void createMethodResultToOperationResultMapping(CtMethod<T> m, XSDTypeDefinition xsdType){   
    Operation operation = methodOperationMap.get(m);
    if (operation != null){
      javax.jws.soap.SOAPBinding soapBinding = typeSoapBindingMap.get(m.getDeclaringType());
      String operationName = m.getSimpleName();
      javax.jws.WebMethod webMethodAnnotation = m.getAnnotation(javax.jws.WebMethod.class);
      if (webMethodAnnotation != null && !webMethodAnnotation.operationName().equals(""))
View Full Code Here

      if (wsdlDef.getTypes() == null)
        wsdlDef.setTypes(WSDLFactory.eINSTANCE.createTypes());
      PortType portType = typePortTypeMap.get(m.getDeclaringType());
      javax.jws.WebMethod webMethodAnnotation = m.getAnnotation(javax.jws.WebMethod.class);
      if (portType != null && webMethodAnnotation != null){ 
        Operation operation = methodOperationMap.get(m);
        if (operation == null) {
            operation = WSDLFactory.eINSTANCE.createOperation();       
          if (!webMethodAnnotation.operationName().equals(""))
            operationName = webMethodAnnotation.operationName();         
          operation.setName(operationName);
          operation.setUndefined(false);
          Input input = WSDLFactory.eINSTANCE.createInput();
          operation.setInput(input);
          Output output = WSDLFactory.eINSTANCE.createOutput();
          operation.setOutput(output);
          portType.addOperation(operation);
          Message inputMessage = WSDLFactory.eINSTANCE.createMessage();
          inputMessage.setQName(new QName(operation.getEnclosingDefinition().getTargetNamespace(), operationName));
          inputMessage.setUndefined(false);
          input.setMessage(inputMessage);
          wsdlDef.addMessage(inputMessage);
         
          Message outputMessage = WSDLFactory.eINSTANCE.createMessage();
          outputMessage.setQName(new QName(operation.getEnclosingDefinition().getTargetNamespace(), operationName + "Response"));
          outputMessage.setUndefined(false);
          output.setMessage(outputMessage);
          wsdlDef.addMessage(outputMessage);
          methodOperationMap.put(m,operation);
         
          createWsdlStyleMapping(m);
         
          ASTNodeData typeNodeData = new ASTNodeData();
          resolveTypeReference(m.getType(), typeNodeData);
          if (typeNodeData.xsdType != null)
            createMethodResultToOperationResultMapping(m,typeNodeData.xsdType);
         
          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()));
                faultMessage.addPart(part);
                faultMessage.setUndefined(false);
                wsdlDef.addMessage(faultMessage);
               
                Fault fault = WSDLFactory.eINSTANCE.createFault();
                fault.setName(complexType.getName());
                fault.setMessage(faultMessage);
               
                operation.addFault(fault);
              }
            }
          }
        }
      }     
View Full Code Here

TOP

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

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.