use of javax.jws.soap.SOAPBinding in project cxf by apache.
the class CodeGenTest method testSupportXMLBindingBare.
@Test
public void testSupportXMLBindingBare() throws Exception {
env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/xml_http_bare.wsdl"));
processor.setContext(env);
processor.execute();
Class<?> clz = classLoader.loadClass("org.apache.xml_http_bare.GreetingPortType");
Method method = clz.getMethod("sayHello", new Class[] { java.lang.String.class });
assertNotNull("sayHello is not be generated", method);
SOAPBinding soapBindingAnn = clz.getAnnotation(SOAPBinding.class);
assertEquals(soapBindingAnn.parameterStyle(), SOAPBinding.ParameterStyle.BARE);
}
use of javax.jws.soap.SOAPBinding in project cxf by apache.
the class JaxWsServiceConfiguration method isRPC.
@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);
}
use of javax.jws.soap.SOAPBinding in project cxf by apache.
the class JaxWsServiceConfiguration method isDocumentBare.
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;
}
use of javax.jws.soap.SOAPBinding in project cxf by apache.
the class JaxWsServiceConfiguration method isWrapped.
@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();
}
Aggregations