[
http://jira.codehaus.org/browse/XFIRE-977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_110957
]
Alexander Bollaert commented on XFIRE-977:
------------------------------------------
I think the error is somewhere in
org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator. When it creates the
ParamInfo, it iterates over the messages parts first. Suppose you have defined
an input message defined as:
{noformat}
<message name="getSnapshotReportRequest">
<part name="parameters" element="messages:getSnapshotReport" />
<part name="header" element="messages:HeaderElement" />
</message>
{noformat}
It will just generate 2 ParamInfo objects with header set to false.
After that, it iterates over the bindings, and it will encounter this:
{noformat}
<input>
<soap:body use="literal" parts="parameters" />
<soap:header use="literal" part="header"
message="tns:getSnapshotReportRequest"
/>
</input>
{noformat}
Here it should take into account that the header already has a ParamInfo (it
knows which message and part it is), and change the header boolean from false
to true. Instead it just generates an extra parameter (Header2) with header set
to true. I've currently fixed this on the 1.2.6 code because it was too much
work to change my interfaces at each generation time. If you want I can attach
a patch.
> Client generated wrong if header element is not in separate message
> -------------------------------------------------------------------
>
> Key: XFIRE-977
> URL: http://jira.codehaus.org/browse/XFIRE-977
> Project: XFire
> Issue Type: Bug
> Components: Generator
> Affects Versions: 1.2.6
> Reporter: Chris Moesel
> Assignee: Tomasz Sztelak
> Attachments: pizza_service_xfire_wsdl2java_header_bug.zip
>
>
> If an object is expected to be passed in the header, and the wsdl defines it
> as a part in the request message (rather than in its own message), then XFire
> generates the client incorrectly. For each operation using the header, it
> will define two parameters for the header object. One will be serialized
> into the soap header and the other will be serialized into the message body.
> Xfire works correctly, however, if the header is defined in its own message
> instead of as a part in the request message.
> This causes interoperability problems with CXF 2.0 RC, since CXF currently
> requires header objects to be defined as a part in the request message. This
> is apparently the OS-I suggested way of doing things. See
> https://issues.apache.org/jira/browse/CXF-602 and
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00231.html.
> I'll try to get a quick example together to demonstrate this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email