-
1. Re: Complex Type - Serialization Error.
breitscott Sep 24, 2003 5:02 PM (in response to breitscott)The problem is fixed.
I was missing a mapping in the client program.
Here is the web-services.xml.
<?xml version="1.0" encoding="UTF-8"?>
<deployment name="Count" targetNamespace="http://www.thestreits.com/count" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!--
this is an extension to the Axis deployment descriptor which allows to
specify the naming environment for the deployed ws logic
-->
<beanMapping qname="CountData" xmlns:myNS="CounterService" languageSpecificType="java:breit.ejb.client.count.CountData"/>
Here is the client program.
package breit.test.webservice;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
public class Test {
public static void main(String [] args) {
try {
String endpoint =
"http://localhost:8001/jboss-net/services/CounterService";
String methodName = "getCountAsString";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(methodName);
call.addParameter("page",
org.apache.axis.Constants.XSD_STRING,
ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
String ret = (String) call.invoke( new Object[] { "AXIS!" } );
System.out.println("return is " + ret);
} catch (Exception e) {
System.err.println(e.toString());
}
}
} -
2. Re: Complex Type - Serialization Error.
stephanenicoll Sep 26, 2003 9:56 AM (in response to breitscott)I am using jboss-net to generate my deployment descriptor. Do you know how I can do the same? I mean my complex type is declared but Axis couldn't find a deserializer for it (same problem)
Regards,
Stephane -
3. Re: Complex Type - Serialization Error.
crazypalm Oct 23, 2003 10:08 AM (in response to breitscott)Hi,
Your sencond post does not seem that it is the solution of the first post. The return value is String instead of CallData Object as your first post. I don't why you need do mapping if you don't use Object.
Any true solution for the first one?
Thanks