com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle Java Examples
The following examples show how to use
com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle.
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: WebServiceVisitor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #2
Source File: WebServiceVisitor.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #3
Source File: WebServiceVisitor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #4
Source File: WebServiceVisitor.java From hottub with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #5
Source File: WebServiceVisitor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #6
Source File: WebServiceVisitor.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #7
Source File: WebServiceVisitor.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #8
Source File: WebServiceVisitor.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected SOAPBinding popSoapBinding() { if (pushedSoapBinding) soapBindingStack.pop(); SOAPBinding soapBinding = null; if (!soapBindingStack.empty()) { soapBinding = soapBindingStack.peek(); if (soapBinding.style().equals(SOAPBinding.Style.RPC)) { soapStyle = SOAPStyle.RPC; wrapped = true; } else { soapStyle = SOAPStyle.DOCUMENT; wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED); } } else { pushedSoapBinding = false; } return soapBinding; }
Example #9
Source File: WebServiceVisitor.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #10
Source File: SeiGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #11
Source File: WebServiceWrapperGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #12
Source File: WebServiceVisitor.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #13
Source File: SeiGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #14
Source File: WebServiceWrapperGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #15
Source File: SeiGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #16
Source File: WebServiceWrapperGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #17
Source File: WebServiceVisitor.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #18
Source File: SeiGenerator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #19
Source File: WebServiceWrapperGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #20
Source File: WebServiceVisitor.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #21
Source File: SeiGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #22
Source File: SeiGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #23
Source File: WebServiceVisitor.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #24
Source File: WebServiceWrapperGenerator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #25
Source File: SeiGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #26
Source File: WebServiceWrapperGenerator.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #27
Source File: WebServiceVisitor.java From hottub with GNU General Public License v2.0 | 5 votes |
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) { boolean valid = true; if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) { // this is an error, cannot be OneWay and have a return type builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method); valid = false; } VariableElement outParam = getOutParameter(method); if (outParam != null) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam); valid = false; } if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) { int inCnt = getModeParameterCount(method, WebParam.Mode.IN); if (inCnt != 1) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method); valid = false; } } for (TypeMirror thrownType : method.getThrownTypes()) { TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement(); if (builder.isServiceException(thrownType)) { builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS( typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method); valid = false; } } return valid; }
Example #28
Source File: SeiGenerator.java From hottub with GNU General Public License v2.0 | 5 votes |
private void writeSOAPBinding(Port port, JDefinedClass cls) { JAnnotationUse soapBindingAnn = null; isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT); if(!isDocStyle){ soapBindingAnn = cls.annotate(SOAPBinding.class); soapBindingAnn.param("style", SOAPBinding.Style.RPC); port.setWrapped(true); } if(isDocStyle){ boolean first = true; boolean isWrapper = true; for(Operation operation:port.getOperations()){ if(first){ isWrapper = operation.isWrapped(); first = false; continue; } sameParamStyle = (isWrapper == operation.isWrapped()); if (!sameParamStyle) { break; } } if (sameParamStyle) { port.setWrapped(isWrapper); } } if(sameParamStyle && !port.isWrapped()){ if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } }
Example #29
Source File: WebServiceWrapperGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) { generateWrappers(method, webMethod); } generateExceptionBeans(method); }
Example #30
Source File: WebServiceVisitor.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public static boolean sameStyle(SOAPBinding.Style style, SOAPStyle soapStyle) { return style.equals(SOAPBinding.Style.DOCUMENT) && soapStyle.equals(SOAPStyle.DOCUMENT) || style.equals(SOAPBinding.Style.RPC) && soapStyle.equals(SOAPStyle.RPC); }