Package org.jboss.ws.metadata.wsdl

Examples of org.jboss.ws.metadata.wsdl.WSDLBinding


         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      if (extension)
         endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      if (endpoint.getDocumentation() != null)
      {
View Full Code Here


         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      if (extension)
         endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      if (endpoint.getDocumentation() != null)
      {
View Full Code Here

   private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference reference)
   {
      WSDLInterfaceOperation wsdlOperation = reference.getWsdlOperation();
      WSDLInterface wsdlInterface = wsdlOperation.getWsdlInterface();
      WSDLBinding binding = wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getName());
      WSDLBindingOperation bindingOperation = binding.getOperationByRef(wsdlOperation.getName());
      WSDLBindingMessageReference[] bindingReferences;

      if (reference instanceof WSDLInterfaceOperationInput)
         bindingReferences = bindingOperation.getInputs();
      else
View Full Code Here

   protected void appendBindings(StringBuilder buffer, String namespace)
   {
      WSDLBinding[] bindings = wsdl.getBindings();
      for (int i = 0; i < bindings.length; i++)
      {
         WSDLBinding binding = bindings[i];
         if (!namespace.equals(binding.getName().getNamespaceURI()))
            continue;
         buffer.append("<binding name='" + binding.getName().getLocalPart() + "' type='" + getQNameRef(binding.getInterfaceName()) + "'>");
         //TODO:Need to derive the WSDLStyle from the Style attribute of InterfaceOperation
         if (wsdlStyle == null)
            throw new IllegalArgumentException("WSDL Style is null (should be rpc or document");
         String style = "rpc";
         if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
View Full Code Here

      }
   }

   private String getBindingOperationPattern(WSDLBindingOperation operation)
   {
      WSDLBinding binding = operation.getWsdlBinding();
      String pattern = binding.getInterface().getOperation(operation.getRef()).getPattern();

      return pattern;
   }
View Full Code Here

   /** Inititialize the endpoint binding */
   protected void initEndpointBinding(WSDLEndpoint wsdlEndpoint, EndpointMetaData epMetaData)
   {
      WSDLDefinitions wsdlDefinitions = wsdlEndpoint.getWsdlService().getWsdlDefinitions();
      WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
      WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
      initEndpointBinding(wsdlBinding, epMetaData);
   }
View Full Code Here

         for (WSDLEndpoint wsdlEndpoint : wsdlService.getEndpoints())
         {
            if (epMetaData.getPortName().equals(wsdlEndpoint.getName()))
            {
               QName bindQName = wsdlEndpoint.getBinding();
               WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(bindQName);
               if (wsdlBinding == null)
                  throw new WSException("Cannot obtain binding: " + bindQName);

               for (WSDLBindingOperation wsdlBindingOperation : wsdlBinding.getOperations())
               {
                  String encStyle = wsdlBindingOperation.getEncodingStyle();
                  epMetaData.setEncodingStyle(Use.valueOf(encStyle));
               }
            }
View Full Code Here

      while (it.hasNext())
      {
         Binding srcBinding = (Binding)it.next();
         QName srcQName = srcBinding.getQName();

         WSDLBinding destBinding = destWsdl.getBinding(srcQName);
         if (destBinding == null)
         {
            processBinding(srcWsdl, srcBinding);
         }
      }
View Full Code Here

   private WSDLBinding processBinding(Definition srcWsdl, Binding srcBinding) throws WSDLException
   {
      QName srcBindingQName = srcBinding.getQName();
      log.trace("processBinding: " + srcBindingQName);

      WSDLBinding destBinding = destWsdl.getBinding(srcBindingQName);
      if (destBinding == null)
      {
         PortType srcPortType = getDefinedPortType(srcBinding);

         String bindingType = null;
         List<ExtensibilityElement> extList = srcBinding.getExtensibilityElements();
         for (ExtensibilityElement extElement : extList)
         {
            QName elementType = extElement.getElementType();
            if (extElement instanceof SOAPBinding)
            {
               bindingType = Constants.NS_SOAP11;
            }
            else if (extElement instanceof SOAP12Binding)
            {
               bindingType = Constants.NS_SOAP12;
            }
            else if (extElement instanceof HTTPBinding)
            {
               bindingType = Constants.NS_HTTP;
            }
            else if ("binding".equals(elementType.getLocalPart()))
            {
               log.warn("Unsupported binding: " + elementType);
               bindingType = elementType.getNamespaceURI();
            }
         }

         if (bindingType == null)
            throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot obtain binding type for: " + srcBindingQName);

         if (Constants.NS_SOAP11.equals(bindingType) || Constants.NS_SOAP12.equals(bindingType) || Constants.NS_HTTP.equals(bindingType))
         {
            destBinding = new WSDLBinding(destWsdl, srcBindingQName);
            destBinding.setInterfaceName(srcPortType.getQName());
            destBinding.setType(bindingType);
            processUnknownExtensibilityElements(srcBinding, destBinding);
            destWsdl.addBinding(destBinding);

            preProcessSWAParts(srcBinding, srcWsdl);
            processPortType(srcWsdl, srcPortType, destBinding);
View Full Code Here

      WSDLEndpoint destEndpoint = new WSDLEndpoint(destService, endpointName);
      destEndpoint.setBinding(srcBinding.getQName());
      destEndpoint.setAddress(getSOAPAddress(srcPort));
      processUnknownExtensibilityElements(srcPort, destEndpoint);

      WSDLBinding destBinding = processBinding(srcWsdl, srcBinding);
      if (destBinding != null)
         destService.addEndpoint(destEndpoint);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsdl.WSDLBinding

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.