@Override public Boolean isRPC(Method method) { SOAPBinding ann = method.getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.RPC); } ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.RPC); } return super.isRPC(method); }
private boolean isDocumentBare(Method method) { SOAPBinding ann = method.getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.DOCUMENT) && ann.parameterStyle().equals(SOAPBinding.ParameterStyle.BARE); } ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.DOCUMENT) && ann.parameterStyle().equals(SOAPBinding.ParameterStyle.BARE); } return false; }
@Override public Boolean isWrapped() { SOAPBinding ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return !(ann.parameterStyle().equals(ParameterStyle.BARE) || ann.style().equals(Style.RPC)); } return null; }
public void annotate(JavaAnnotatable ja) { JavaInterface intf; if (ja instanceof JavaInterface) { intf = (JavaInterface) ja; } else { throw new RuntimeException("BindingAnnotator can only annotate JavaInterface"); } if (processBinding(intf)) { JAnnotation bindingAnnotation = new JAnnotation(SOAPBinding.class); if (!SOAPBinding.Style.DOCUMENT.equals(intf.getSOAPStyle())) { bindingAnnotation.addElement(new JAnnotationElement("style", intf.getSOAPStyle())); } if (!SOAPBinding.Use.LITERAL.equals(intf.getSOAPUse())) { bindingAnnotation.addElement(new JAnnotationElement("use", intf.getSOAPUse())); } if (intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT && intf.getSOAPParameterStyle() != SOAPBinding.ParameterStyle.WRAPPED) { bindingAnnotation.addElement(new JAnnotationElement("parameterStyle", intf.getSOAPParameterStyle())); } intf.addAnnotation(bindingAnnotation); } for (JavaMethod method : intf.getMethods()) { if (!method.isAsync()) { method.annotate(new SoapBindingAnnotator()); } } }
public void annotate(JavaAnnotatable ja) { JavaMethod method; if (ja instanceof JavaMethod) { method = (JavaMethod) ja; } else { throw new RuntimeException("SOAPBindingAnnotator can only annotate JavaMethod"); } if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT) { if (!method.isWrapperStyle() && !SOAPBinding.ParameterStyle.BARE.equals(method.getInterface().getSOAPParameterStyle())) { JAnnotation bindingAnnotation = new JAnnotation(SOAPBinding.class); bindingAnnotation.addElement(new JAnnotationElement("parameterStyle", SOAPBinding.ParameterStyle.BARE)); method.addAnnotation("SOAPBinding", bindingAnnotation); } else if (method.isWrapperStyle() && SOAPBinding.ParameterStyle.BARE.equals(method.getInterface().getSOAPParameterStyle())) { JAnnotation bindingAnnotation = new JAnnotation(SOAPBinding.class); bindingAnnotation.addElement(new JAnnotationElement("parameterStyle", SOAPBinding.ParameterStyle.WRAPPED)); method.addAnnotation("SOAPBinding", bindingAnnotation); } } else if (!SOAPBinding.Style.RPC.equals(method.getInterface().getSOAPStyle())) { JAnnotation bindingAnnotation = new JAnnotation(SOAPBinding.class); bindingAnnotation.addElement(new JAnnotationElement("style", SOAPBinding.Style.RPC)); method.addAnnotation("SOAPBinding", bindingAnnotation); } }
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; }
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; }
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; }
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; }
@Override public Boolean isWrapped(Method m) { // see if someone overrode the default value if (getServiceFactory().getWrapped() != null) { return getServiceFactory().getWrapped(); } m = getDeclaredMethod(m); SOAPBinding ann = m.getAnnotation(SOAPBinding.class); if (ann != null) { if (ann.style().equals(Style.RPC)) { Message message = new Message("SOAPBinding_MESSAGE_RPC", LOG, m.getName()); throw new Fault(new JaxWsConfigurationException(message)); } return !(ann.parameterStyle().equals(ParameterStyle.BARE)); } return isWrapped(); }
private boolean isDocumentBare(Method method) { SOAPBinding ann = method.getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.DOCUMENT) && ann.parameterStyle().equals(SOAPBinding.ParameterStyle.BARE); } ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.DOCUMENT) && ann.parameterStyle().equals(SOAPBinding.ParameterStyle.BARE); } return false; }
@Override public Boolean isRPC(Method method) { SOAPBinding ann = method.getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.RPC); } ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return ann.style().equals(SOAPBinding.Style.RPC); } return super.isRPC(method); }
@Override public Boolean isWrapped() { SOAPBinding ann = implInfo.getEndpointClass().getAnnotation(SOAPBinding.class); if (ann != null) { return !(ann.parameterStyle().equals(ParameterStyle.BARE) || ann.style().equals(Style.RPC)); } return null; }
@Override public Boolean isWrapped(Method m) { // see if someone overrode the default value if (getServiceFactory().getWrapped() != null) { return getServiceFactory().getWrapped(); } m = getDeclaredMethod(m); SOAPBinding ann = m.getAnnotation(SOAPBinding.class); if (ann != null) { if (ann.style().equals(Style.RPC)) { Message message = new Message("SOAPBinding_MESSAGE_RPC", LOG, m.getName()); throw new Fault(new JaxWsConfigurationException(message)); } return !(ann.parameterStyle().equals(ParameterStyle.BARE)); } return isWrapped(); }