Package org.jboss.ws.metadata.jaxrpcmapping

Examples of org.jboss.ws.metadata.jaxrpcmapping.WsdlReturnValueMapping


      methodMapping.addMethodParamPartsMapping(paramMapping);
   }

   private void buildReturnParamMapping(ServiceEndpointMethodMapping methodMapping, String interfaceName, OperationMetaData operation, String name, String type)
   {
      WsdlReturnValueMapping returnMapping = new WsdlReturnValueMapping(methodMapping);
      returnMapping.setMethodReturnValue(type);
      returnMapping.setWsdlMessagePartName(name);
      String messageName = interfaceName + "_" + operation.getQName().getLocalPart() + "Response";
      QName messageQName = new QName(wsdl.getTargetNamespace(), messageName, "wsdlMsgNS");
      returnMapping.setWsdlMessage(messageQName);
      methodMapping.setWsdlReturnValueMapping(returnMapping);
   }
View Full Code Here


            String javaType = getJavaTypeAsString(xmlName, xmlType, nameSpace, array, primitive);

            if ((isDocStyle() == false && "void".equals(javaType)) == false)
            {
               WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
               wrvm.setMethodReturnValue(javaType);
               wrvm.setWsdlMessage(messageName);
               wrvm.setWsdlMessagePartName(partName);
               semm.setWsdlReturnValueMapping(wrvm);
            }
         }
      }
View Full Code Here

         if (xt instanceof XSSimpleTypeDefinition)
         {
            xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
         }

         WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
         wrvm.setMethodReturnValue(getJavaTypeAsString(xmlName, xmlType, nameSpace, false, true));
         QName messageName = WSDLUtils.getWsdl11Output(wiop).getMessageName();

         wrvm.setWsdlMessage(new QName(messageName.getNamespaceURI(), messageName.getLocalPart(), WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS));
         wrvm.setWsdlMessagePartName(partName);
         semm.setWsdlReturnValueMapping(wrvm);
      }

      if (bindingOperation != null)
      {
View Full Code Here

      methodMapping.addMethodParamPartsMapping(paramMapping);
   }

   private void buildReturnParamMapping(ServiceEndpointMethodMapping methodMapping, String interfaceName, OperationMetaData operation, String name, String type)
   {
      WsdlReturnValueMapping returnMapping = new WsdlReturnValueMapping(methodMapping);
      returnMapping.setMethodReturnValue(type);
      returnMapping.setWsdlMessagePartName(name);
      String messageName = interfaceName + "_" + operation.getQName().getLocalPart() + "Response";
      QName messageQName = new QName(wsdl.getTargetNamespace(), messageName, "wsdlMsgNS");
      returnMapping.setWsdlMessage(messageQName);
      methodMapping.setWsdlReturnValueMapping(returnMapping);
   }
View Full Code Here

/* 311 */         hasReturnMapping = false;
/* 312 */         mapped = true;
/*     */       }
/*     */       else
/*     */       {
/* 316 */         WsdlReturnValueMapping returnMapping = seiMethodMapping.getWsdlReturnValueMapping();
/* 317 */         if (returnMapping != null)
/*     */         {
/* 319 */           String mappingPart = returnMapping.getWsdlMessagePartName();
/* 320 */           if ((mappingPart != null) && (partName.equals(mappingPart)))
/*     */           {
/* 322 */             javaTypeName = returnMapping.getMethodReturnValue();
/* 323 */             hasReturnMapping = true;
/* 324 */             mapped = true;
/*     */           }
/*     */         }
/*     */       }
View Full Code Here

