Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2.2
-
Component/s: Aegis Module
-
Labels:None
-
Environment:Windows XP Pro, XFire 1.2.1
-
Number of attachments :
Description
I have made an XFire code first web-service (yes, I know, document first is best practice).
Aegis fails to unmarshal my XML correctly.
I end up in the correct method with the correct input parameter, but the input-object is not complete according to XML, some attributes are null, and they should have been instantiated. This is the scenario:
I start Tomcat and deploy my ws. I send it some XML and it fails.
Then I modify the XML somewhat (see below), and all is well. Then I send exactly the same XML that failed initially, and now it too works.
The first thing I do in my method is to log the input parameter, and when this error happens the dates and the stations specified in my XML are null.
This is the XML I send initially (SOAP headers and envelope excluded):
<getAdvices xmlns:ns1="http://info.backend.data.nsb.no" xsi:type="ns1:GetAdvices">
<in0 xmlns:ns2="http://jaws.nsb.no" xsi:type="ns2:MultiTravelAdviceRequest">
<ns2:filter xsi:type="xsd:int">2044</ns2:filter>
<ns2:fromDate xsi:type="xsd:dateTime">2006-09-11T06:00:21.946Z</ns2:fromDate>
<ns2:fromStation xsi:type="ns2:Station">
<ns2:abbrev xsi:type="xsd:string">7600100</ns2:abbrev>
</ns2:fromStation>
<ns2:locale xsi:type="xsd:string">NO</ns2:locale>
<ns2:toDate xsi:type="xsd:dateTime">2006-09-17T19:00:21.946Z</ns2:toDate>
<ns2:toStation xsi:type="ns2:Station">
<ns2:abbrev xsi:type="xsd:string">7602234</ns2:abbrev>
</ns2:toStation>
</in0></getAdvices>
Then I change the following two lines from
<ns2:fromDate xsi:type="xsd:dateTime">2006-09-11T06:00:21.946Z</ns2:fromDate>
<ns2:fromStation xsi:type="ns2:Station">
to
<ns2:fromDate>2006-09-11T06:00:21.946Z</ns2:fromDate>
<ns2:fromStation>
(xsi:type definition removed, but only for the first occurence og dateTime and Station)
and now it works. After this I can now send the XML that failed again and it will work ok.
the generated WSDL and complete requests are attached.
Is it a bug in aegis (at least I believe it is Aegis) or am I doing something wrong here?
I forgot to tell that I use no mapping file and that my webservice is almost as simple as some the XFire code-first tutorials that you can find on the net (except somewhat more complex inside, it involves exchanging data with a legacy system etc) and that I inject a pool of beans which contain my service. Spring configuration is attached.