About     Search     Feed

Nilesh D Kapadia


Music     Twitter     Github

Two little issues with Axis(Java)/.Net web services interop

There are two issues with Axis(Java)/.Net interop that were discovered in a project I am involved in. We are using doc/literal web services as mentioned in my last entry about Java/.Net web services interop.

public class ExampleObject {
    private String str;
    private ExampleItem[] exampleItems;

    public String getStr() {
        return str;
    }
    public void setStr(String str) {
        this.str = str;
    }
    public ExampleItem[] getExampleItems() {
        return exampleItems;
    }
    public void setExampleItems(ExampleItem[] exampleItems) {
        this.exampleItems = exampleItems;
    }    
    public ExampleItem getExampleItems(int i) {
        return exampleItems[i];
    }    
    public void setExampleItems(int i, ExampleItem exampleItem) {
        exampleItems[i] = exampleItem;
    }
}

Observe the last pair of get/set methods. These methods need to be provided for the workaround. Note that I included another property, this is because if the object only has one property, Axis will expose that property type in place of the bean in the method signatures (or at least it did in the case of array of beans).

© 2017 Nilesh D Kapadia