XFire

problems with unmarshalling when including xsi:type="xsd:dateTime" in XML

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.2
  • Fix Version/s: 1.2.4
  • Component/s: Aegis Module
  • Labels:
    None
  • Environment:
    Windows XP Pro, Tomcat 5.5.17
  • Number of attachments :
    1

Description

Most of http://jira.codehaus.org/browse/XFIRE-647 is still valid, but I have managed to narrow it down somewhat.
This is the scenario:
1. start tomcat with application deployed (or redeploy application)
2. send in the following xml:
<soapenv:Body>
<getAdvice xmlns:ns2="http://jaws.nsb.no" xmlns:ns1="http://info.backend.data.nsb.no" xsi:type="ns1:GetAdvices">
<in0 xsi:type="ns2:MultiTravelAdviceRequest">
<ns2:fromStation xsi:type="ns2:Station">
<ns2:abbrev xsi:type="xsd:string">7600100</ns2:abbrev>
</ns2:fromStation>
<ns2:locale type="xsd:string">NO</ns2:locale>
<ns2:toStation xsi:type="ns2:Station">
<ns2:abbrev xsi:type="xsd:string">7601126</ns2:abbrev>
</ns2:toStation>
<ns2:queryDate xsi:type="xsd:dateTime">2006-10-08T12:00:00</ns2:queryDate>
</in0>
</getAdvice>
</soapenv:Body>
</soapenv:Envelope>
3. I get the following in my log:
2006-10-09 22:55:42,968[DEBUG][http-8080-Processor24][][no.nsb.jaws.util.LogHandler][] <?xml version="1.0" encoding="UTF-8"?><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Couldn't set property {http://jaws.nsb.no}queryDate on departure 7600100/null/ -> 7601126/null/ 000001111111000. argument type mismatch</faultstring></soap:Fault>
2006-10-09 22:55:42,968[ERROR][http-8080-Processor24][][no.nsb.jaws.util.LogHandler][] <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <getAdvice xmlns:ns1="http://info.backend.data.nsb.no" xmlns:ns2="http://jaws.nsb.no" xsi:type="ns1:GetAdvices"> <in0 xsi:type="ns2:MultiTravelAdviceRequest"> <ns2:fromStation xsi:type="ns2:Station"> <ns2:abbrev xsi:type="xsd:string">7600100</ns2:abbrev> </ns2:fromStation> <ns2:locale type="xsd:string">NO</ns2:locale> <ns2:toStation xsi:type="ns2:Station"> <ns2:abbrev xsi:type="xsd:string">7601126</ns2:abbrev>
</ns2:toStation> <ns2:queryDate xsi:type="xsd:dateTime">2006-10-08T12:00:00</ns2:queryDate> </in0> </getAdvice> </soapenv:Body></soapenv:Envelope>
2006-10-09 22:55:42,968[ERROR][http-8080-Processor24][][no.nsb.jaws.util.LogHandler][] fault occured
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.xfire.aegis.type.basic.BeanType.writeProperty(BeanType.java:315)
at org.codehaus.xfire.aegis.type.basic.BeanType.readObject(BeanType.java:192)
at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:154)
at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:206)
at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50)
at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301)
at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67)
at org.codehaus.xfire.spring.remoting.XFireExporter.handleRequest(XFireExporter.java:48)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
2006-10-09 22:55:42,968[ERROR][http-8080-Processor24][][no.nsb.jaws.util.LogHandler][] <?xml version="1.0" encoding="UTF-8"?><soap:F
ault><faultcode>soap:Client</faultcode><faultstring>Couldn't set property {http://jaws.nsb.no}queryDate on departure 7600100/null/ -
> 7601126/null/ 000001111111000. argument type mismatch</faultstring></soap:Fault>
4. I then change the following line in my xml
<ns2:queryDate xsi:type="xsd:dateTime">2006-10-08T12:00:00</ns2:queryDate>
to (remove xsi
<ns2:queryDate type="xsd:dateTime">2006-10-08T12:00:00</ns2:queryDate>
or (remove xsi:type completely)
<ns2:queryDate>2006-10-08T12:00:00</ns2:queryDate>
and get no errors and everything works ok.
5. I can now rerun my xml from step 2, and it will work ok until I restart Tomcat or redeploy application

Activity

Hide
Dag Framstad added a comment -

I noticed that the xml I pasted in was missing the first few lines. I have attached the complete xml.

Show
Dag Framstad added a comment - I noticed that the xml I pasted in was missing the first few lines. I have attached the complete xml.
Hide
Dag Framstad added a comment -

Some more comments.

The class that Acegi tries to unmarshal extends abstract class C. C inherits from abstract class B which inherits from abstract class A.

The faultstring in the log file:
Couldn't set property {http://jaws.nsb.no}queryDate on departure 7600100/null/ -> 7601126/null/ 000001111111000. argument type mismatch
is a little bit strange. The text "departure 7600100/null/ -> 7601126/null/ 000001111111000" is the result of C.toString().

Show
Dag Framstad added a comment - Some more comments. The class that Acegi tries to unmarshal extends abstract class C. C inherits from abstract class B which inherits from abstract class A. The faultstring in the log file: Couldn't set property {http://jaws.nsb.no}queryDate on departure 7600100/null/ -> 7601126/null/ 000001111111000. argument type mismatch is a little bit strange. The text "departure 7600100/null/ -> 7601126/null/ 000001111111000" is the result of C.toString().
Hide
Dag Framstad added a comment -

I tried the above soap message with xfire-1.2.4 today, and it worked now. So whatever you did must have fixed the problem, even though it might not have been an attempt to fix exactly this bug. Thanks anyway.

Show
Dag Framstad added a comment - I tried the above soap message with xfire-1.2.4 today, and it worked now. So whatever you did must have fixed the problem, even though it might not have been an attempt to fix exactly this bug. Thanks anyway.
Hide
Dan Diephouse added a comment -

Thanks for reporting back. Glad to know that we got it fixed (even if it may not been intention! Sorry for the lack of attention on our part.)

Show
Dan Diephouse added a comment - Thanks for reporting back. Glad to know that we got it fixed (even if it may not been intention! Sorry for the lack of attention on our part.)
Hide
Andy Roberts added a comment -

I am still getting this issue in xfire-aegis-1.2.6.

Has it been fixed since this release?

Thanks

Show
Andy Roberts added a comment - I am still getting this issue in xfire-aegis-1.2.6. Has it been fixed since this release? Thanks

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: