Websercice, SOAPBinding.ParameterStyle.BARE-Methode erfordert, dass alle (auch nicht WEBMETHOD) hat nur einen parameter als Eingabe

ich bin mit cxf 2.x Entwicklung eines webservice.
Hier ist meine web-service-Klasse

@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 gibt es ein ROTES KREUZ an der Methode getServiceURL (dies ist nur eine ganz normale Methode, nicht eine WEBMETHOD). Es sagt

 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, wenn
ich habe gerade mit nur EINEM parameter, die als Eingabe für die Methode getServiceURL ODER
ich benutze SOAPBinding.ParameterStyle.VERPACKT
dann das ROTE KREUZ wird verschwinden. Aber ich muss 2 Parameter hier.

Meine Frage ist: wenn ich 2 Parameter hier und noch SOAPBinding.ParameterStyle.NACKT, wie kann ich Sie entfernen das ROTE KREUZ.
Ich denke, es ist eine Methode zum konfigurieren von Eclipse zu entfernen, diese Art von Fehler

InformationsquelleAutor David | 2011-07-26

Schreibe einen Kommentar