Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisBinding


            ArrayList bindings = new ArrayList();
            Map endpointsMap = service.getEndpoints();
         
            for (Iterator iterator = endpointsMap.values().iterator(); iterator.hasNext();) {
                AxisEndpoint endpoint = (AxisEndpoint) iterator.next();
                AxisBinding binding = endpoint.getBinding();
          AxisBindingOperation bindingOperation = new AxisBindingOperation();
          bindingOperation.setName(operation.getName());
          bindingOperation.setAxisOperation(operation);
     
          if (!bindings.contains(binding.getName())) {
              if (isSoap11Binding(binding)) {
                  String soapAction = operation.getSoapAction();
                  if (soapAction != null) {
                          bindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
                  }           
              } else if (isSoap12Binding(binding)) {
                  String soapAction = operation.getSoapAction();
                  if (soapAction != null) {
                      bindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
                  }
         
              } else if (isHttpBinding(binding)) {
                  String serviceName = service.getName();
                  String name = serviceName + "HttpBinding";
                  String httpLocation = serviceName + "/" + operation.getName().getLocalPart();
                  bindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocation);
              }
          }
     
          binding.addChild(bindingOperation.getName(), bindingOperation);
          populateBindingOperation(service, binding, bindingOperation);
         
            }
  }
View Full Code Here


    String serviceName = axisService.getName();
    String name = serviceName + "Soap11Binding";

    QName bindingName = new QName(name);

    AxisBinding axisBinding = (bindingCache != null) ? (AxisBinding) bindingCache
        .get(name)
        : null;
    if (axisBinding == null) {
      axisBinding = new AxisBinding();
      axisBinding.setName(bindingName);

      axisBinding.setType(Java2WSDLConstants.TRANSPORT_URI);
      axisBinding.setProperty(WSDLConstants.WSDL_1_1_STYLE,
          WSDLConstants.STYLE_DOC);

      axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_VERSION,
          SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

      for (Iterator iterator = axisService.getChildren(); iterator
          .hasNext();) {
        AxisOperation operation = (AxisOperation) iterator.next();
        AxisBindingOperation axisBindingOperation = new AxisBindingOperation();

        axisBindingOperation.setName(operation.getName());
        axisBindingOperation.setAxisOperation(operation);

        String soapAction = operation.getSoapAction();
        if (soapAction != null) {
          axisBindingOperation.setProperty(
              WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
        }
        axisBinding.addChild(axisBindingOperation.getName(),
            axisBindingOperation);
        populateBindingOperation(axisService, axisBinding,
            axisBindingOperation);
      }
      if (bindingCache != null) {
        bindingCache.put(name, axisBinding);
      }
    }
    axisBinding.setParent(axisEndpoint);
    axisEndpoint.setBinding(axisBinding);
  }
View Full Code Here

    String serviceName = axisService.getName();
    String name = serviceName + "Soap12Binding";

    QName bindingName = new QName(name);

    AxisBinding axisBinding = (bindingCache != null) ? (AxisBinding) bindingCache
        .get(name)
        : null;
    if (axisBinding == null) {
      axisBinding = new AxisBinding();
      axisBinding.setName(bindingName);

      axisBinding.setType(Java2WSDLConstants.TRANSPORT_URI);
      axisBinding.setProperty(WSDLConstants.WSDL_1_1_STYLE,
          WSDLConstants.STYLE_DOC);

      axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_VERSION,
          SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

      for (Iterator iterator = axisService.getChildren(); iterator
          .hasNext();) {
        AxisOperation operation = (AxisOperation) iterator.next();
        AxisBindingOperation axisBindingOperation = new AxisBindingOperation();

        axisBindingOperation.setName(operation.getName());
        axisBindingOperation.setAxisOperation(operation);

        String soapAction = operation.getSoapAction();
        if (soapAction != null) {
          axisBindingOperation.setProperty(
              WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
        }
        axisBinding.addChild(axisBindingOperation.getName(),
            axisBindingOperation);

        populateBindingOperation(axisService, axisBinding,
            axisBindingOperation);
      }
      if (bindingCache != null) {
        bindingCache.put(name, axisBinding);
      }
    }
    axisBinding.setParent(axisEndpoint);
    axisEndpoint.setBinding(axisBinding);
  }
