History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-513
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Gert Jan Verhoog
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

wsgen task doesn't generate Holders for response headers

Created: 03/Jul/06 03:18 AM   Updated: 12/Jul/06 10:14 AM
Component/s: Generator
Affects Version/s: 1.1.1, 1.1.2
Fix Version/s: 1.2-RC

Time Tracking:
Not Specified

File Attachments: 1. XML File response-headers.wsdl (2 kb)

Environment: Java 5, xfire 1.1.2


 Description  « Hide
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")
GetGreetingRequest getGreetingRequest,
@WebParam(name = "statusInfo", targetNamespace = "http://example.com/types", mode = WebParam.Mode.OUT, header = true)
StatusInfoType statusInfo);

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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 12/Jul/06 10:14 AM
I've fixed this in SVN now. Thanks. Just an FYI, if you use the JAXWS profile it should generate the Holders then in 1.1.2. Once 1.2 is released you'll need to make sure you have the jax-ws api jar on your classpath because it has the Holder class.