Hi everyone.

I'm migrating from Axis 1.1 to Axis 1.2. And I'm having some trouble
in registering TypeMapping in Axis 1.2, and subsequently in Axis 1.3
and Axis 1.4.

The following code sniped, is the way I used to register TypeMappings
in Axis 1.1:

--- Begin Code ---
(serviceDesc is a SOAPService)

String encoding = serviceDesc.getUse().getEncoding();
MyDefaultTypeMapping defaultTM = new MyDefaultTypeMapping(
               (encoded != null) && (encoded.equals("yes")));
tmr.registerDefault(defaultTM);

TypeMapping typeMapping = (TypeMapping) tmr.getTypeMapping(encoding);
MyTypeMapping myTM = new MyTypeMapping(service, typeMapping,
apiInterfaces);
tmr.register(encoding, myTM);

--- End Code ---

But now, some changes have ocurred. First of all, the above code
throws an Exception in Axis 1.2 (Axis 1.3 and Axis 1.4) because the
TypeMapping's I want to register aren't the type expected, that is:
TypeMappingDelegate.
The reason the exception is thrown, becomes clear in the following
code of the method register/registerDefault of the
TypeMappingRegistryImpl.java existing in Axis 1.2:
--- Begin Code ---
if (mapping == null ||
           !(mapping instanceof TypeMappingDelegate)) {
           throw new IllegalArgumentException(
                   Messages.getMessage("badTypeMapping"));
}
--- End Code ---

And I can't extend this object (TypeMappingDelegate), or even create
it, because the constructor is not visible.
My question is, how do I register TypeMapping's in Axis 1.2, like I
used to do in Axis 1.1?

Sorry, for the long text, I wanted to explain my self clearly.
Thanks in advance, and hope anyone can help.

Best regards,
Miguel Ricardo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to