Package org.jboss.ws.metadata.wsdl

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


/* 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);
/*     */     }
/*     */
/* 390 */     interfaceOperation.addInput(input);
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);
/*     */       }
/*     */       else
View Full Code Here

/*     */
/* 442 */       String notificationRootElementNS = null;
/* 443 */       WSDLInterfaceOperation wsdlInterfaceOperation = wsdlInterface.getOperations()[0];
/* 444 */       if (wsdlInterfaceOperation.getOutputs().length > 0)
/*     */       {
/* 446 */         WSDLInterfaceOperationOutput wsdlInterfaceOperationOutput = wsdlInterfaceOperation.getOutputs()[0];
/* 447 */         notificationRootElementNS = wsdlInterfaceOperationOutput.getElement().getNamespaceURI();
/*     */       }
/*     */       else
/*     */       {
/* 453 */         throw new WSException("Unable to resolve eventing root element NS. No operation output found at " + wsdlInterfaceOperation.getName());
/*     */       }
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)
/*     */       {
/* 259 */         wrapped = unwrapRequest(semm, wsdlMessageName, xmlName.getLocalPart(), xt);
/*     */       }
/*     */
/* 262 */       if (!wrapped)
/*     */       {
/* 264 */         if ((xt instanceof XSSimpleTypeDefinition))
/* 265 */           xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
/* 266 */         String paramMode = "IN";
/* 267 */         holder = (output != null) && (xmlName.equals(output.getElement()));
/* 268 */         if (holder == true)
/*     */         {
/* 270 */           paramMode = "INOUT";
/*     */         }
/*     */
/* 273 */         mpin = getMethodParamPartsMapping(semm, xmlName, xmlType, 0, wsdlMessageName, paramMode, partName, false, true);
/* 274 */         semm.addMethodParamPartsMapping(mpin);
/*     */       }
/*     */     }
/*     */
/* 278 */     if ((!holder) && (output != null))
/*     */     {
/* 280 */       QName xmlName = output.getElement();
/* 281 */       QName xmlType = output.getXMLType();
/* 282 */       boolean primitive = true;
/*     */
/* 284 */       String targetNS = this.wsdlDefinitions.getTargetNamespace();
/* 285 */       QName messageName = new QName(targetNS, output.getMessageName().getLocalPart(), "wsdlMsgNS");
/*     */
/* 287 */       String partName = output.getPartName();
/* 288 */       String containingElement = xmlName.getLocalPart();
/* 289 */       boolean array = false;
/* 290 */       XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
/*     */
/* 292 */       ReturnTypeUnwrapper unwrapper = new ReturnTypeUnwrapper(xmlType, schemaModel, isWrapped());
View Full Code Here

/*     */   }
/*     */
/*     */   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)) {
/* 417 */       return "INOUT";
/*     */     }
View Full Code Here

/*    */   }
/*    */
/*    */   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;
View Full Code Here

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

      interfaceOperation.addInput(input);
View Full Code Here

               else destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name, Direction.OUT));
            }
         }
      }

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

         if (Constants.URI_STYLE_DOCUMENT == destOperation.getStyle())
         {
            WSDLInterfaceOperationOutput destOutput = new WSDLInterfaceOperationOutput(destOperation);

            QName elementName = messagePartToElementName(srcMessage, srcPart, destOperation, destBinding);
            destOutput.setElement(elementName);

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

            // Remember the original part name
            destOutput.setPartName(srcPart.getName());

            destOperation.addOutput(destOutput);
         }
         else
         {
View Full Code Here

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

         public void removeReference(QName element)
         {
            WSDLInterfaceOperationOutput destIntfOutput = destIntfOperation.getOutput(element);
            if (destIntfOutput != null)
               destIntfOperation.removeOutput(element);
         }

         public void removeRPCPart(String partName)
         {
            QName name = destIntfOperation.getName();
            WSDLInterfaceOperationOutput operationOutput = destIntfOperation.getOutput(new QName(name.getNamespaceURI(), name.getLocalPart() + "Response"));
            operationOutput.removeChildPart(partName);
         }
      };

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

      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());
            }
         }
         addSignatureItem(interfaceOperation, param, false);
      }
View Full Code Here

TOP

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

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.