Skip to main content
added 7 characters in body
Source Link

Ok, having a look to the TypeMapper class of WSC, I found that there is an obvious error when a generated from wsdl tooling API method tries to cast Object which is actually an Object[] to int[]. So I changed these lines in TypeMapper.readArray():

Object array = Array.newInstance(component, results.size());
Object arrayResult = results.toArray((Object[]) array);

To:

Object array = Array.newInstance(component, results.size());
Object arrayResult;
if(component == int.class) {
    int[] inn = new int[results.size()];
    for(int i = 0; i<results.size(); i++){
        inn[i] = ((Integer)results.get(i)).intValue();
    }
    arrayResult = (Object) inn;
} else {
    Object array = Array.newInstance(component, results.size());
    arrayResult = results.toArray((Object[]) array);
}

And it solved the issue. If this will not cause any issues later I will commit it to WSC repo.

Ok, having a look to the TypeMapper class of WSC, I found that there is an obvious error when a generated from wsdl tooling API method tries to cast Object which is actually an Object[] to int[]. So I changed these lines in TypeMapper.readArray():

Object array = Array.newInstance(component, results.size());
Object arrayResult = results.toArray((Object[]) array);

To:

Object array = Array.newInstance(component, results.size());
Object arrayResult;
if(component == int.class) {
    int[] inn = new int[results.size()];
    for(int i = 0; i<results.size(); i++){
        inn[i] = ((Integer)results.get(i)).intValue();
    }
    arrayResult = (Object) inn;
} else {
    arrayResult = results.toArray((Object[]) array);
}

And it solved the issue. If this will not cause any issues later I will commit it to WSC repo.

Ok, having a look to the TypeMapper class of WSC, I found that there is an obvious error when a generated from wsdl tooling API method tries to cast Object which is actually an Object[] to int[]. So I changed these lines in TypeMapper.readArray():

Object array = Array.newInstance(component, results.size());
Object arrayResult = results.toArray((Object[]) array);

To:

Object arrayResult;
if(component == int.class) {
    int[] inn = new int[results.size()];
    for(int i = 0; i<results.size(); i++){
        inn[i] = ((Integer)results.get(i)).intValue();
    }
    arrayResult = (Object) inn;
} else {
    Object array = Array.newInstance(component, results.size());
    arrayResult = results.toArray((Object[]) array);
}

And it solved the issue. If this will not cause any issues later I will commit it to WSC repo.

Source Link

Ok, having a look to the TypeMapper class of WSC, I found that there is an obvious error when a generated from wsdl tooling API method tries to cast Object which is actually an Object[] to int[]. So I changed these lines in TypeMapper.readArray():

Object array = Array.newInstance(component, results.size());
Object arrayResult = results.toArray((Object[]) array);

To:

Object array = Array.newInstance(component, results.size());
Object arrayResult;
if(component == int.class) {
    int[] inn = new int[results.size()];
    for(int i = 0; i<results.size(); i++){
        inn[i] = ((Integer)results.get(i)).intValue();
    }
    arrayResult = (Object) inn;
} else {
    arrayResult = results.toArray((Object[]) array);
}

And it solved the issue. If this will not cause any issues later I will commit it to WSC repo.