Package org.jboss.ws.metadata.wsdl

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


                  exceptionMapping.setWsdlMessage(fault.getName());
                  jwm.addExceptionMappings(exceptionMapping);
               }
            }

            WSDLBindingOperation bindingOperation = HeaderUtil.getWSDLBindingOperation(wsdlDefinitions, op);
            if (bindingOperation != null)
            {
               constructHeaderJavaXmlTypeMapping(jwm, HeaderUtil.getSignatureHeaders(bindingOperation.getInputs()));
               constructHeaderJavaXmlTypeMapping(jwm, HeaderUtil.getSignatureHeaders(bindingOperation.getOutputs()));
            }

         }//end for
      }
   }
View Full Code Here


public class HeaderUtil
{

   public static WSDLBindingOperation getWSDLBindingOperation(final WSDLDefinitions wsdl, final WSDLInterfaceOperation operation)
   {
      WSDLBindingOperation bindingOperation = null;

      WSDLInterface wsdlInterface = operation.getWsdlInterface();
      QName operationName = operation.getName();

      WSDLBinding binding = wsdl.getBindingByInterfaceName(wsdlInterface.getName());
View Full Code Here

   }

   protected void processOperation(WSDLInterface wsdlInterface, WSDLBinding wsdlBinding, OperationMetaData operation)
   {
      WSDLInterfaceOperation interfaceOperation = new WSDLInterfaceOperation(wsdlInterface, operation.getQName());
      WSDLBindingOperation bindingOperation = new WSDLBindingOperation(wsdlBinding);

      interfaceOperation.setPattern(operation.isOneWay() ? Constants.WSDL20_PATTERN_IN_ONLY
            : Constants.WSDL20_PATTERN_IN_OUT);

      bindingOperation.setRef(operation.getQName());
      bindingOperation.setSOAPAction(operation.getSOAPAction());

      if (operation.getStyle() == Style.DOCUMENT)
         processOperationDOC(interfaceOperation, bindingOperation, operation);
      else
         processOperationRPC(interfaceOperation, bindingOperation, operation);
View Full Code Here

      WSDLBindingOperation[] operations = binding.getOperations();
      Arrays.sort(operations);

      for (int i = 0; i < operations.length; i++)
      {
         WSDLBindingOperation operation = operations[i];
         QName interfaceName = operation.getWsdlBinding().getInterfaceName();

         WSDLInterface wsdlInterface = wsdl.getInterface(interfaceName);
         if (wsdlInterface == null)
            throw new WSException("WSDL Interface should not be null");
         WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(operation.getRef());

         buffer.append("<operation name='" + interfaceOperation.getName().getLocalPart() + "'>");
         String soapAction = (operation.getSOAPAction() != null ? operation.getSOAPAction() : "");
         appendUnknownExtensibilityElements(buffer, operation);
         buffer.append("<" + soapPrefix + ":operation soapAction=\"" + soapAction + "\"/>");

         WSDLBindingOperationInput[] inputs = operation.getInputs();
         if (inputs.length != 1)
            throw new WSException("WSDl 1.1 only supports In-Only, and In-Out MEPS.");

         buffer.append("<input>");
         appendUnknownExtensibilityElements(buffer, inputs[0]);
         appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
         buffer.append("</input>");

         if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
         {
            buffer.append("<output>");
            WSDLBindingOperationOutput[] outputs = operation.getOutputs();
            appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
            buffer.append("</output>");
         }

         //Append faults
View Full Code Here

   private void validateBindingOperations(WSDLBinding binding)
   {
      WSDLBindingOperation[] operations = binding.getOperations();
      for (int i = 0; i < operations.length; i++)
      {
         WSDLBindingOperation op = operations[i];

         boolean found = false;
         Method[] methods = seiClass.getMethods();
         for (int j = 0; j < methods.length; j++)
         {
            Method method = methods[j];
            if (method.getName().equals(op.getRef().getLocalPart()))
            {
               if (found)
               {
                  errorList.add("duplicate method: " + method);
               }
               found = true;
            }
         }

         if (found == false)
            errorList.add("method not found for: " + op.getRef());
      }
   }
View Full Code Here

      log.trace("processBindingOperation: " + srcOperationName);

      WSDLInterface destInterface = destBinding.getInterface();
      String namespaceURI = destInterface.getName().getNamespaceURI();

      WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
      QName refQName = new QName(namespaceURI, srcOperationName);
      destBindingOperation.setRef(refQName);
      processUnknownExtensibilityElements(srcBindingOperation, destBindingOperation);
      destBinding.addOperation(destBindingOperation);

      String opName = srcOperationName;
      WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(opName);

      // Process soap:operation@soapAction, soap:operation@style
      List<ExtensibilityElement> extList = srcBindingOperation.getExtensibilityElements();
      for (ExtensibilityElement extElement : extList)
      {
         if (extElement instanceof SOAPOperation)
         {
            SOAPOperation soapOp = (SOAPOperation)extElement;
            destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
         }
         else if (extElement instanceof SOAP12Operation)
         {
            SOAP12Operation soapOp = (SOAP12Operation)extElement;
            destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
         }
      }

      BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
      if (srcBindingInput != 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
         bindingReferences = bindingOperation.getOutputs();

      if (bindingReferences.length > 1)
         throw new IllegalArgumentException("WSDl 1.1 only supports In-Only, and In-Out MEPS, more than reference input found");

      if (bindingReferences.length == 1)
View Full Code Here

      WSDLBindingOperation[] operations = binding.getOperations();
      Arrays.sort(operations);

      for (int i = 0; i < operations.length; i++)
      {
         WSDLBindingOperation operation = operations[i];
         QName interfaceName = operation.getWsdlBinding().getInterfaceName();

         WSDLInterface wsdlInterface = wsdl.getInterface(interfaceName);
         if (wsdlInterface == null)
            throw new WSException("WSDL Interface should not be null");
         WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(operation.getRef());

         buffer.append("<operation name='" + interfaceOperation.getName().getLocalPart() + "'>");
         String soapAction = (operation.getSOAPAction() != null ? operation.getSOAPAction() : "");
         appendUnknownExtensibilityElements(buffer, operation);
         buffer.append("<" + soapPrefix + ":operation soapAction=\"" + soapAction + "\"/>");

         WSDLBindingOperationInput[] inputs = operation.getInputs();
         if (inputs.length != 1)
            throw new WSException("WSDl 1.1 only supports In-Only, and In-Out MEPS.");

         buffer.append("<input>");
         appendUnknownExtensibilityElements(buffer, inputs[0]);
         appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
         buffer.append("</input>");

         if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
         {
            buffer.append("<output>");
            WSDLBindingOperationOutput[] outputs = operation.getOutputs();
            appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
            buffer.append("</output>");
         }

         //Append faults
View Full Code Here

   }

   protected void processOperation(WSDLInterface wsdlInterface, WSDLBinding wsdlBinding, OperationMetaData operation)
   {
      WSDLInterfaceOperation interfaceOperation = new WSDLInterfaceOperation(wsdlInterface, operation.getQName());
      WSDLBindingOperation bindingOperation = new WSDLBindingOperation(wsdlBinding);

      interfaceOperation.setPattern(operation.isOneWay() ? Constants.WSDL20_PATTERN_IN_ONLY
            : Constants.WSDL20_PATTERN_IN_OUT);

      bindingOperation.setRef(operation.getQName());
      bindingOperation.setSOAPAction(operation.getSOAPAction());

      if (operation.getStyle() == Style.DOCUMENT)
         processOperationDOC(interfaceOperation, bindingOperation, operation);
      else
         processOperationRPC(interfaceOperation, bindingOperation, operation);
View Full Code Here

   }

   protected void processOperation(WSDLInterface wsdlInterface, WSDLBinding wsdlBinding, OperationMetaData operation)
   {
      WSDLInterfaceOperation interfaceOperation = new WSDLInterfaceOperation(wsdlInterface, operation.getQName());
      WSDLBindingOperation bindingOperation = new WSDLBindingOperation(wsdlBinding);

      interfaceOperation.setPattern(operation.isOneWay() ? Constants.WSDL20_PATTERN_IN_ONLY
            : Constants.WSDL20_PATTERN_IN_OUT);

      bindingOperation.setRef(operation.getQName());
      bindingOperation.setSOAPAction(operation.getSOAPAction());

      if (operation.getStyle() == Style.DOCUMENT)
         processOperationDOC(interfaceOperation, bindingOperation, operation);
      else
         processOperationRPC(interfaceOperation, bindingOperation, operation);
View Full Code Here

TOP

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

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.