axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mesaullion" <mesaull...@web.de>
Subject serializing wrong number of elements: ArrayIndexOutOfBoundsException (java:rpc , wsdl, flash)
Date Sun, 25 Apr 2004 15:46:15 GMT
Situation:
I want to calculate Parts of a Fractal on a Client (don't think about the
usability; it's just an example!).
When deploying my Class, which I want to serialize, Axis creates the correct
Datatype in the WSDL by usingthe get- and set-Methods.

Problem:
Everything works fine, but the Problem is, that I don't want to send all the
Information in both directions (to and from server). So I don't want to send
an empty results-Tag via SOAP and either I don't want to receive the
coordinates I gave the client to calculate the Fractal from.

Facts:
What Axis does, is that it only generates 1 Datatype in the WSDL using the
beanMapping. Although there are three elements in my Datatype, Axis only
sends two of them (sessionId and coords). This is what I want.
But I only want to sent two elements back to the server (sessionId and
results), but my client (mm flash, not java/axis) (which auto-generates the
stub from the WSDL) always sends three elements, because the wsdl (and
therefore axis) says so, resulting in an wrong number of parameters sent
back :

<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.ArrayIndexOutOfBoundsException: -125</faultstring>




What could I do...am I missing something? 
Any help appreciated

Thanks a lot.
:::mesaullion.



Development-Parts:

deploy.wsdd;

	<service name="FraktalService" provider="java:RPC">
		<parameter name="className" value="FraktalService" />
		<parameter name="allowedMethods" value="*" />
		<parameter name="scope" value="application" />

 		<beanMapping qname="myNS:Fraktal"
xmlns:myNS="urn:FraktalService" languageSpecificType="java:Fraktal" />
	</service>




Fraktal.java:

	// Methods (which I want to serialize)

	// send and receive the session
	public String getSessionId()
	public void setSessionId(String s)
	
	// only send the coordinates and receive the results
	public void getCoords(int[] c)
	public void setResults(int[] r)
	
	
	// Methods (which I don't want to serialize: so I renamed them)
	public void coordsSet(int[] c) {
	public int[] resultsGet()




FraktalService.wsdl:

// Datatype:
<complexType name="Fraktal">
   <sequence>
      <element name="coords" nillable="true" type="impl:ArrayOf_xsd_int" /> 
      <element name="results" nillable="true" type="impl:ArrayOf_xsd_int" />
      <element name="sessionId" nillable="true" type="xsd:string" /> 
   </sequence>
</complexType>

//public Fraktal getServiceFraktal():
<wsdl:message name="getServiceFraktalRequest" />
<wsdl:message name="getServiceFraktalResponse">
	<wsdl:part name="getServiceFraktalReturn" type="tns1:Fraktal" />
</wsdl:message>

//public String setServiceFraktal(Fraktal f):
<wsdl:message name="setServiceFraktalRequest">
   <wsdl:part name="in0" type="tns1:Fraktal" />
</wsdl:message>
<wsdl:message name="setServiceFraktalResponse">
	<wsdl:part name="setServiceFraktalReturn" type="xsd:string" />
</wsdl:message>


Mime
View raw message