/* 783 */     if (opMetaData.isDocumentWrapped())
/*     */     {
/* 785 */       if (seiMethodMapping == null) {
/* 786 */         throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");
/*     */       }
/* 788 */       WsdlReturnValueMapping returnValueMapping = seiMethodMapping.getWsdlReturnValueMapping();
/* 789 */       if (returnValueMapping != null)
/*     */       {
/* 791 */         ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
/* 792 */         JavaWsdlMapping javaWsdlMapping = seiMapping.getJavaWsdlMapping();
/* 793 */         JavaXmlTypeMapping javaXmlTypeMapping = javaWsdlMapping.getTypeMappingForQName(xmlType);
/* 794 */         if (javaXmlTypeMapping == null) {
/* 795 */           throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);
/*     */         }
/* 797 */         Map map = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
/* 798 */         String elementName = returnValueMapping.getWsdlMessagePartName();
/* 799 */         String variable = (String)map.get(elementName);
/* 800 */         if (variable == null) {
/* 801 */           throw new IllegalArgumentException("Could not determine variable name for element: " + elementName);
/*     */         }
/* 803 */         String wrappedType = returnValueMapping.getMethodReturnValue();
/* 804 */         QName element = new QName(elementName);
/* 805 */         WrappedParameter wrappedParameter = new WrappedParameter(element, wrappedType, variable, -1);
/* 806 */         wrappedResponseParameters.add(0, wrappedParameter);
/*     */       }
/*     */
/* 809 */       outMetaData.setWrappedParameters(wrappedResponseParameters);
/*     */     }
/*     */     else
/*     */     {
/* 813 */       if (seiMethodMapping != null)
/*     */       {
/* 815 */         MethodParamPartsMapping part = seiMethodMapping.getMethodParamPartsMappingByPartName(opOutput.getPartName());
/* 816 */         String mode = null;
/* 817 */         if (part != null)
/*     */         {
/* 819 */           WsdlMessageMapping wsdlMessageMapping = part.getWsdlMessageMapping();
/* 820 */           mode = wsdlMessageMapping.getParameterMode();
/*     */         }
/* 822 */         if ("INOUT".equals(mode))
/*     */         {
/* 824 */           ParameterMetaData inMetaData = opMetaData.getParameter(xmlName);
/* 825 */           if (inMetaData != null)
/*     */           {
/* 827 */             inMetaData.setMode(ParameterMode.INOUT);
/* 828 */             return wsdlPosition;
/*     */           }
/*     */
/* 831 */           throw new WSException("Could not update IN parameter to be INOUT, as indicated in the mapping: " + opOutput.getPartName());
/*     */         }
/*     */
/* 834 */         if ("OUT".equals(mode))
/*     */         {
/* 836 */           hasReturnMapping = false;
/* 837 */           javaTypeName = part.getParamType();
/* 838 */           outMetaData.setIndex(part.getParamPosition());
/* 839 */           outMetaData.setJavaTypeName(javaTypeName);
/*     */         }
/*     */         else
/*     */         {
/* 843 */           WsdlReturnValueMapping returnValueMapping = seiMethodMapping.getWsdlReturnValueMapping();
/* 844 */           if (returnValueMapping != null)
/*     */           {
/* 846 */             javaTypeName = returnValueMapping.getMethodReturnValue();
/* 847 */             outMetaData.setJavaTypeName(javaTypeName);
/*     */           }
/*     */         }
/*     */       }
/*     */
View Full Code Here

/*     */         }
/* 321 */         String javaType = getJavaTypeAsString(xmlName, xmlType, array, primitive);
/*     */
/* 323 */         if (((!isDocStyle()) && ("void".equals(javaType)) ? 1 : 0) == 0)
/*     */         {
/* 325 */           WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
/* 326 */           wrvm.setMethodReturnValue(javaType);
/* 327 */           wrvm.setWsdlMessage(messageName);
/* 328 */           wrvm.setWsdlMessagePartName(partName);
/* 329 */           semm.setWsdlReturnValueMapping(wrvm);
/*     */         }
/*     */       }
/*     */     }
/*     */
View Full Code Here

/*     */
/* 457 */       XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
/* 458 */       if ((xt instanceof XSSimpleTypeDefinition)) {
/* 459 */         xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
/*     */       }
/* 461 */       WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
/* 462 */       wrvm.setMethodReturnValue(getJavaTypeAsString(xmlName, xmlType, false, true));
/* 463 */       QName messageName = WSDLUtils.getWsdl11Output(wiop).getMessageName();
/* 464 */       wrvm.setWsdlMessage(new QName(messageName.getNamespaceURI(), messageName.getLocalPart(), "wsdlMsgNS"));
/* 465 */       wrvm.setWsdlMessagePartName(partName);
/* 466 */       semm.setWsdlReturnValueMapping(wrvm);
/*     */     }
/*     */
/* 469 */     if (bindingOperation != null)
/*     */     {
View Full Code Here

/* 304 */     methodMapping.addMethodParamPartsMapping(paramMapping);
/*     */   }
/*     */
/*     */   private void buildReturnParamMapping(ServiceEndpointMethodMapping methodMapping, String interfaceName, OperationMetaData operation, String name, String type)
/*     */   {
/* 309 */     WsdlReturnValueMapping returnMapping = new WsdlReturnValueMapping(methodMapping);
/* 310 */     returnMapping.setMethodReturnValue(type);
/* 311 */     returnMapping.setWsdlMessagePartName(name);
/* 312 */     String messageName = interfaceName + "_" + operation.getQName().getLocalPart() + "Response";
/* 313 */     QName messageQName = new QName(this.wsdl.getTargetNamespace(), messageName, "wsdlMsgNS");
/* 314 */     returnMapping.setWsdlMessage(messageQName);
/* 315 */     methodMapping.setWsdlReturnValueMapping(returnMapping);
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.jaxrpcmapping.WsdlReturnValueMapping

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.