hello,

is it possible to programatically specify a global type mapping,
that is used by serializers (BeanSerializer) when writing the
wsdl/schema?

i don't know if this question in short is the right question, so some
more words to describe what i want to do...

what i have is the following:

  com.comp.ws.WSConsumerInfo
  (this is a class that provides information about the webservice
  consumer, this is expected by all webservices)

  com.comp.ws.srvc1.WebService1
  com.comp.ws.srvc1.WebService1Request (associates WSConsumerInfo)

  com.comp.ws.srvc2.WebService2
  com.comp.ws.srvc2.WebService2Request (associates WSConsumerInfo)

both webservices have their own targetNamespace, e.g.
"http://srvc1.ws.comp.com"; and "http://srvc2.ws.comp.com";.

now i want the WSConsumerInfo to have it's own namespace
("http://ws.comp.com";) that is used by all services.
AFAIK this means that i need a custom type mapping for this class,
which would be specified in the wsdd.

as i'm using beehive (an implementation of jsr181,
http://www.jcp.org/en/jsr/detail?id=181), where metadata annotations
replace the deployment descriptors, i cannot use the wsdd for
customizing things like typemappings.

i know that i could implement the static getTypeDesc for each
WebServiceRequest (associating WSConsumerInfo), where i would
specify the XmlType with the custom namespace for the WSConsumerInfo.
but as a consequence, i would have to implement the complete
TypeDesc for all WebServiceRequests, thus the simplified webservice
development wouldn't be much simplified.

so i wonder if there's a way of specifying the typemapping
programatically, that normally would be done in the wsdd.

i yet tried a
static {
   TypeDesc.registerTypeDescForClass( WSConsumerInfo.class,
       WSConsumerInfo.getTypeDesc() );
}
in the WebServiceRequest, but this seems to be ignored when
the wsdl/schema is generated.


any hints or tips on this topic?


thanx in advance,
cheers,
martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to