It doesn't work.
This is the source:
public class SoapUser {
public SimpleUser findNameByPK(int id){
SimpleUser simpleUser = new SimpleUser();
UserService userService = new UserService();
WeseUser user = userService.getByPrimaryKey(1);
simpleUser.setId(user.getUserId().intValue());
simpleUser.setNome(user.getUserNome());
return simpleUser;
}
}
with SimpleUser like this:
public class SimpleUser implements Serializable{
public SimpleUser()
{
}
public int id;
/**
* @return Returns the id.
*/
public int getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(int id) {
this.id = id;
}
/**
* @return Returns the nome.
*/
public String getNome() {
return nome;
}
/**
* @param nome The nome to set.
*/
public void setNome(String nome) {
this.nome = nome;
}
public String nome;
}
here is the deploy.wsdd:
<!-- Use this file to deploy some handlers/chains and services -->
<!-- Two ways to do this: -->
<!-- java org.apache.axis.client.AdminClient deploy.wsdd -->
<!-- after the axis server is running -->
<!-- or -->
<!-- java org.apache.axis.utils.Admin client|server deploy.wsdd -->
<!-- from the same directory that the Axis engine runs -->
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from SoapUserService WSDL service -->
<service name="security" provider="java:RPC" style="rpc" use="encoded">
<parameter name="wsdlTargetNamespace" value="urn:siag.security.soap"/>
<parameter name="wsdlServiceElement" value="SoapUserService"/>
<parameter name="wsdlServicePort" value="security"/>
<parameter name="className"
value="siag.security.soap.ws.SecuritySoapBindingImpl"/>
<parameter name="wsdlPortType" value="SoapUser"/>
<operation name="findNameByPK" qname="operNS:findNameByPK"
xmlns:operNS="urn:siag.security.soap" returnQName="findNameByPKReturn"
returnType="rtns:SimpleUser" xmlns:rtns="urn:siag.security.soap" >
<parameter name="id" type="tns:int"
xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
</operation>
<parameter name="allowedMethods" value="findNameByPK"/>
<parameter name="scope" value="Session"/>
<typeMapping
xmlns:ns="urn:siag.security.soap"
qname="ns:SimpleUser"
type="java:siag.security.soap.ws.SimpleUser"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</service>
</deployment>
What's wrong?