XFire

Enumeration serialisation problem

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1.2
  • Fix Version/s: 1.2
  • Component/s: Core
  • Labels:
    None
  • Environment:
    Windows XP/Java 1.5
  • Number of attachments :
    4

Description

I seem to be hitting a problem with Enumerations again. The original issue I raised at http://jira.codehaus.org/browse/XFIRE-520 was resolved by explicitly coding <serviceFactory/> in services.xml.

The problem has returned, but for an enumeration that is at the 'top' level of the schema. I have created a stripped down version of the offending WSDL and created a simple test project and client.

The client will talk to the service OK, if both are XFire, but if the client is Axis, I get a de-serialisation Exception. Examination of the payload reveals an incorrect serialisation of the enumeration value:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getEnumerationCommandStatusResponse xmlns="http://test.bt.com/2006/07/Testing/Enumeration/Service">
<enumerationCommandStatus xmlns="http://test.bt.com/2006/07/Testing/Enumeration">IN_PROGRESS</enumerationCommandStatus>
</getEnumerationCommandStatusResponse>
</soap:Body>
</soap:Envelope>

schema values for the enumeration are:

<xs:simpleType name="EnumerationCommandStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="Initial"/>
<xs:enumeration value="InProgress"/>
<xs:enumeration value="Succeeded"/>
<xs:enumeration value="Failed"/>
</xs:restriction>
</xs:simpleType>

  1. build.xml
    02/Aug/06 2:53 AM
    5 kB
    Adrian Smith
  2. Enumeration.wsdl
    02/Aug/06 2:52 AM
    3 kB
    Adrian Smith
  3. services.xml
    02/Aug/06 2:52 AM
    0.3 kB
    Adrian Smith
  4. TestingEnumerationServiceImpl.java
    02/Aug/06 2:53 AM
    0.8 kB
    Adrian Smith

Activity

Hide
Dan Diephouse added a comment -

Thanks Adrian for the extensive example! I see the issue now. It has to do with us not recognizing that the Enum is a JAXB type and trying to serialize through our own mechanism. Its a one or two line fix. We'll get it integrated into 1.2 ASAP.

Show
Dan Diephouse added a comment - Thanks Adrian for the extensive example! I see the issue now. It has to do with us not recognizing that the Enum is a JAXB type and trying to serialize through our own mechanism. Its a one or two line fix. We'll get it integrated into 1.2 ASAP.
Hide
Dan Diephouse added a comment -

I fixed this in SVN. Will upload a snapshot shortly.

Show
Dan Diephouse added a comment - I fixed this in SVN. Will upload a snapshot shortly.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: