Examples of WSDLInterfaceOperationInput


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

      WSDLBindingOperation bindingOperation = wsdlOperation.getBindingOperation();
      if (bindingOperation == null)
         throw new WSException("Could not locate binding operation for:" + opMetaData.getQName());

      // RPC has one input
      WSDLInterfaceOperationInput input = wsdlOperation.getInputs()[0];
      int wsdlPosition = 0;
      for (WSDLRPCPart part : input.getChildParts())
      {
         QName xmlType = part.getType();
         String partName = part.getName();
         QName xmlName = new QName(partName);
View Full Code Here

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

   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);

            WrappedParameter wrapped = new WrappedParameter(new QName(elementName), partMapping.getParamType(), variable, partMapping.getParamPosition());

            String parameterMode = wsdlMessageMapping.getParameterMode();
            if (parameterMode == null || parameterMode.length() < 2)
               throw new IllegalArgumentException("Invalid parameter mode for element: " + elementName);

            if (!"OUT".equals(parameterMode))
               wrappedParameters.add(wrapped);
            if (!"IN".equals(parameterMode))
            {
               wrapped.setHolder(true);
               // wrapped parameters can not be shared between request/response objects (accessors)
               if ("INOUT".equals(parameterMode))
                  wrapped = new WrappedParameter(wrapped);
               wrappedResponseParameters.add(wrapped);
            }
         }
         inMetaData.setWrappedParameters(wrappedParameters);
         wsdlPosition = wrappedParameters.size();
      }
      else
      {
         if (seiMethodMapping != null)
         {
            MethodParamPartsMapping part = seiMethodMapping.getMethodParamPartsMappingByPartName(input.getPartName());
            if (part != null)
            {
               inMetaData.setJavaTypeName(part.getParamType());
               inMetaData.setIndex(part.getParamPosition());
            }
View Full Code Here

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

   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
         {
            if (param.getMode() != ParameterMode.OUT)
            {
               input.setElement(param.getXmlName());
               input.setPartName(param.getPartName());
            }
            if (twoWay && param.getMode() != ParameterMode.IN)
            {
               output.setElement(param.getXmlName());
               output.setPartName(param.getPartName());
View Full Code Here

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

   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
         {
            QName xmlType = param.getXmlType();

            String ns = getNamespace(param.getJavaType(), xmlType.getNamespaceURI());
            QName newXmlType = new QName(ns, xmlType.getLocalPart());
            WSDLRPCPart part = new WSDLRPCPart(param.getPartName(), newXmlType);
            if (param.getMode() != ParameterMode.OUT)
               input.addChildPart(part);
            if (twoWay && param.getMode() != ParameterMode.IN)
               output.addChildPart(part);
         }
         addSignatureItem(interfaceOperation, param, false);
      }
View Full Code Here

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

               if (srcMessage.getPart(name) != null)
                  destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name));
            }
         }

         WSDLInterfaceOperationInput rpcInput = new WSDLInterfaceOperationInput(destOperation);
         for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(paramOrder))
         {
            // Skip SWA attachment parts
            if (ignorePart(srcPortType, srcPart))
               continue;

            if (Constants.URI_STYLE_DOCUMENT == destOperation.getStyle())
            {
               WSDLInterfaceOperationInput destInput = new WSDLInterfaceOperationInput(destOperation);
               QName elementName = messagePartToElementName(srcMessage, srcPart, destOperation);
               destInput.setElement(elementName);

               //Lets remember the Message name
               destInput.setMessageName(srcMessage.getQName());
               destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN, srcMessage.getQName().getLocalPart()));

               destInput.setPartName(srcPart.getName());
               processUnknownExtensibilityElements(srcMessage, destInput);

               destOperation.addInput(destInput);
            }
            else
View Full Code Here

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

            return srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
         }

         public void removeReference(QName element)
         {
            WSDLInterfaceOperationInput destIntfInput = destIntfOperation.getInput(element);
            if (destIntfInput != null)
               destIntfOperation.removeInput(element);
         }

         public void removeRPCPart(String partName)
         {
            WSDLInterfaceOperationInput operationInput = destIntfOperation.getInput(destIntfOperation.getName());
            operationInput.removeChildPart(partName);
         }
      };

      processBindingReference(srcWsdl, destBindingOperation, destIntfOperation, extList, input, srcBindingOperation, cb);
   }
View Full Code Here

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

      }
   }

   private void constructDOCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
   {
      WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
      WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(wiop);

      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
      MethodParamPartsMapping mpin = null;

      boolean holder = false;

      if (win != null)
      {
         QName xmlName = win.getElement();
         QName xmlType = win.getXMLType();
         String partName = win.getPartName();
         String wsdlMessageName = win.getMessageName().getLocalPart();
         XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());

         boolean wrapped = isWrapped();

         if (wrapped)
View Full Code Here

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

      return "";
   }

   private String getMode(WSDLInterfaceOperation op, String name)
   {
      WSDLInterfaceOperationInput in = WSDLUtils.getWsdl11Input(op);
      WSDLInterfaceOperationOutput out = WSDLUtils.getWsdl11Output(op);

      boolean i = false, o = false;
      if (in != null && in.getChildPart(name) != null)
         i = true;
      if (out != null && out.getChildPart(name) != null)
         o = true;

      if (i && o)
View Full Code Here

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

      return "IN";
   }

   private void constructRPCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
   {
      WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
      if (win == null)
         throw new WSException("RPC endpoints require an input message");
      String wsdlMessageName = win.getMessageName().getLocalPart();
      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());

      RPCSignature signature = new RPCSignature(wiop);
      int i = 0;
      for (WSDLRPCPart part : signature.parameters())
View Full Code Here

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

         //TODO: Take care of multiple outputs
         String returnType = null;

         StringBuilder paramBuffer = new StringBuilder();

         WSDLInterfaceOperationInput input = WSDLUtils.getWsdl11Input(op);
         WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(op);
         if (isDocument())
         {
            returnType = appendDocParameters(paramBuffer, input, output, bindingOperation);
         }
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.