Refine search
/** * * @param arg0 * @throws HandlingReportErrors_Exception */ @WebMethod @RequestWrapper(localName = "submitReport", targetNamespace = "http://ws.handling.interfaces.dddsample.citerus.se/", className = "com.aggregator.SubmitReport") @ResponseWrapper(localName = "submitReportResponse", targetNamespace = "http://ws.handling.interfaces.dddsample.citerus.se/", className = "com.aggregator.SubmitReportResponse") public void submitReport( @WebParam(name = "arg0", targetNamespace = "") HandlingReport arg0) throws HandlingReportErrors_Exception ;
@Override public QName getOperationName(InterfaceInfo intf, Method method) { method = getDeclaredMethod(method); WebMethod wm = method.getAnnotation(WebMethod.class); if (wm != null) { String name = wm.operationName(); if (name.length() == 0) { name = method.getName(); } return new QName(intf.getName().getNamespaceURI(), name); } return new QName(intf.getName().getNamespaceURI(), method.getName()); }
@WebMethod(operationName = "DoubleIt") @Oneway @RequestWrapper(localName = "DoubleIt", targetNamespace = "http://www.example.org/schema/DoubleIt", className = "org.example.schema.doubleit.DoubleIt") @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-02-10T17:14:29.287Z") public void doubleIt( @WebParam(name = "numberToDouble", targetNamespace = "") int numberToDouble ); }
@WebMethod(operationName = "Notify") @Oneway @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-02-10T17:00:24.081Z") public void notify( @WebParam(partName = "Notify", name = "Notify", targetNamespace = "http://docs.oasis-open.org/wsn/b-2") org.oasis_open.docs.wsn.b_2.Notify notify );
@WebMethod String sayHello(); }
public WebMethodAnnotation getWebMethodAnnotation(Method method) { WebMethod webMethod = (WebMethod) method.getAnnotation(WebMethod.class); if (webMethod != null) { WebMethodAnnotation annotation = new WebMethodAnnotation(); annotation.setAction(webMethod.action()); annotation.setOperationName(webMethod.operationName()); annotation.setExclude(webMethod.exclude()); return annotation; } else { return null; } }
public Boolean isWebMethod(final Method method) { if (method == null || method.getReturnType().equals(Future.class) || method.getReturnType().equals(Response.class) || method.isSynthetic()) { return Boolean.FALSE; } WebMethod wm = method.getAnnotation(WebMethod.class); Class<?> cls = method.getDeclaringClass(); if ((wm != null) && wm.exclude()) { return Boolean.FALSE; } if ((wm != null && !wm.exclude()) || (implInfo.getSEIClass() != null && cls.isInterface() && cls.isAssignableFrom(implInfo.getSEIClass()))) { return Boolean.TRUE; } if (method.getDeclaringClass().isInterface()) { return hasWebServiceAnnotation(method); } if (implInfo.getSEIClass() == null) { return hasWebServiceAnnotation(method) && !Modifier.isFinal(method.getModifiers()) && !Modifier.isStatic(method.getModifiers()); } return implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass()); }
@Override public String getAction(OperationInfo op, Method method) { method = getDeclaredMethod(method); WebMethod wm = method.getAnnotation(WebMethod.class); String action = ""; if (wm != null) { action = wm.action(); } if (StringUtils.isEmpty(action)) { Action act = method.getAnnotation(Action.class); if (act != null) { action = act.input(); } } return action; } public Boolean isHolder(Class<?> cls, Type type) {
@Override public QName getRequestWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); RequestWrapper rw = m.getAnnotation(RequestWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
@Override public QName getResponseWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); if (!StringUtils.isEmpty(lp)) { lp += "Response"; } } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
protected AMFEndpointImpl(Object serviceBean) { this.serviceBean = serviceBean; this.operationNames2Methods.clear(); for (Method method : getServiceInterface().getMethods()) { String operationName = method.getName(); WebMethod webMethodInfo = method.getAnnotation(WebMethod.class); // If the annotation exclude the method, don't add it to the possible operations. if ((webMethodInfo != null) && (webMethodInfo.exclude())) { continue; } else if ((webMethodInfo != null) && (!"".equals(webMethodInfo.operationName()))) { operationName = webMethodInfo.operationName(); } this.operationNames2Methods.put(operationName, method); } }
@Test public void testAnnotation() throws Exception { Class<PutLastTradedPricePortType> claz = PutLastTradedPricePortType.class; TradePriceData priceData = new TradePriceData(); Holder<TradePriceData> holder = new Holder<>(priceData); Method method = claz.getMethod("sayHi", holder.getClass()); assertNotNull("Can not find SayHi method in generated class ", method); Annotation ann = method.getAnnotation(WebMethod.class); WebMethod webMethod = (WebMethod)ann; assertEquals(webMethod.operationName(), "SayHi"); Annotation[][] paraAnns = method.getParameterAnnotations(); for (Annotation[] paraType : paraAnns) { for (Annotation an : paraType) { if (an.annotationType() == WebParam.class) { WebParam webParam = (WebParam)an; assertNotSame("", webParam.targetNamespace()); } } } }
LOGGER.warn("Method " + method.getName() + " has no @WebMethod annotation"); } else { this.name = webMethod.action(); WebParam webParam = extractAnnotation(parameterCounter, WebParam.class); if (webParam != null) { paramName = webParam.name(); } else { LOGGER.warn("Method " + method.getName() + " parameter " + parameterCounter + " has no @WebParam annotation");
@WebMethod @Oneway @RequestWrapper(localName = "greetMeOneWay", targetNamespace = "http://apache.org/hello_world_xml_http/mixed/types", className = "org.apache.hello_world_xml_http.mixed.types.GreetMeOneWay") @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-01-24T13:43:10.428-05:00") public void greetMeOneWay( @WebParam(name = "requestType", targetNamespace = "http://apache.org/hello_world_xml_http/mixed/types") java.lang.String requestType );
@WebMethod(operationName = "Notify") @Oneway @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-02-10T17:00:24.115Z") public void notify( @WebParam(partName = "Notify", name = "Notify", targetNamespace = "http://docs.oasis-open.org/wsn/b-2") org.oasis_open.docs.wsn.b_2.Notify notify );
protected boolean hasWebMethods(TypeElement element) { if (element.getQualifiedName().toString().equals(Object.class.getName())) return false; WebMethod webMethod; for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) { webMethod = method.getAnnotation(WebMethod.class); if (webMethod != null) { if (webMethod.exclude()) { if (webMethod.operationName().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "operationName", element.getQualifiedName(), method.toString()), method); if (webMethod.action().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "action", element.getQualifiedName(), method.toString()), method); } else { return true; } } } return false;//hasWebMethods(d.getSuperclass().getDeclaration()); }
@Override public Boolean isOperation(final Method method) { if (Object.class.equals(method.getDeclaringClass())) { return false; } if (method.getDeclaringClass() == implInfo.getSEIClass()) { WebMethod wm = method.getAnnotation(WebMethod.class); if (wm != null && wm.exclude()) { Message message = new Message("WEBMETHOD_EXCLUDE_NOT_ALLOWED", LOG, method.getName()); throw new JaxWsConfigurationException(message); } } Class<?> implClz = implInfo.getImplementorClass(); Method m = getDeclaredMethod(implClz, method); if (m != null) { WebMethod wm = m.getAnnotation(WebMethod.class); if (wm != null && wm.exclude()) { return Boolean.FALSE; } } if (isWebMethod(m)) { return true; } return isWebMethod(getDeclaredMethod(method)); }
/** * The action of this web method. * * @return The action of this web method. */ public String getAction() { String action = ""; if (annotation != null) { action = annotation.action(); } return action; }
@WebMethod(action = "http://www.sonos.com/Services/1.1#getScrollIndices") @RequestWrapper(localName = "getScrollIndices", targetNamespace = "http://www.sonos.com/Services/1.1", className = "com.sonos.services._1.GetScrollIndices") @ResponseWrapper(localName = "getScrollIndicesResponse", targetNamespace = "http://www.sonos.com/Services/1.1", className = "com.sonos.services._1.GetScrollIndicesResponse") @WebResult(name = "getScrollIndicesResult", targetNamespace = "http://www.sonos.com/Services/1.1") public java.lang.String getScrollIndices( @WebParam(name = "id", targetNamespace = "http://www.sonos.com/Services/1.1") java.lang.String id ) throws CustomFault; }
@WebMethod @Oneway @RequestWrapper(localName = "greetMeOneWay", targetNamespace = "http://apache.org/hello_world_xml_http/wrapped/types", className = "org.apache.hello_world_xml_http.wrapped.types.GreetMeOneWay") @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-01-24T13:43:08.878-05:00") public void greetMeOneWay( @WebParam(name = "requestType", targetNamespace = "http://apache.org/hello_world_xml_http/wrapped/types") java.lang.String requestType );