Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes unable marshal XML representation to string in memory - please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "unable marshal XML representation to string in memory - please help" Watch "unable marshal XML representation to string in memory - please help" New topic
Author

unable marshal XML representation to string in memory - please help

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

I have below classes and I am trying to return Forecast class object as a return type of a web service method that is exposed using AXIS 1.2 RC2 and JiBX :





Now my problem is, at this line "((IMarshallable)value).marshal(mctx)" in JibxSerializer's serializer() method of above code, I am getting an JiBXException and a fatal error saying
"The following exception was logged org.jibx.runtime.JiBXException: Collection item of type java.lang.String has no binding defined"
at JiBX_MungeAdapter.JiBX_SparePartPriceSession_binding_marshal_1_0()
at Forecast.JiBX_SparePartPriceSession_binding_marshal_1_0(Forecast.java)
at JiBX_SparePartPriceSession_bindingForecast_access.marshal()
at Forecast.marshal(Forecast.java)


The resulting string that is to be written to output is below :
<forecast xmlns="http://ws.gle.com/schemas/axis/appb" hi="0" low="0" precip="0"><zip>343434</zip><city>Campbell</city><state>CA</state><date>April 11, 2003</date><forecast>20 percent chance of rain.</forecast><temp><temp>35</temp></temp>


All the usual configuration of registering all my custom types with TypeMapping element and JiBX (De)Serializers has been done in my AXIS's server-config.wsdd. Can anyone please tell me what am I missing here and why is this error occurring in my server side application server log files.




Thanks & Regards,


RR Kumaran
SCJP 1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: unable marshal XML representation to string in memory - please help