use of javax.xml.ws.WebEndpoint in project Payara by payara.
the class WebServiceTesterServlet method getPortClass.
private String getPortClass(Endpoint ep, Class serviceClass) throws Exception {
for (Method m : serviceClass.getMethods()) {
WebEndpoint webEP = m.getAnnotation(WebEndpoint.class);
if (webEP == null || webEP.name() == null || webEP.name().length() == 0) {
continue;
}
String getPortMethodName = "get" + JAXBRIContext.mangleNameToClassName(webEP.name());
Method getPortMethod = serviceClass.getMethod(getPortMethodName, (Class[]) null);
return getPortMethod.getReturnType().getName();
}
return null;
}
use of javax.xml.ws.WebEndpoint in project jbossws-cxf by jbossws.
the class CXFServiceObjectFactoryJAXWS method portNameMatches.
private static PortMatch portNameMatches(final QName portQName, final Method targetMethod) {
final String portName = portQName != null ? portQName.getLocalPart() : null;
if (portName == null) {
// no port specified, so we *might* have a valid match...
return PortMatch.MAYBE;
}
WebEndpoint webEndpointAnnotation = targetMethod.getAnnotation(WebEndpoint.class);
if (webEndpointAnnotation == null || webEndpointAnnotation.name() == null || webEndpointAnnotation.name().isEmpty()) {
// no way to match, no port specified using @WebEndpoint
return PortMatch.MAYBE;
}
return webEndpointAnnotation.name().equals(portName) ? PortMatch.YES : PortMatch.NO;
}
Aggregations