Package org.jboss.ws.metadata.wsdl

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


/*     */
/*     */   protected void processOperationRPC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
/*     */   {
/* 328 */     interfaceOperation.setStyle("http://www.w3.org/2004/03/wsdl/style/rpc");
/*     */
/* 330 */     WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
/* 331 */     WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
/* 332 */     QName operationName = operation.getQName();
/* 333 */     input.setElement(operationName);
/*     */
/* 335 */     WSDLInterfaceOperationOutput output = null;
/* 336 */     WSDLBindingOperationOutput bindingOutput = null;
/*     */
/* 338 */     boolean twoWay = !operation.isOneWay();
/* 339 */     if (twoWay)
/*     */     {
/* 341 */       output = new WSDLInterfaceOperationOutput(interfaceOperation);
/* 342 */       bindingOutput = new WSDLBindingOperationOutput(bindingOperation);
/* 343 */       output.setElement(new QName(operationName.getNamespaceURI(), operationName.getLocalPart() + "Response"));
/*     */
/* 345 */       ParameterMetaData returnParameter = operation.getReturnParameter();
/* 346 */       if (returnParameter != null)
/*     */       {
/* 348 */         QName xmlName = returnParameter.getXmlName();
/* 349 */         String partName = returnParameter.getPartName();
/* 350 */         if (returnParameter.isInHeader())
/*     */         {
/* 352 */           WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
/* 353 */           header.setIncludeInSignature(true);
/* 354 */           bindingOutput.addSoapHeader(header);
/*     */         }
/*     */         else
/*     */         {
/* 358 */           WSDLRPCPart part = new WSDLRPCPart(returnParameter.getPartName(), returnParameter.getXmlType());
/* 359 */           output.addChildPart(part);
/*     */         }
/* 361 */         addSignatureItem(interfaceOperation, returnParameter, true);
/*     */       }
/*     */
/* 364 */       interfaceOperation.addOutput(output);
/* 365 */       bindingOperation.addOutput(bindingOutput);
/*     */     }
/*     */
/* 368 */     for (ParameterMetaData param : operation.getParameters())
/*     */     {
/* 370 */       if (param.isInHeader())
/*     */       {
/* 372 */         WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
/* 373 */         header.setIncludeInSignature(true);
/* 374 */         if (param.getMode() != ParameterMode.OUT)
/* 375 */           bindingInput.addSoapHeader(header);
/* 376 */         if ((twoWay) && (param.getMode() != ParameterMode.IN))
/* 377 */           bindingOutput.addSoapHeader(header);
/*     */       }
/*     */       else
/*     */       {
/* 381 */         WSDLRPCPart part = new WSDLRPCPart(param.getPartName(), param.getXmlType());
/* 382 */         if (param.getMode() != ParameterMode.OUT)
/* 383 */           input.addChildPart(part);
/* 384 */         if ((twoWay) && (param.getMode() != ParameterMode.IN))
/* 385 */           output.addChildPart(part);
/*     */       }
/* 387 */       addSignatureItem(interfaceOperation, param, false);
/*     */     }
View Full Code Here


/*     */
/* 283 */       String returnType = null;
/*     */
/* 285 */       StringBuilder paramBuffer = new StringBuilder();
/*     */
/* 287 */       WSDLInterfaceOperationInput input = WSDLUtils.getWsdl11Input(op);
/* 288 */       WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(op);
/* 289 */       if (isDocument())
/*     */       {
/* 291 */         returnType = appendDocParameters(paramBuffer, input, output, bindingOperation);
/*     */       }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private void constructDOCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
/*     */   {
/* 239 */     WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
/* 240 */     WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(wiop);
/*     */
/* 242 */     JBossXSModel schemaModel = WSDLUtils.getSchemaModel(this.wsdlDefinitions.getWsdlTypes());
/* 243 */     MethodParamPartsMapping mpin = null;
/*     */
/* 245 */     boolean holder = false;
/*     */
/* 247 */     if (win != null)
/*     */     {
/* 249 */       QName xmlName = win.getElement();
/* 250 */       QName xmlType = win.getXMLType();
/* 251 */       String partName = win.getPartName();
/* 252 */       String wsdlMessageName = win.getMessageName().getLocalPart();
/* 253 */       XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
/*     */
/* 255 */       boolean wrapped = isWrapped();
/*     */
/* 257 */       if (wrapped)
View Full Code Here

/* 402 */     return "";
/*     */   }
/*     */
/*     */   private String getMode(WSDLInterfaceOperation op, String name)
/*     */   {
/* 407 */     WSDLInterfaceOperationInput in = WSDLUtils.getWsdl11Input(op);
/* 408 */     WSDLInterfaceOperationOutput out = WSDLUtils.getWsdl11Output(op);
/*     */
/* 410 */     boolean i = false; boolean o = false;
/* 411 */     if ((in != null) && (in.getChildPart(name) != null))
/* 412 */       i = true;
/* 413 */     if ((out != null) && (out.getChildPart(name) != null)) {
/* 414 */       o = true;
/*     */     }
/* 416 */     if ((i) && (o)) {
View Full Code Here

/* 422 */     return "IN";
/*     */   }
/*     */
/*     */   private void constructRPCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
/*     */   {
/* 427 */     WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
/* 428 */     if (win == null)
/* 429 */       throw new WSException("RPC endpoints require an input message");
/* 430 */     String wsdlMessageName = win.getMessageName().getLocalPart();
/* 431 */     JBossXSModel schemaModel = WSDLUtils.getSchemaModel(this.wsdlDefinitions.getWsdlTypes());
/*     */
/* 433 */     RPCSignature signature = new RPCSignature(wiop);
/* 434 */     int i = 0;
/* 435 */     for (WSDLRPCPart part : signature.parameters())
View Full Code Here

/* 47 */     return this.returnParameter;
/*    */   }
/*    */
/*    */   public RPCSignature(WSDLInterfaceOperation operation)
/*    */   {
/* 52 */     WSDLInterfaceOperationInput input = WSDLUtils.getWsdl11Input(operation);
/* 53 */     WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(operation);
/* 54 */     for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
/*    */     {
/* 56 */       if (item.getDirection() == WSDLRPCSignatureItem.Direction.RETURN)
/*    */       {
/* 58 */         if (output != null) {
/* 59 */           this.returnParameter = output.getChildPart(item.getName()); continue;
/*    */         }
/*    */       }
/*    */
/* 63 */       WSDLRPCPart part = null;
/* 64 */       if (input != null)
/* 65 */         part = input.getChildPart(item.getName());
/* 66 */       if ((output != null) && (part == null)) {
/* 67 */         part = output.getChildPart(item.getName());
/*    */       }
/* 69 */       if (part != null) {
/* 70 */         this.parameters.add(part);
/*    */       }
/*    */     }
/* 73 */     for (WSDLRPCPart part : input.getChildParts())
/*    */     {
/* 75 */       if (operation.getRpcSignatureitem(part.getName()) == null) {
/* 76 */         this.parameters.add(part);
/*    */       }
/*    */     }
/* 79 */     if (output != null)
/*    */     {
/* 81 */       for (WSDLRPCPart part : output.getChildParts())
/*    */       {
/* 83 */         if (operation.getRpcSignatureitem(part.getName()) == null)
/*    */         {
/* 86 */           if (input.getChildPart(part.getName()) != null) {
/*    */             continue;
/*    */           }
/* 89 */           if (this.returnParameter == null)
/*    */           {
/* 91 */             this.returnParameter = part;
View Full Code Here

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

            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

   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

   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

TOP

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

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.