View Full Code Here

            }
           
            return identityElement;
        }
       
        AxisBinding binding = endpoint.getBinding();
        if (binding != null) {
            identityElement = (OMElement) binding.getParameterValue(AddressingConstants.ADDRESSING_IDENTITY_PARAMETER);
        }
       
        //unwrap identity element if wrapped in a parameter element
        if (identityElement != null && identityElement.getLocalName().equals(DeploymentConstants.TAG_PARAMETER)) {
            identityElement = identityElement.getFirstElement();
        }
       
        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
            log.debug(String.format("getAddressingIdentityParameterValue: %s parameter from AxisBinding '%s': %s", AddressingConstants.ADDRESSING_IDENTITY_PARAMETER,
                binding.getName(), identityElement == null ? "N/A" : identityElement.toString()));
        }
       
        return identityElement;
    }
View Full Code Here

        }

        AxisBindingMessage bindingMessage =
          (AxisBindingMessage) getProperty(Constants.AXIS_BINDING_MESSAGE);

        AxisBinding binding;

        // If AxisBindingMessage is not set, try to find the binding message from the AxisService
        if (bindingMessage == null) {
          bindingMessage = findBindingMessage();
        }

        if (bindingMessage != null) {
            return bindingMessage.getEffectivePolicy();
            // If we can't find the AxisBindingMessage, then try the AxisBinding
        } else if ((binding = findBinding()) != null) {
            return binding.getEffectivePolicy();
            // If we can't find the AxisBindingMessage, then try the AxisMessage
        } else if (axisMessage != null) {
            return axisMessage.getEffectivePolicy();
        } else {
            if (axisService != null){
View Full Code Here

      if (axisService != null && axisOperation != null ) {
      if (axisService.getEndpointName() != null) {
        AxisEndpoint axisEndpoint = axisService
            .getEndpoint(axisService.getEndpointName());
        if (axisEndpoint != null) {
          AxisBinding axisBinding = axisEndpoint.getBinding();
                    AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisBinding
              .getChild(axisOperation.getName());

                    //If Binding Operation is not found, just return null
                    if (axisBindingOperation == null) {
                       return null;
View Full Code Here

        service.addOperation(axisOp);

        AxisEndpoint endpoint = new AxisEndpoint();
        endpoint.setName("NullService");

        AxisBinding binding = new AxisBinding();
        AxisBindingOperation bindingOp = new AxisBindingOperation();

        bindingOp.setName(axisOp.getName());
        bindingOp.setAxisOperation(axisOp);
        binding.addChild(bindingOp);
        endpoint.setBinding(binding);
        service.addEndpoint(endpoint.getName(), endpoint);
        service.setEndpointName(endpoint.getName());

        service.mapActionToOperation(operationName.getLocalPart(), axisOp);
View Full Code Here

        }

        AxisEndpoint axisEndpoint =
                (AxisEndpoint) messageContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
        if (axisEndpoint != null) {
            AxisBinding axisBinding = axisEndpoint.getBinding();
            String soapVersion =
                    (String) axisBinding.getProperty(WSDL2Constants.ATTR_WSOAP_VERSION);
            soapFactory = getSOAPFactory(soapVersion);
        } else {
            soapFactory = getSOAPFactory(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        }
        EndpointReference endpointReference = messageContext.getTo();
View Full Code Here

        service.addOperation(axisOp);

        AxisEndpoint endpoint = new AxisEndpoint();
        endpoint.setName("NullService");

        AxisBinding binding = new AxisBinding();
        AxisBindingOperation bindingOp = new AxisBindingOperation();

        bindingOp.setAxisOperation(axisOp);
        binding.addChild(bindingOp);
        endpoint.setBinding(binding);
        service.addEndpoint(endpoint.getName(), endpoint);
        service.setEndpointName(endpoint.getName());

        service.mapActionToOperation(operationName.getLocalPart(), axisOp);
View Full Code Here

        }

        AxisEndpoint axisEndpoint =
                (AxisEndpoint) messageContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
        if (axisEndpoint != null) {
            AxisBinding axisBinding = axisEndpoint.getBinding();
            String soapVersion =
                    (String) axisBinding.getProperty(WSDL2Constants.ATTR_WSOAP_VERSION);
            soapFactory = getSOAPFactory(soapVersion);
        } else {
            soapFactory = getSOAPFactory(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        }
        EndpointReference endpointReference = messageContext.getTo();
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisBinding

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.