Examples of WSDLBindingOperationInput


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

   }

   private int processBindingParameters(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
         TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int wsdlPosition)
   {
      WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
      for (WSDLSOAPHeader header : bindingInput.getSoapHeaders())
      {
         QName xmlName = header.getElement();
         QName xmlType = lookupSchemaType(wsdlOperation, xmlName);
         String partName = header.getPartName();

         ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation, seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++, !header
               .isIncludeInSignature());
         if (pmd != null)
            pmd.setInHeader(true);
      }
      for (WSDLMIMEPart mimePart : bindingInput.getMimeParts())
      {
         String partName = mimePart.getPartName();
         QName xmlName = new QName(partName);
         QName xmlType = mimePart.getXmlType();
View Full Code Here

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

   private int processDocElement(OperationMetaData operation, WSDLInterfaceOperation wsdlOperation, WSDLBindingOperation bindingOperation,
         ServiceEndpointMethodMapping seiMethodMapping, TypeMappingImpl typeMapping, List<WrappedParameter> wrappedParameters,
         List<WrappedParameter> wrappedResponseParameters)
   {
      WSDLInterfaceOperationInput input = wsdlOperation.getInputs()[0];
      WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
      int wsdlPosition;

      QName xmlName = input.getElement();
      QName xmlType = input.getXMLType();
      String javaTypeName = typeMapping.getJavaTypeName(xmlType);

      TypesMetaData typesMetaData = operation.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
      TypeMappingMetaData typeMetaData = typesMetaData.getTypeMappingByXMLType(xmlType);
      if (typeMetaData != null)
         javaTypeName = typeMetaData.getJavaTypeName();

      if (javaTypeName == null)
         throw new WSException("Cannot obtain java type mapping for: " + xmlType);

      // Check if we need to wrap the parameters
      boolean isWrapped = isWrapped(seiMethodMapping, javaTypeName);
      operation.getEndpointMetaData().setParameterStyle(isWrapped ? ParameterStyle.WRAPPED : ParameterStyle.BARE);

      ParameterMetaData inMetaData = new ParameterMetaData(operation, xmlName, xmlType, javaTypeName);
      operation.addParameter(inMetaData);

      // Set the variable names
      if (inMetaData.getOperationMetaData().isDocumentWrapped())
      {
         if (seiMethodMapping == null)
            throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");

         ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
         JavaXmlTypeMapping javaXmlTypeMapping = seiMapping.getJavaWsdlMapping().getTypeMappingForQName(xmlType);
         if (javaXmlTypeMapping == null)
            throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);

         Map<String, String> variableMap = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
         for (MethodParamPartsMapping partMapping : seiMethodMapping.getMethodParamPartsMappings())
         {
            WsdlMessageMapping wsdlMessageMapping = partMapping.getWsdlMessageMapping();
            if (wsdlMessageMapping.isSoapHeader())
               continue;

            if (wsdlMessageMapping == null)
               throw new IllegalArgumentException("wsdl-message-message mapping required for document/literal wrapped");

            String elementName = wsdlMessageMapping.getWsdlMessagePartName();

            // Skip attachments
            if (bindingInput.getMimePart(elementName) != null)
               continue;

            String variable = variableMap.get(elementName);
            if (variable == null)
               throw new IllegalArgumentException("Could not determine variable name for element: " + elementName);
View Full Code Here

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

   protected void processOperationDOC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
   {
      interfaceOperation.setStyle(Constants.URI_STYLE_DOCUMENT);

      WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
      WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);

      WSDLInterfaceOperationOutput output = null;
      WSDLBindingOperationOutput bindingOutput = null;

      boolean twoWay = !operation.isOneWay();
      if (twoWay)
      {
         output = new WSDLInterfaceOperationOutput(interfaceOperation);
         bindingOutput = new WSDLBindingOperationOutput(bindingOperation);

         ParameterMetaData returnParameter = operation.getReturnParameter();
         if (returnParameter != null)
         {
            QName xmlName = returnParameter.getXmlName();
            String partName = returnParameter.getPartName();
            if (returnParameter.isInHeader())
            {
               WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
               header.setIncludeInSignature(true);
               bindingOutput.addSoapHeader(header);
            }
            else
            {
               output.setElement(xmlName);
               output.setPartName(partName);
            }
            addSignatureItem(interfaceOperation, returnParameter, true);
         }

         // If there is no return parameter, it will most likely be set later with an INOUT or OUT parameter.
         // Otherwise, a null element means there is a 0 body element part, which is allowed by BP 1.0
         interfaceOperation.addOutput(output);
         bindingOperation.addOutput(bindingOutput);
      }

      for (ParameterMetaData param : operation.getParameters())
      {
         if (param.isInHeader())
         {
            WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
            header.setIncludeInSignature(true);
            if (param.getMode() != ParameterMode.OUT)
               bindingInput.addSoapHeader(header);
            if (twoWay && param.getMode() != ParameterMode.IN)
               bindingOutput.addSoapHeader(header);
         }
         else
         {
View Full Code Here

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

   protected void processOperationRPC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
   {
      interfaceOperation.setStyle(Constants.URI_STYLE_RPC);

      WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
      WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
      QName operationName = operation.getQName();
      input.setElement(operationName);

      WSDLInterfaceOperationOutput output = null;
      WSDLBindingOperationOutput bindingOutput = null;

      boolean twoWay = !operation.isOneWay();
      if (twoWay)
      {
         output = new WSDLInterfaceOperationOutput(interfaceOperation);
         bindingOutput = new WSDLBindingOperationOutput(bindingOperation);
         output.setElement(new QName(operationName.getNamespaceURI(), operationName.getLocalPart() + "Response"));

         ParameterMetaData returnParameter = operation.getReturnParameter();
         if (returnParameter != null)
         {
            QName xmlName = returnParameter.getXmlName();
            String partName = returnParameter.getPartName();
            if (returnParameter.isInHeader())
            {
               WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
               header.setIncludeInSignature(true);
               bindingOutput.addSoapHeader(header);
            }
            else
            {
               QName xmlType = returnParameter.getXmlType();
               String ns = getNamespace(returnParameter.getJavaType(), xmlType.getNamespaceURI());
               QName newXmlType = new QName(ns, xmlType.getLocalPart());
               WSDLRPCPart part = new WSDLRPCPart(partName, newXmlType);

               output.addChildPart(part);
            }
            addSignatureItem(interfaceOperation, returnParameter, true);
         }

         interfaceOperation.addOutput(output);
         bindingOperation.addOutput(bindingOutput);
      }

      for (ParameterMetaData param : operation.getParameters())
      {
         if (param.isInHeader())
         {
            WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
            header.setIncludeInSignature(true);
            if (param.getMode() != ParameterMode.OUT)
               bindingInput.addSoapHeader(header);
            if (twoWay && param.getMode() != ParameterMode.IN)
               bindingOutput.addSoapHeader(header);
         }
         else
         {
View Full Code Here

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

         final BindingOperation srcBindingOperation, BindingInput srcBindingInput) throws WSDLException
   {
      log.trace("processBindingInput");

      List<ExtensibilityElement> extList = srcBindingInput.getExtensibilityElements();
      WSDLBindingOperationInput input = new WSDLBindingOperationInput(destBindingOperation);
      processUnknownExtensibilityElements(srcBindingInput, input);
      destBindingOperation.addInput(input);

      ReferenceCallback cb = new ReferenceCallback() {
         public QName getXmlType(String partName)
View Full Code Here

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

         final BindingOperation srcBindingOperation, BindingInput srcBindingInput) throws WSDLException
   {
      log.trace("processBindingInput");

      List<ExtensibilityElement> extList = srcBindingInput.getExtensibilityElements();
      WSDLBindingOperationInput input = new WSDLBindingOperationInput(destBindingOperation);
      processUnknownExtensibilityElements(srcBindingInput, input);
      destBindingOperation.addInput(input);

      ReferenceCallback cb = new ReferenceCallback() {
         public QName getXmlType(String partName)
View Full Code Here

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

   protected void processOperationDOC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
   {
      interfaceOperation.setStyle(Constants.URI_STYLE_DOCUMENT);

      WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
      WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);

      WSDLInterfaceOperationOutput output = null;
      WSDLBindingOperationOutput bindingOutput = null;

      boolean twoWay = !operation.isOneWay();
      if (twoWay)
      {
         output = new WSDLInterfaceOperationOutput(interfaceOperation);
         bindingOutput = new WSDLBindingOperationOutput(bindingOperation);

         ParameterMetaData returnParameter = operation.getReturnParameter();
         if (returnParameter != null)
         {
            QName xmlName = returnParameter.getXmlName();
            String partName = returnParameter.getPartName();
            if (returnParameter.isInHeader())
            {
               WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
               header.setIncludeInSignature(true);
               bindingOutput.addSoapHeader(header);
            }
            else
            {
               output.setElement(xmlName);
               output.setPartName(partName);
            }
            addSignatureItem(interfaceOperation, returnParameter, true);
         }

         // If there is no return parameter, it will most likely be set later with an INOUT or OUT parameter.
         // Otherwise, a null element means there is a 0 body element part, which is allowed by BP 1.0
         interfaceOperation.addOutput(output);
         bindingOperation.addOutput(bindingOutput);
      }

      for (ParameterMetaData param : operation.getParameters())
      {
         if (param.isInHeader())
         {
            WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
            header.setIncludeInSignature(true);
            if (param.getMode() != ParameterMode.OUT)
               bindingInput.addSoapHeader(header);
            if (twoWay && param.getMode() != ParameterMode.IN)
               bindingOutput.addSoapHeader(header);
         }
         else
         {
View Full Code Here

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

   protected void processOperationRPC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
   {
      interfaceOperation.setStyle(Constants.URI_STYLE_RPC);

      WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
      WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
      QName operationName = operation.getQName();
      input.setElement(operationName);

      WSDLInterfaceOperationOutput output = null;
      WSDLBindingOperationOutput bindingOutput = null;

      boolean twoWay = !operation.isOneWay();
      if (twoWay)
      {
         output = new WSDLInterfaceOperationOutput(interfaceOperation);
         bindingOutput = new WSDLBindingOperationOutput(bindingOperation);
         output.setElement(new QName(operationName.getNamespaceURI(), operationName.getLocalPart() + "Response"));

         ParameterMetaData returnParameter = operation.getReturnParameter();
         if (returnParameter != null)
         {
            QName xmlName = returnParameter.getXmlName();
            String partName = returnParameter.getPartName();
            if (returnParameter.isInHeader())
            {
               WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
               header.setIncludeInSignature(true);
               bindingOutput.addSoapHeader(header);
            }
            else
            {
               QName xmlType = returnParameter.getXmlType();
               String ns = getNamespace(returnParameter.getJavaType(), xmlType.getNamespaceURI());
               QName newXmlType = new QName(ns, xmlType.getLocalPart());
               WSDLRPCPart part = new WSDLRPCPart(partName, newXmlType);

               output.addChildPart(part);
            }
            addSignatureItem(interfaceOperation, returnParameter, true);
         }

         interfaceOperation.addOutput(output);
         bindingOperation.addOutput(bindingOutput);
      }

      for (ParameterMetaData param : operation.getParameters())
      {
         if (param.isInHeader())
         {
            WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
            header.setIncludeInSignature(true);
            if (param.getMode() != ParameterMode.OUT)
               bindingInput.addSoapHeader(header);
            if (twoWay && param.getMode() != ParameterMode.IN)
               bindingOutput.addSoapHeader(header);
         }
         else
         {
View Full Code Here

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

   }

   private int processBindingParameters(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
         TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int wsdlPosition)
   {
      WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
      for (WSDLSOAPHeader header : bindingInput.getSoapHeaders())
      {
         QName xmlName = header.getElement();
         QName xmlType = lookupSchemaType(wsdlOperation, xmlName);
         String partName = header.getPartName();

         ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation, seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++, !header
               .isIncludeInSignature());
         if (pmd != null)
            pmd.setInHeader(true);
      }
      for (WSDLMIMEPart mimePart : bindingInput.getMimeParts())
      {
         String partName = mimePart.getPartName();
         QName xmlName = new QName(partName);
         QName xmlType = mimePart.getXmlType();
View Full Code Here

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

   private int processDocElement(OperationMetaData operation, WSDLInterfaceOperation wsdlOperation, WSDLBindingOperation bindingOperation,
         ServiceEndpointMethodMapping seiMethodMapping, TypeMappingImpl typeMapping, List<WrappedParameter> wrappedParameters,
         List<WrappedParameter> wrappedResponseParameters)
   {
      WSDLInterfaceOperationInput input = wsdlOperation.getInputs()[0];
      WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
      int wsdlPosition;

      QName xmlName = input.getElement();
      QName xmlType = input.getXMLType();
      String javaTypeName = typeMapping.getJavaTypeName(xmlType);

      TypesMetaData typesMetaData = operation.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
      TypeMappingMetaData typeMetaData = typesMetaData.getTypeMappingByXMLType(xmlType);
      if (typeMetaData != null)
         javaTypeName = typeMetaData.getJavaTypeName();

      if (javaTypeName == null)
         throw new WSException("Cannot obtain java type mapping for: " + xmlType);

      // Check if we need to wrap the parameters
      boolean isWrapped = isWrapped(seiMethodMapping, javaTypeName);
      operation.getEndpointMetaData().setParameterStyle(isWrapped ? ParameterStyle.WRAPPED : ParameterStyle.BARE);

      ParameterMetaData inMetaData = new ParameterMetaData(operation, xmlName, xmlType, javaTypeName);
      operation.addParameter(inMetaData);

      // Set the variable names
      if (inMetaData.getOperationMetaData().isDocumentWrapped())
      {
         if (seiMethodMapping == null)
            throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");

         ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
         JavaXmlTypeMapping javaXmlTypeMapping = seiMapping.getJavaWsdlMapping().getTypeMappingForQName(xmlType);
         if (javaXmlTypeMapping == null)
            throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);

         Map<String, String> variableMap = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
         for (MethodParamPartsMapping partMapping : seiMethodMapping.getMethodParamPartsMappings())
         {
            WsdlMessageMapping wsdlMessageMapping = partMapping.getWsdlMessageMapping();
            if (wsdlMessageMapping.isSoapHeader())
               continue;

            if (wsdlMessageMapping == null)
               throw new IllegalArgumentException("wsdl-message-message mapping required for document/literal wrapped");

            String elementName = wsdlMessageMapping.getWsdlMessagePartName();

            // Skip attachments
            if (bindingInput.getMimePart(elementName) != null)
               continue;

            String variable = variableMap.get(elementName);
            if (variable == null)
               throw new IllegalArgumentException("Could not determine variable name for element: " + elementName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.