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

Key: XFIRE-563
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Adrian Smith
Votes: 0
Watchers: 0
Operations

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

Enumeration serialisation problem

Created: 02/Aug/06 02:51 AM   Updated: 06/Aug/06 10:07 PM
Component/s: Core
Affects Version/s: 1.1.2
Fix Version/s: 1.2

Time Tracking:
Not Specified

File Attachments: 1. XML File build.xml (5 kb)
2. XML File Enumeration.wsdl (3 kb)
3. XML File services.xml (0.3 kb)
4. Java Source File TestingEnumerationServiceImpl.java (0.8 kb)

Environment: Windows XP/Java 1.5


 Description  « Hide
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>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 02/Aug/06 08:20 AM
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.

Dan Diephouse - 06/Aug/06 10:07 PM
I fixed this in SVN. Will upload a snapshot shortly.