Hi Axis'ers,
I'm trying to embed Axis in an application and have my own
provider set up and attach services to it like so:
...
m_provider = new SimpleProvider();
TypeMapping tm;
try {
tm = m_provider.getTypeMappingRegistry().createTypeMapping();
n = new QName("ExternalNote", "ExternalNote");
tm.register(ExternalNote.class, n,
new BeanSerializerFactory(ExternalNote.class, n),
new BeanDeserializerFactory(ExternalNote.class, n));
m_provider.getTypeMappingRegistry().register(
"http://schemas.xmlsoap.org/soap/encoding/", tm);
} catch (org.apache.axis.ConfigurationException e) {
throw new ConfigurationException(e.getMessage(), e);
}
Configuration[] serviceConfs = conf.getChildren("service");
for (int i = 0; i < serviceConfs.length; i++) {
Configuration sConf = serviceConfs[i];
AvalonProvider p = new AvalonProvider(m_serviceManager);
SOAPService s = new SOAPService(p);
s.getServiceDescription().setName(sConf.getAttribute("id"));
s.setOption("className", sConf.getAttribute("impl"));
s.setOption("allowedMethods",
sConf.getAttribute("allowedMethods"));
((SimpleProvider)
m_provider).deployService(sConf.getAttribute("id"), s);
}
...
All this works great; but I'm running into the following
snag passing ExternalNote object back into Axis (the
serialization process works well); Axis says:
Nov 2, 2005 4:17:59 PM org.apache.axis.encoding.ser.BeanPropertyTarget set
SEVERE: Could not convert
org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension to bean
field 'audience', type java.lang.String
(audience is a simple String member of the ExternalNote class).
Can anybody point me to where I'm going wrong? It seems
that I'm doing something incorrectly in the typemappingregistry
but I can't find enough documentation about it to really
figure out how to do it correctly (most of the examples
assume starting from wsdl).
I'd be very greateful for any hints!
Thanks in advance,
- Filip