AxisPortProxyFactoryBeanpublic class AxisPortProxyFactoryBean extends org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean Axis-specific subclass of JaxRpcPortProxyFactoryBean that registers bean
mappings for JPetStore's domain objects. The same mappings are also
registered at the server, in Axis' "server-config.wsdd" file.
Note: Without such explicit bean mappings, a complex type like Order
cannot be transferred via SOAP. |
Methods Summary |
---|
protected void | postProcessJaxRpcService(javax.xml.rpc.Service service)
TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping mapping = registry.createTypeMapping();
registerBeanMapping(mapping, Product.class, "Product");
registerBeanMapping(mapping, Item.class, "Item");
registerBeanMapping(mapping, LineItem.class, "LineItem");
registerBeanMapping(mapping, Order.class, "Order");
registry.register("http://schemas.xmlsoap.org/soap/encoding/", mapping);
| protected void | registerBeanMapping(javax.xml.rpc.encoding.TypeMapping mapping, java.lang.Class type, java.lang.String name)
QName qName = new QName("urn:BeanService", name);
mapping.register(type, qName,
new BeanSerializerFactory(type, qName),
new BeanDeserializerFactory(type, qName));
|
|