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

Key: XFIRE-514
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 uses element type as name for header parameters

Created: 03/Jul/06 03:22 AM   Updated: 12/Jul/06 09:46 AM
Component/s: Generator
Affects Version/s: 1.1.1, 1.1.2
Fix Version/s: 1.2-RC

Time Tracking:
Not Specified

Environment: xfire 1.1.2, java 5


 Description  « Hide
I'm generating code (with wsgen) from wsdl. One of the operations I defined in my binding use headers, like this:

<wsdl:operation name="getData">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:header message="common:myRequestHeaders" part="sessionID" use="literal"/>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output><soap:body use="literal"/>
</wsdl:operation>

the myRequestHeaders message looks like:

<wsdl:message name="myRequestHeaders">
<wsdl:part name="sessionId" element="xs:string"/>
</wsdl:message>

Now, when I generate my code, the web method that is generated uses 'string' as the name of the parameter, instead of 'sessionId' as I'd rather have:

@WebMethod(operationName = "getData" action = "")
public Data getData(
@WebParam(name="string", header="true") String string,
@WebParam(name="path") String path);

wsgen should use 'sessionId' for the parameter name instead of the element's type name.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Gert Jan Verhoog - 04/Jul/06 09:51 AM
I thought the way of specifying headers I used above was allright, but now I'm not too sure anymore. I tried the following, and that does work:

in my schema, I added the following element (targetnamespace has prefix 'tns' in wsdl):

<xs:element name="sessionId" type="xs:string"/>

then in my message definitions, I use

<wsdl:message name="myRequestHeaders">
<wsdl:part name="sessionId" element="tns:sessionId"/>
</wsdl:message>

this does work, it generates correct names in code.


Dan Diephouse - 12/Jul/06 09:46 AM
I've fixed this in SVN. Thanks for the report!