Hi axis fans,
 
I have a question on how to avoid call.registerTypeMapping in client program when the client is calling a service using Axis client Call API.
 
I am working on dynamic invocation on RPC style web services using Axis Client API. (Currently I still cannot use Axis Client API for Document style web services. Please point me a way out if you know.) It works fine if I register all the relevant complex types in the client programs.
 
In my program, the returned object is an org.apache.axis.message.addressing.EndpointReferenceType. I need to register all the types used by EndpointReferenceType, such as AttributedURI, ReferenceParametersType, ReferencePropertiesType, AttributedQName, ServiceNameType, and EndpointReferenceType. For your reference, one of the type mapping is as below:
 
      qnBeanName = new QName("http://schemas.xmlsoap.org/ws/2004/03/addressing", "ReferencePropertiesType", "wsa");
      beanClassName = " org.apache.axis.message.addressing.ReferencePropertiesType";  
      call.registerTypeMapping( Class.forName(beanClassName), qnBeanName, new BeanSerializerFactory(Class.forName(beanClassName), qnBeanName), new BeanDeserializerFactory( Class.forName(beanClassName), qnBeanName) );
 
I have tried the following:
1. Add the <typeMapping> elements to deploy-server.wsdd and deploy-client.wsdd of the web service. Comment one of the type mappings in the client code. When i run the client, exception occurs saying "No deserializer for " the complex type which type mapping is commented in the client code.
 
2. I am using GT. I added the <typeMapping> element in the client-config.wsdd in the %GLOBUS_LOCATION%. Comment one of the type mappings in the client code. When i run the client, exception occurs saying "No deserializer for " the complex type which type mapping is commented in the client code.
 
Could someone tell me a better way to avoid massive type mapping in the client program?
 
 
Regards,
Xinjun

Reply via email to