Package org.jboss.ws.metadata.jaxrpcmapping

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


      serviceMapping.addPortMapping(portMapping);

      javaWsdlMapping.addServiceInterfaceMappings(serviceMapping);

      String interfaceName = endpoint.getPortTypeName().getLocalPart();
      ServiceEndpointInterfaceMapping seiMapping = new ServiceEndpointInterfaceMapping(javaWsdlMapping);
      seiMapping.setServiceEndpointInterface(endpoint.getServiceEndpointInterfaceName());
      seiMapping.setWsdlPortType(new QName(wsdl.getTargetNamespace(), interfaceName, "portTypeNS"));
      seiMapping.setWsdlBinding(new QName(wsdl.getTargetNamespace(), interfaceName + "Binding", "bindingNS"));
      for (OperationMetaData operation : endpoint.getOperations())
      {
         ServiceEndpointMethodMapping methodMapping = new ServiceEndpointMethodMapping(seiMapping);
         methodMapping.setJavaMethodName(operation.getJavaName());
         methodMapping.setWsdlOperation(operation.getQName().getLocalPart());
         boolean isWrapped = operation.isDocumentWrapped();
         methodMapping.setWrappedElement(isWrapped);
         int i = 0;
         for (ParameterMetaData param : operation.getParameters())
         {
            if (isWrapped && param.isInHeader() == false)
            {
               List<WrappedParameter> wrappedParameters = param.getWrappedParameters();
               for (WrappedParameter wrapped : wrappedParameters)
               {
                  String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());
                  String name = wrapped.getName().getLocalPart();

                  buildParamMapping(methodMapping, interfaceName, operation, name, type, "IN", false, i++);
               }
            }
            else
            {
               String name = param.getXmlName().getLocalPart();
               String type = JavaUtils.convertJVMNameToSourceName(param.getJavaTypeName(), endpoint.getClassLoader());
               buildParamMapping(methodMapping, interfaceName, operation, name, type, param.getMode().toString(), param.isInHeader(), i++);
            }
         }

         ParameterMetaData returnParam = operation.getReturnParameter();
         if (returnParam != null && ((! isWrapped) || (! returnParam.getWrappedParameters().isEmpty())))
         {
            String name, type;
            if (isWrapped)
            {
               WrappedParameter wrappedParameter = returnParam.getWrappedParameters().get(0);
               name = wrappedParameter.getName().getLocalPart();
               type = wrappedParameter.getType();
            }
            else
            {
               name = returnParam.getXmlName().getLocalPart();
               type = returnParam.getJavaTypeName();
            }

            type = JavaUtils.convertJVMNameToSourceName(type, endpoint.getClassLoader());

            buildReturnParamMapping(methodMapping, interfaceName, operation, name, type);
         }
         seiMapping.addServiceEndpointMethodMapping(methodMapping);

         for(FaultMetaData fmd : operation.getFaults())
         {
            String ns = getNamespace(fmd.getJavaType(), fmd.getXmlType().getNamespaceURI());
            QName newXmlType = new QName(ns, fmd.getXmlType().getLocalPart());
View Full Code Here


         String portName = wsdlintf.getName().getLocalPart();
         String javaPortName = utils.chopPortType(portName);
         if (wsdlDefinitions.getService(javaPortName) != null)
            javaPortName += "_PortType";

         ServiceEndpointInterfaceMapping seim = new ServiceEndpointInterfaceMapping(jwm);
         String className = ToolsUtils.firstLetterUpperCase(javaPortName);
         seim.setServiceEndpointInterface(getPackageName(targetNS) + "." + className);
         seim.setWsdlPortType(new QName(targetNS, portName, "portTypeNS"));
         seim.setWsdlBinding(new QName(targetNS, bindName, "bindingNS"));
         constructServiceEndpointMethodMapping(seim, wsdlintf);

         jwm.addServiceEndpointInterfaceMappings(seim);
      }
   }
