Working WSDL-first and generating java code with wsgen, I want to use a soap header in the output of an operation. Using wsgen-generated code, the response header is seen on the wire, but clients don't see it. If I understand correctly, response headers should be done using Holder objects. The generated code does not use these response headers however, which could be a bug.
The attached wsdl generates the following web method:
@WebMethod(operationName = "getGreeting", action = "")
@WebResult(name = "getGreetingResponse", targetNamespace = "http://example.com/types")
public GetGreetingResponse getGreeting(
@WebParam(name = "getGreetingRequest", targetNamespace = "http://example.com/types")
@WebParam(name = "statusInfo", targetNamespace = "http://example.com/types", mode = WebParam.Mode.OUT, header = true)
As you can see, the statusInfo parameter is annotated to be a response header. Consider the following client code that calls the web method:
StatusInfoType statusInfo = new StatusInfoType();
response = myServiceClient.getGreeting(request,statusInfo);
After calling the web service, statusInfo is not changed. The statusInfo object should probably be wrapped in a Holder object.