Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can weblogic client takes empty arrays being returned.

Status
Not open for further replies.

jadeite100

Programmer
May 17, 2006
19
CA
Hi All:

I am using weblogic 9.2 to generate the web service client code.
Here is my build.xml file to build the java client code:

<project name="webservices-TEST" default="client">
<taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
<target name="client" >
<clientgen
wsdl=" destDir="clientclasses"
packageName="com.TEST.TEST2.caps.wsclient"
>

</clientgen>
</target>

</project>


Here is my client code to test the web service.
public class testWebServicesClient
{
public static void main(String[] test)
{
try {

Long recipientId = 11597997730620L;

AccumulatorWS impl = new AccumulatorWS_Impl("
IAccumulatorWS iAccWS1 = impl.getIAccumulatorWS();

AccumulatorResponse response = iAccWS1.getCurrentAccumulators(recipientId, "", "", "", "en", "");

System.err.println("The status is: " + response.getStatus());

}

catch (Exception e) {

e.printStackTrace();

}






}
}

I get the following error:
java.rmi.RemoteException: Illegal Capacity: -1; nested exception is:
java.lang.IllegalArgumentException: Illegal Capacity: -1
at com.test.wsclient.IAccumulatorWS_Stub.getCurrentAccumulators(IAccumulatorWS_Stub.java:46)
at test.testWebServicesClient.main(testWebServicesClient.java:27)
Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -1
at java.util.ArrayList.<init>(ArrayList.java:111)
at com.bea.staxb.runtime.internal.util.collections.ArrayListBasedObjectAccumulator.createNewStore(ArrayListBasedObjectAccumulator.java:42)
at com.bea.staxb.runtime.internal.util.collections.ObjectAccumulator.<init>(ObjectAccumulator.java:39)
at com.bea.staxb.runtime.internal.util.collections.ArrayListBasedObjectAccumulator.<init>(ArrayListBasedObjectAccumulator.java:31)
at com.bea.staxb.runtime.internal.util.collections.AccumulatorFactory.createAccumulator(AccumulatorFactory.java:37)
at com.bea.staxb.runtime.internal.util.collections.AccumulatorFactory.createAccumulator(AccumulatorFactory.java:74)
at com.bea.staxb.runtime.internal.SoapArrayRuntimeBindingType.createIntermediary(SoapArrayRuntimeBindingType.java:255)
at com.bea.staxb.runtime.internal.RuntimeBindingProperty.createIntermediary(RuntimeBindingProperty.java:117)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.unmarshalElementProperty(SoapUnmarshalResult.java:364)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.basicExtractAndFill(SoapUnmarshalResult.java:241)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.extractAndFillElementProp(SoapUnmarshalResult.java:174)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:51)
at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshalIntoIntermediary(AttributeUnmarshaller.java:47)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.umarshalComplexElementWithId(SoapUnmarshalResult.java:395)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.unmarshalElementProperty(SoapUnmarshalResult.java:366)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.basicExtractAndFill(SoapUnmarshalResult.java:241)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.extractAndFillElementProp(SoapUnmarshalResult.java:174)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:51)
at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshal(AttributeUnmarshaller.java:38)
at com.bea.staxb.runtime.internal.SoapUnmarshalResult.unmarshalBindingType(SoapUnmarshalResult.java:110)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:212)
at com.bea.staxb.runtime.internal.SoapUnmarshallerImpl.unmarshalType(SoapUnmarshallerImpl.java:93)
at weblogic.wsee.bind.runtime.internal.EncodedDeserializerContext.unmarshalType(EncodedDeserializerContext.java:66)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:170)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:87)
at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:401)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeReturn(SoapDecoder.java:316)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:165)
at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:116)
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:136)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeOutput(CodecHandler.java:117)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:94)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleResponse(CodecHandler.java:71)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:242)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:226)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:161)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:116)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:335)
at com.test.IAccumulatorWS_Stub.getCurrentAccumulators(IAccumulatorWS_Stub.java:37)
... 1 more


If I changed from

Long recipientId = 11597997730620L;

to

Long recipientId = 14998712L;

I get the error message The status is: 4.

The group that generates the web service state that the weblogic client code is choking
on empty arrays being returned. They say they have to return empty arrays
instead of nulls where no data is returned.

Is there something wrong with the weblogic tools
or am I using it incorrectly?



Yours,

Frustrated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top