// register the PurchaseOrder class
QName poqn = new QName("http://www.soapinterop.org/Bid",
"PurchaseOrder");
Class cls = PurchaseOrder.class;
call.addSerializer(cls, poqn, new BeanSerializer(cls));
call.addDeserializerFactory(poqn, cls, BeanSerializer.getFactory());
// register the Address class
QName aqn = new QName("http://www.soapinterop.org/Bid", "Address");
cls = Address.class;
call.addSerializer(cls, aqn, new BeanSerializer(cls));
call.addDeserializerFactory(aqn, cls, BeanSerializer.getFactory());
// register the LineItem class
QName liqn = new QName("http://www.soapinterop.org/Bid", "LineItem");
cls = LineItem.class;
call.addSerializer(cls, liqn, new BeanSerializer(cls));
call.addDeserializerFactory(liqn, cls, BeanSerializer.getFactory());
try {
// Default return type based on what we expect
ServiceDescription sd = new ServiceDescription("Buy", true);