Files
codeql/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.java
Tony Torralba 3f9701cea7 Two fixes:
* Consider that the @WebService annotation (et al) can be in a supertype or interface

* getARemoteMethod should only return public methods, since protected, package-private, and private methods are not exposed
2023-08-24 11:35:52 +02:00

99 lines
2.2 KiB
Java

import java.io.File;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceProvider;
@WebService
class WebServiceClass { // $ JaxWsEndpoint
@WebMethod
public void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod
}
@WebEndpoint
public void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod
}
public String acceptableTypes(String param) { // $ JaxWsEndpointRemoteMethod
return null;
}
public String unacceptableParamType(File param) { // not an endpoint
return null;
}
public File unacceptableReturnType() { // not an endpoint
return null;
}
@XmlJavaTypeAdapter
public File annotatedTypes(@XmlJavaTypeAdapter File param) { // $ JaxWsEndpointRemoteMethod
return null;
}
}
@WebServiceProvider
class WebServiceProviderClass { // $ JaxWsEndpoint
@WebMethod
public void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod
}
@WebEndpoint
public void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod
}
public String acceptableTypes(String param) { // $ JaxWsEndpointRemoteMethod
return null;
}
public String unacceptableParamType(File param) { // not an endpoint
return null;
}
public File unacceptableReturnType() { // not an endpoint
return null;
}
@XmlJavaTypeAdapter
public File annotatedTypes(@XmlJavaTypeAdapter File param) { // $ JaxWsEndpointRemoteMethod
return null;
}
}
@WebServiceClient
class WebServiceClientClass { // $ JaxWsEndpoint
@WebMethod
public void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod
}
@WebEndpoint
public void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod
}
public String acceptableTypes(String param) { // $ JaxWsEndpointRemoteMethod
return null;
}
public String unacceptableParamType(File param) { // not an endpoint
return null;
}
public File unacceptableReturnType() { // not an endpoint
return null;
}
@XmlJavaTypeAdapter
public File annotatedTypes(@XmlJavaTypeAdapter File param) { // $ JaxWsEndpointRemoteMethod
return null;
}
}