Package org.jboss.ws.metadata.wsdl

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


         // Set the operation MEP
         if (Constants.WSDL20_PATTERN_IN_ONLY.equals(wsdlOperation.getPattern()))
            opMetaData.setOneWay(true);

         // Set the operation SOAPAction
         WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
         WSDLBindingOperation wsdlBindingOperation = wsdlBinding.getOperationByRef(opQName);
         if (wsdlBindingOperation != null)
            opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
      }
   }
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

      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

/*     */     else
/*     */     {
/* 184 */       log.warn("Cannot get service '" + epMetaData.getServiceMetaData().getServiceName() + "' from the given wsdl definitions!  Eventual policies attached to this service won't be considered.");
/*     */     }
/*     */
/* 189 */     WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(epMetaData.getPortTypeName());
/* 190 */     if (wsdlBinding != null)
/*     */     {
/* 192 */       List bindingPolicyRefList = wsdlBinding.getExtensibilityElements("http://www.jboss.org/jbossws/wsp/policyReference");
/* 193 */       processPolicies(bindingPolicyRefList, PolicyScopeLevel.WSDL_BINDING, localPolicyRegistry, epMetaData);
/*     */     }
/*     */     else
/*     */     {
/* 197 */       log.warn("Cannot get binding for portType '" + epMetaData.getPortTypeName() + "' from the given wsdl definitions!  Eventual policies attached to this binding won't be considered.");
View Full Code Here

/*     */     }
/*     */
/* 150 */     for (WSDLEndpoint wsdlEndpoint : wsdlService.getEndpoints())
/*     */     {
/* 152 */       QName bindingName = wsdlEndpoint.getBinding();
/* 153 */       WSDLBinding wsdlBinding = wsdlEndpoint.getWsdlService().getWsdlDefinitions().getBinding(bindingName);
/* 154 */       String bindingType = wsdlBinding.getType();
/* 155 */       if ((!"http://schemas.xmlsoap.org/wsdl/soap/".equals(bindingType)) && (!"http://schemas.xmlsoap.org/wsdl/soap12/".equals(bindingType)))
/*     */         continue;
/* 157 */       QName portName = wsdlEndpoint.getName();
/* 158 */       QName interfaceQName = wsdlEndpoint.getInterface().getName();
/* 159 */       ClientEndpointMetaData epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, interfaceQName, EndpointMetaData.Type.JAXWS);
View Full Code Here

/*     */
/* 262 */       if ("http://www.w3.org/2004/08/wsdl/in-only".equals(wsdlOperation.getPattern())) {
/* 263 */         opMetaData.setOneWay(true);
/*     */       }
/*     */
/* 266 */       WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
/* 267 */       WSDLBindingOperation wsdlBindingOperation = wsdlBinding.getOperationByRef(opQName);
/* 268 */       if (wsdlBindingOperation != null)
/* 269 */         opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
/*     */     }
/*     */   }
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.