Hmm, got no response on this issue? Is this a trivial problem?
Or, not supported?
Anyway, after googled around, I updated the binding file as followed.
<?xml version="1.0" encoding="UTF-8"?>
<binding value-style="element" force-classes="true"
xmlns:tns="http://ws.cdyne.com/WeatherWS/">
<namespace uri="http://ws.cdyne.com/WeatherWS/" default="elements"/>
<mapping class="java.util.Calendar"
marshaller="NETDateMapper" unmarshaller="NETDateMapper" name="Date"/>
<mapping abstract="true" class="com.cdyne.ws.weatherws.Forecast"
type-name="tns:Forecast">
<structure field="date"/>
<!-- deleted because they are identical to the previous message -->
</binding>
As expected, "no unmarshaller" error was gone. However, when I ran the client,
I got
D:\test\axis2\dot-net\jibx\weather>java org.jibx.binding.Run -b binding.xml
JibxClient1
2008-10-12T00:00:00
java.lang.ClassCastException: java.util.GregorianCalendar cannot be cast to com.
cdyne.ws.weatherws.Forecast
at com.cdyne.ws.weatherws.JiBX_MungeAdapter.JiBX_binding_unmarshal_1_0()
at com.cdyne.ws.weatherws.ArrayOfForecast.JiBX_binding_unmarshal_1_0(Arr
ayOfForecast.java)
at com.cdyne.ws.weatherws.ForecastReturn.JiBX_binding_unmarshal_1_0(Fore
castReturn.java)
at com.cdyne.ws.weatherws.JiBX_bindingForecastReturn_access1.unmarshal()
at com.cdyne.ws.weatherws.WeatherStub.GetCityForecastByZIP(WeatherStub.j
ava:560)
at JibxClient1.main(JibxClient1.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jibx.binding.Run.main(Run.java:192)
where "2008-10-12T00:00:00" was printed by unmarshaller. The date string is
enclosed in the <Date> element sent by .NET.
Anyone?
--Eric
****************************************************************************
* Creativity is thinking up * Eric Jui-Lin Lu *
* new things. Innovation is * Dept of Management Information Systems *
* doing new things. * National Chung Hsing University *
* ---Theodore Levitt * http://web.nchu.edu.tw/~jlu *
****************************************************************************
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users