I'm having the same problem... I've been bugging the Apache Axis people with it, but I'm thinking it might be a Spring problem.
Mine was actually working with Spring 1.2-rc1 and Axis 1.1 on JDK1.4, but when I wanted to move up to JDK5 I had to also upgrade to Axis 1.2RC3. I've found and fixed a couple of bugs in their Call class, but now it comes down to type mappings.
With "literal" the encodingStyle is nulled out by Axis, so it can't be used to loo up the type mappings registered by my proxy factory bean. The Axis binding stub does this for type conversion:
Code:
org.apache.axis.description.OperationDesc oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("GetWeatherInfo");
oper.addParameter(new javax.xml.namespace.QName("http://ejse.com/WeatherService/", "zipCode"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://ejse.com/WeatherService/", "WeatherInfo"));
oper.setReturnClass(com.eplus.app.service.bind.weather.WeatherInfo.class);
oper.setReturnQName(new javax.xml.namespace.QName("http://ejse.com/WeatherService/", "GetWeatherInfoResult"));
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
oper.setUse(org.apache.axis.constants.Use.LITERAL);
_operations[0] = oper;
and later puts this OpertationDesc object into a new Call instance so the call knows explicitly the type conversion. This is different from the way Spring's example shows:
Code:
public class WeatherServiceJaxRpcProxyFactoryBean extends JaxRpcPortProxyFactoryBean {
protected void postProcessJaxRpcService(Service service) {
TypeMappingRegistry tmr = service.getTypeMappingRegistry();
TypeMapping tm = tmr.createTypeMapping();
registerMapping(tm, "WeatherInfo", WeatherInfo.class);
registerMapping(tm, "ExtendedWeatherInfo", ExtendedWeatherInfo.class);
registerMapping(tm, "DayForecastInfo", DayForecastInfo.class);
registerMapping(tm, "NineDayForecastInfo", NineDayForecastInfo.class);
registerMapping(tm, "ForecastDays", ForecastDays.class);
registerMapping(tm, "IraqCities", IraqCities.class);
tmr.register(org.apache.axis.Constants.URI_SOAP11_ENC, tm);
}
private void registerMapping(TypeMapping tm, String name, Class clazz) {
QName qname = new QName("http://ejse.com/WeatherService/",name);
tm.register(clazz,qname,
new BeanSerializerFactory(clazz, qname),
new BeanDeserializerFactory(clazz, qname));
}
}
I'd really like to get this working, if anyone has any ideas...