Parameter passing of CXF Webservice

I used cxf webservice in a project I was working on recently. I remember that I used it a few years ago. I haven't used it in the past two years, and I can't remember some things. If you encounter a problem, record it. I feel that it is still necessary to record something, although I have not had the habit of recording it before.

The problem is that the client needs to pass a parameter in the soap header, and this parameter must be returned on the server side of cxf, and it must also be placed in the soap header. There are several methods on the official website, and it feels more convenient to use the annotation method.

public ResultList getHello(@WebParam(name = "ReqId", header = true, mode = Mode.INOUT) Holder<String> reqId);

This reqId is the parameter that needs to be passed.

Also note that the package does not choose the wrong one.

is this package: javax.jws.WebParam.Mode

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326561362&siteId=291194637