You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Maciejewski, Vincent (GMI - NY SWAPS)" <vm...@exchange.ml.com> on 2002/08/07 15:53:16 UTC
wsdl2java does not generate registerTypeMapping calls
Hello everyone,
I'm having problems trying to get wsdl2java generate a deserializer for a complex type that happens to be a bean.
For example, below is a proxy class function generated by wsdl2java, where BondIndicatives is a bean.
public BeanService.BondIndicatives getIndicatives(java.lang.String cusip) throws java.rmi.RemoteException{
[...]
org.apache.axis.client.Call call = createCall();
javax.xml.namespace.QName p0QName = new javax.xml.namespace.QName("", "cusip");
call.addParameter(p0QName, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN);
call.setReturnType(new javax.xml.namespace.QName("urn:BeanService", "BondIndicatives"));
call.setUseSOAPAction(true);
call.setSOAPActionURI("");
call.setOperationStyle("rpc");
call.setOperationName(new javax.xml.namespace.QName("http://localhost:8080/axis/services/IndicativesService/axis/services/IndicativesService", "getIndicatives"));
Object resp = call.invoke(new Object[] {cusip});
[...]
}
This throws an exception because the deserializer is not registered. The only way I can get it to work is to do the following:
QName qnBondIndicatives =
new QName("urn:BeanService", "BondIndicatives");
call.registerTypeMapping(
BondIndicatives.class,
qnBondIndicatives,
new org.apache.axis.encoding.ser.BeanSerializerFactory(
BondIndicatives.class,
qnBondIndicatives),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(
BondIndicatives.class,
qnBondIndicatives));
So my question is basically how do I get wsdl2java to generate the call to registerTypeMapping? Or am I missing something?
by the way the .wsdd file does contain the <beanMapping> element for BondIndicatives.
Best Regards,
Vincent