i am using cxf 2.x to develop a webservice. Here is my web service class
@WebService(name = "XXXWS", targetNamespace = "http://www.XXX.com/XXXWS", portName = "XXXWSPort", serviceName = "XXXWSService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class XXXWS {
@WebMethod(operationName = "XXXMethod", action = "http://www.XXX.com/XXXWS/XXXX")
public XXXResponse XXXMethod(
@WebParam(name = "XXXRequest") XXXRequest xxxRequest) {
// implement code here
return response;
}
private static String getServiceURL(Environment env, String actionCode){ //<-- RED CROSS here
//implement code here
return url;
}
}
In eclipse there is a RED CROSS at the method getServiceURL (this is just a regular method, not a WEBMETHOD). It says
Multiple markers at this line
- Document Literal Bare operations must have unique XML elements for the input and output messages across all operations on the
Web Service : '{http://www.XXX.com/XXXWS}getServiceURL'
- Document literal bare methods may have only one non-header IN parameter
So if i just use only ONE parameter as input for the method getServiceURL OR i use SOAPBinding.ParameterStyle.WRAPPED then the RED CROSS will disapear. But i need to have 2 parameters here.
My question is: if i need to use 2 parameters here and still use SOAPBinding.ParameterStyle.BARE, how can i remove the RED CROSS. I think there is a way to configure Eclipse to remove this kind of error