Thanks Sebastian.
However how can I debug my configuration to find the problem?
Thierry

Hi,

I think that looks like your bean can not be deserialized correctly. I see
no difference to way I did it and it worked. Are you sure your bean does
match the guidelines of JavaBeans?
If yes: did you try to deploy the beanmapping in your client-config.wsdd?
This should not make the difference, but who knows...

hope that could help greetings from Hamburg/Germany
Seppo

-----Urspr�ngliche Nachricht-----
Von: Th Templ [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 7. Januar 2003 10:26
An: [EMAIL PROTECTED]
Betreff: Problem with beanMapping


Hello,

I have problem with beanMapping. I can invoke the method of the service
correctly with a Java Axis client but all the field of my object are 0 or
null.

However when I try the url in a navigator to try the call of the method (
http://localhost/jgeneaws/services/JGeneaService?method=getCommune ), I have

the good xml with the good values in the good fields of my bean...

My source files:

deply.wsdd
---------------------------------------------------------------------
<deployment name="deploy" xmlns="http://xml.apache.org/axis/wsdd/";

xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";

xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";>

<service name="JGeneaService" provider="java:RPC">
<parameter name="className"
value="org.genealogie.service.JGeneaService"/>
<parameter name="allowedMethods" value="*"/>

<beanMapping qname="myNS:CommuneUtils" xmlns:myNS="urn:JGeneaService"

languageSpecificType="java:org.genealogie.utils.CommuneUtils"/>
</service>
</deployment>

Client.java
---------------------------------------------------------------------
Service service = new Service();
Call call = (Call) service.createCall(); // *1*

String endpoint="http://localhost/jgeneaws/services/JGeneaService";;
call.setTargetEndpointAddress(new java.net.URL(endpoint));

QName qnCommune=new QName("urn:JGeneaService","CommuneUtils");
call.registerTypeMapping(CommuneUtils.class,qnCommune,
new
org.apache.axis.encoding.ser.BeanSerializerFactory(CommuneUtils.class,qnComm
une),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(CommuneUtils.class,qnCo
mmune)
);

call.setOperationName("getCommune");
call.setReturnType(qnCommune);

CommuneUtils commune=(CommuneUtils)call.invoke(
new Object [] { }
);
System.out.println(commune.getId()+"/"+commune.getNom()+"/"+commune.getDepar
tementId()+"/"+commune.getDepartementNom());


JGeneaService.java
---------------------------------------------------------------------
public class JGeneaService {

public JGeneaService() {
}

public CommuneUtils getCommune() {
CommuneUtils commune=new CommuneUtils(14,"ma
commune","-",77,"Seine-et-Marne","77",1,"France");

System.out.println(commune.getId()+"/"+commune.getNom()+"/"+commune.getDepar
tementId()+"/"+commune.getDepartementNom());
return commune;
}
}


The last System.out.println writes 0/null/0/null

Has anybody already had this problem?
Thanks for your help.






_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=features/junkmail

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

Reply via email to