You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Pete Hendry <pe...@capeclear.com> on 2003/10/10 12:24:32 UTC

DIME interop problems

I'm working through interop testing against axis with DIME and MIME. I 
have come up against some problems using DIME and have the following 
questions

 - with style="literal" am I right to think that axis does not directly
   support the DIME ref:location attribute? In this case I can only
   work out how to manually add attachments (as per open-layout)
   but not use them within an object hierarchy.

 - I am using a modified version of the example given in the DIME/WSDL
   spec (using rpc/encoded). The WSDL is attached. Axis handles the
   generation from this without problem. However, the classes it generates
   for the DIME types do not appear to have a serializer that can handle
   them. They are mapped by default to Simple[S|Des]erializer but this
   cannot handle the structure of the generated classes. For example,
   the Logo class is generated as

public class Logo
    implements
        java.io.Serializable,
        org.apache.axis.encoding.SimpleType {

    private com.example.DimeExample.Messages.ReferencedBinary value;
    ...
    public com.example.DimeExample.Messages.ReferencedBinary getValue() {
        return value;
    }
    public void 
setValue(com.example.DimeExample.Messages.ReferencedBinary value) {
        this.value = value;
    }
    ...
}

    Here Logo is an extension of ReferencedBinary in the schema but the 
Logo class
    contains a reference to the ReferencedBinary value (rather than 
extend it). This is
    not a problem though. The problem is that there seems to be no code 
that handles
    extension in this way. The only uses of the SimpleType interface in 
the axis
    serialization code is to allow attributes to be written/read. There 
is no code to
    set the base type value field. So, for this example, the "value" 
field of the Logo
    class does not appear to have any code in SimpleDeserializer that 
would set it.

    Am I correct to assume that I have to write a serializer and 
deserializer for each
    of the types Logo, Report and Doc and any other type that extends the
    ReferencedBinary type in DIME/WSDL spec?

    The processing around deserializing the attachment seems to be 
correct. The
    href is identified, the appropriate attachment retrieved but then it 
tries to set
    the field in the containing class (PutCompanyInfo in this case) 
using the
    DataHandler instance from the attachment rather than create an instance
    of the SimpleType derived class (Logo) with the DataHandler referenced
    from it.

Any help with this would be appreciated.

Pete