Java Code Examples for javax.jws.soap.SOAPBinding#parameterStyle()
The following examples show how to use
javax.jws.soap.SOAPBinding#parameterStyle() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RuntimeModeler.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 2
Source File: RuntimeModeler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 3
Source File: RuntimeModeler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 4
Source File: RuntimeModeler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 5
Source File: RuntimeModeler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 6
Source File: RuntimeModeler.java From hottub with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 7
Source File: RuntimeModeler.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }
Example 8
Source File: RuntimeModeler.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
void processClass(Class clazz) { classUsesWebMethod = new HashSet<Class>(); determineWebMethodUse(clazz); WebService webService = getAnnotation(clazz, WebService.class); QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader); // String portTypeLocalName = clazz.getSimpleName(); // if (webService.name().length() >0) // portTypeLocalName = webService.name(); // // targetNamespace = webService.targetNamespace(); packageName = ""; if (clazz.getPackage() != null) packageName = clazz.getPackage().getName(); // if (targetNamespace.length() == 0) { // targetNamespace = getNamespace(packageName); // } // model.setTargetNamespace(targetNamespace); // QName portTypeName = new QName(targetNamespace, portTypeLocalName); targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); if (soapBinding != null) { if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle", soapBinding, clazz); } isWrapped = soapBinding.parameterStyle()== WRAPPED; } defaultBinding = createBinding(soapBinding); /* * if clazz != portClass then there is an SEI. If there is an * SEI, then all methods should be processed. However, if there is * no SEI, and the implementation class uses at least one * WebMethod annotation, then only methods with this annotation * will be processed. */ /* if (clazz == portClass) { WebMethod webMethod; for (Method method : clazz.getMethods()) { webMethod = getPrivMethodAnnotation(method, WebMethod.class); if (webMethod != null && !webMethod.exclude()) { usesWebMethod = true; break; } } }*/ for (Method method : clazz.getMethods()) { if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods if (method.getDeclaringClass() == Object.class) continue; if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used if (!isWebMethodBySpec(method, clazz)) continue; } else { if (!isWebMethod(method)) continue; } } // TODO: binding can be null. We need to figure out how to post-process // RuntimeModel to link to WSDLModel processMethod(method); } //Add additional jaxb classes referenced by {@link XmlSeeAlso} XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class); if(xmlSeeAlso != null) model.addAdditionalClasses(xmlSeeAlso.value()); }