Thomas wrote:
Thanks for your help, Francis.
It's true that the WSDL refers to EOGenericRecord but does not define it:
<complexType abstract="true" name="_Product"><complexContent><extension base="tns4:EOGenericRecord">
I previously saw your article about SOAP serialisers, and must confess I still don't understand how to use it after re-reading it. I don't have any custom serialisers, so where would I put your writeSchema() code fragment?
Well, I must confess some critical blocks are still missing in this document.
One thing you can try is to use Axis 1.0 instead of 1.1: IIRC, one colleague got this kind of missing type definition using Axis 1.1. Anyway, personnally I can't get WebObjects 5.3.x to use reliably other Axis 1.1+, so I always use 1.0. To to so, you must replace both files:
/Library/WebObjects/Extensions/axis.jar
/Library/WebObjects/Extensions/axis-ant.jar
If it's not enough, you can then try to subclass WOEnterpriseObjectSerializer and WOEnterpriseObjectSerializerFactory to force types definition (Warning: I didn't try this suggestion myself):
public class MyEnterpriseObjectDeserializerFactory extends WOEnterpriseObjectDeserializerFactory {
public MyEnterpriseObjectDeserializerFactory() {
super(MyEnterpriseObjectDeserializer.class);
}
}
public class MyEnterpriseObjectSerializer extends WOEnterpriseObjectDeserializer {
public WOEnterpriseObjectSerializer() {
super();
}
public boolean writeSchema(Types types)
throws Exception {
// Add missing types
types.writeType(Foo.class, _FooQName);
...
return super.writeSchema(types);
}
}
}
Then add to your application constructor:
WOWebServiceRegistrar.registerFactoriesForClassWithQName(
new MyEnterpriseObjectDeserializerFactory(),
new WOEnterpriseObjectSerializerFactory(),
EOGenericRecord.class, qName);
Kind regards,