View Full Code Here

            initEndpointBinding(wsdlEndpoint, epMetaData);

            // Init the service encoding style
            initEndpointEncodingStyle(epMetaData);

            ServiceEndpointInterfaceMapping seiMapping = null;
            if (javaWsdlMapping != null)
            {
               QName portType = wsdlEndpoint.getInterface().getName();
               seiMapping = javaWsdlMapping.getServiceEndpointInterfaceMappingByPortType(portType);
               if (seiMapping != null)
               {
                  epMetaData.setServiceEndpointInterfaceName(seiMapping.getServiceEndpointInterface());
               }
               else
               {
                  log.warn("Cannot obtain the SEI mapping for: " + portType);
               }
View Full Code Here

      serviceMapping.addPortMapping(portMapping);

      javaWsdlMapping.addServiceInterfaceMappings(serviceMapping);

      String interfaceName = endpoint.getPortTypeName().getLocalPart();
      ServiceEndpointInterfaceMapping seiMapping = new ServiceEndpointInterfaceMapping(javaWsdlMapping);
      seiMapping.setServiceEndpointInterface(endpoint.getServiceEndpointInterfaceName());
      seiMapping.setWsdlPortType(new QName(wsdl.getTargetNamespace(), interfaceName, "portTypeNS"));
      seiMapping.setWsdlBinding(new QName(wsdl.getTargetNamespace(), interfaceName + "Binding", "bindingNS"));
      for (OperationMetaData operation : endpoint.getOperations())
      {
         ServiceEndpointMethodMapping methodMapping = new ServiceEndpointMethodMapping(seiMapping);
         methodMapping.setJavaMethodName(operation.getJavaName());
         methodMapping.setWsdlOperation(operation.getQName().getLocalPart());
         boolean isWrapped = operation.isDocumentWrapped();
         methodMapping.setWrappedElement(isWrapped);
         int i = 0;
         for (ParameterMetaData param : operation.getParameters())
         {
            if (isWrapped && param.isInHeader() == false)
            {
               List<WrappedParameter> wrappedParameters = param.getWrappedParameters();
               for (WrappedParameter wrapped : wrappedParameters)
               {
                  String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());
                  String name = wrapped.getName().getLocalPart();

                  buildParamMapping(methodMapping, interfaceName, operation, name, type, "IN", false, i++);
               }
            }
            else
            {
               String name = param.getXmlName().getLocalPart();
               String type = JavaUtils.convertJVMNameToSourceName(param.getJavaTypeName(), endpoint.getClassLoader());
               buildParamMapping(methodMapping, interfaceName, operation, name, type, param.getMode().toString(), param.isInHeader(), i++);
            }
         }

         ParameterMetaData returnParam = operation.getReturnParameter();
         if (returnParam != null && ((! isWrapped) || (! returnParam.getWrappedParameters().isEmpty())))
         {
            String name, type;
            if (isWrapped)
            {
               WrappedParameter wrappedParameter = returnParam.getWrappedParameters().get(0);
               name = wrappedParameter.getName().getLocalPart();
               type = wrappedParameter.getType();
            }
            else
            {
               name = returnParam.getXmlName().getLocalPart();
               type = returnParam.getJavaTypeName();
            }

            type = JavaUtils.convertJVMNameToSourceName(type, endpoint.getClassLoader());

            buildReturnParamMapping(methodMapping, interfaceName, operation, name, type);
         }
         seiMapping.addServiceEndpointMethodMapping(methodMapping);

         for(FaultMetaData fmd : operation.getFaults())
         {
            String ns = getNamespace(fmd.getJavaType(), fmd.getXmlType().getNamespaceURI());
            QName newXmlType = new QName(ns, fmd.getXmlType().getLocalPart());
View Full Code Here

/* 205 */           replaceAddressLocation(sepMetaData);
/*     */
/* 207 */           String seiName = pcMetaData.getServiceEndpointInterface();
/* 208 */           sepMetaData.setServiceEndpointInterfaceName(seiName);
/*     */
/* 210 */           ServiceEndpointInterfaceMapping seiMapping = javaWsdlMapping.getServiceEndpointInterfaceMapping(seiName);
/* 211 */           if (seiMapping == null) {
/* 212 */             this.log.warn("Cannot obtain SEI mapping for: " + seiName);
/*     */           }
/*     */
/* 215 */           processEndpointMetaDataExtensions(sepMetaData, wsdlDefinitions);
View Full Code Here

/*     */
/* 202 */       initEndpointBinding(wsdlEndpoint, epMetaData);
/*     */
/* 205 */       initEndpointEncodingStyle(epMetaData);
/*     */
/* 207 */       ServiceEndpointInterfaceMapping seiMapping = null;
/* 208 */       if (javaWsdlMapping != null)
/*     */       {
/* 210 */         QName portType = wsdlEndpoint.getInterface().getName();
/* 211 */         seiMapping = javaWsdlMapping.getServiceEndpointInterfaceMappingByPortType(portType);
/* 212 */         if (seiMapping != null)
/*     */         {
/* 214 */           epMetaData.setServiceEndpointInterfaceName(seiMapping.getServiceEndpointInterface());
/*     */         }
/*     */         else
/*     */         {
/* 218 */           this.log.warn("Cannot obtain the SEI mapping for: " + portType);
/*     */         }
View Full Code Here

/* 637 */     if (inMetaData.getOperationMetaData().isDocumentWrapped())
/*     */     {
/* 639 */       if (seiMethodMapping == null) {
/* 640 */         throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");
/*     */       }
/* 642 */       ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
/* 643 */       JavaXmlTypeMapping javaXmlTypeMapping = seiMapping.getJavaWsdlMapping().getTypeMappingForQName(xmlType);
/* 644 */       if (javaXmlTypeMapping == null) {
/* 645 */         throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);
/*     */       }
/* 647 */       Map variableMap = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
/* 648 */       for (MethodParamPartsMapping partMapping : seiMethodMapping.getMethodParamPartsMappings())
View Full Code Here

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

/* 192 */       String portName = wsdlintf.getName().getLocalPart();
/* 193 */       String javaPortName = this.utils.chopPortType(portName);
/* 194 */       if (this.wsdlDefinitions.getService(javaPortName) != null) {
/* 195 */         javaPortName = javaPortName + "_PortType";
/*     */       }
/* 197 */       ServiceEndpointInterfaceMapping seim = new ServiceEndpointInterfaceMapping(jwm);
/* 198 */       seim.setServiceEndpointInterface(this.packageName + "." + javaPortName);
/* 199 */       seim.setWsdlPortType(new QName(targetNS, portName, "portTypeNS"));
/* 200 */       seim.setWsdlBinding(new QName(targetNS, bindName, "bindingNS"));
/* 201 */       constructServiceEndpointMethodMapping(seim, wsdlintf);
/*     */
/* 203 */       jwm.addServiceEndpointInterfaceMappings(seim);
/*     */     }
/*     */   }
View Full Code Here

/* 190 */     serviceMapping.addPortMapping(portMapping);
/*     */
/* 192 */     this.javaWsdlMapping.addServiceInterfaceMappings(serviceMapping);
/*     */
/* 194 */     String interfaceName = endpoint.getPortTypeName().getLocalPart();
/* 195 */     ServiceEndpointInterfaceMapping seiMapping = new ServiceEndpointInterfaceMapping(this.javaWsdlMapping);
/* 196 */     seiMapping.setServiceEndpointInterface(endpoint.getServiceEndpointInterfaceName());
/* 197 */     seiMapping.setWsdlPortType(new QName(this.wsdl.getTargetNamespace(), interfaceName, "portTypeNS"));
/* 198 */     seiMapping.setWsdlBinding(new QName(this.wsdl.getTargetNamespace(), interfaceName + "Binding", "bindingNS"));
/* 199 */     for (OperationMetaData operation : endpoint.getOperations())
/*     */     {
/* 201 */       ServiceEndpointMethodMapping methodMapping = new ServiceEndpointMethodMapping(seiMapping);
/* 202 */       methodMapping.setJavaMethodName(operation.getJavaName());
/* 203 */       methodMapping.setWsdlOperation(operation.getQName().getLocalPart());
/* 204 */       boolean isWrapped = operation.isDocumentWrapped();
/* 205 */       methodMapping.setWrappedElement(isWrapped);
/* 206 */       int i = 0;
/* 207 */       for (ParameterMetaData param : operation.getParameters())
/*     */       {
/* 209 */         if ((isWrapped) && (!param.isInHeader()))
/*     */         {
/* 211 */           List wrappedParameters = param.getWrappedParameters();
/* 212 */           for (WrappedParameter wrapped : wrappedParameters)
/*     */           {
/* 214 */             String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());
/* 215 */             String name = wrapped.getName().getLocalPart();
/*     */
/* 217 */             buildParamMapping(methodMapping, interfaceName, operation, name, type, "IN", false, i++);
/*     */           }
/*     */         }
/*     */         else
/*     */         {
/* 222 */           String name = param.getXmlName().getLocalPart();
/* 223 */           String type = JavaUtils.convertJVMNameToSourceName(param.getJavaTypeName(), endpoint.getClassLoader());
/* 224 */           buildParamMapping(methodMapping, interfaceName, operation, name, type, param.getMode().toString(), param.isInHeader(), i++);
/*     */         }
/*     */       }
/*     */
/* 228 */       ParameterMetaData returnParam = operation.getReturnParameter();
/* 229 */       if ((returnParam != null) && ((!isWrapped) || (!returnParam.getWrappedParameters().isEmpty())))
/*     */       {
/*     */         String type;
/*     */         String name;
/* 232 */         if (isWrapped)
/*     */         {
/* 234 */           WrappedParameter wrappedParameter = (WrappedParameter)returnParam.getWrappedParameters().get(0);
/* 235 */           String name = wrappedParameter.getName().getLocalPart();
/* 236 */           type = wrappedParameter.getType();
/*     */         }
/*     */         else
/*     */         {
/* 240 */           name = returnParam.getXmlName().getLocalPart();
/* 241 */           type = returnParam.getJavaTypeName();
/*     */         }
/*     */
/* 244 */         String type = JavaUtils.convertJVMNameToSourceName(type, endpoint.getClassLoader());
/*     */
/* 246 */         buildReturnParamMapping(methodMapping, interfaceName, operation, name, type);
/*     */       }
/* 248 */       seiMapping.addServiceEndpointMethodMapping(methodMapping);
/*     */
/* 250 */       for (FaultMetaData fmd : operation.getFaults())
/*     */       {
/* 252 */         JavaXmlTypeMapping typeMapping = (JavaXmlTypeMapping)this.mappedTypes.get(fmd.getXmlType());
/* 253 */         if (typeMapping == null) {
View Full Code Here

TOP

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

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.