I know there have been other threads about this
problem but I still haven't found a solution that works for me.
The Exception:
java.io.IOException: No serializer found for class au.com.dytech.find_spike.model.MyBean in registry [EMAIL PROTECTED]
The service from server-config:
The Exception:
java.io.IOException: No serializer found for class au.com.dytech.find_spike.model.MyBean in registry [EMAIL PROTECTED]
The service from server-config:
<service name="SimpleBean"
provider="java:RPC">
<parameter name="allowedMethods" value="getBean"/>
<parameter name="className" value="au.com.dytech.find_spike.logic.SimpleBean"/>
<wsdlFile>/SimpleBean.wsdl</wsdlFile>
<beanmapping
xmlns:ns=http://localhost:8080/spike/axis-services/SimpleBean
qname="ns:MyBean"
languagespecifictype="au.com.dytech.find_spike.model.MyBean"/>
</service>
The Build Script:
<axis-java2wsdl
classname = "au.com.dytech.find_spike.service.SimpleBean"
location = http://localhost:8080/spike/axis-services/SimpleBean
namespace = http://service.find_spike.dytech.com.au
output = "${classes}/SimpleBean.wsdl"
serviceelementname = "SimpleBean"
style = "RPC"
use = "encoded"
typemappingversion="1.2">
<classpath refid="axis.class.path"/>
</axis-java2wsdl>
<parameter name="allowedMethods" value="getBean"/>
<parameter name="className" value="au.com.dytech.find_spike.logic.SimpleBean"/>
<wsdlFile>/SimpleBean.wsdl</wsdlFile>
<beanmapping
xmlns:ns=http://localhost:8080/spike/axis-services/SimpleBean
qname="ns:MyBean"
languagespecifictype="au.com.dytech.find_spike.model.MyBean"/>
</service>
The Build Script:
<axis-java2wsdl
classname = "au.com.dytech.find_spike.service.SimpleBean"
location = http://localhost:8080/spike/axis-services/SimpleBean
namespace = http://service.find_spike.dytech.com.au
output = "${classes}/SimpleBean.wsdl"
serviceelementname = "SimpleBean"
style = "RPC"
use = "encoded"
typemappingversion="1.2">
<classpath refid="axis.class.path"/>
</axis-java2wsdl>
<axis-wsdl2java
output="${webapp}"
testcase="true"
verbose="true"
url=""
typemappingversion="1.2">
</axis-wsdl2java>
<!-- Then copy the server-config.wsdd file to WEB-INF -->
The Interface:
package au.com.dytech.find_spike.service;
import au.com.dytech.find_spike.model.MyBean;
package au.com.dytech.find_spike.service;
import au.com.dytech.find_spike.model.MyBean;
public interface SimpleBean
{
public MyBean getBean();
}
{
public MyBean getBean();
}
The Implementation:
package au.com.dytech.find_spike.logic;
import au.com.dytech.find_spike.model.MyBean;
import au.com.dytech.find_spike.service.SimpleBean;
package au.com.dytech.find_spike.logic;
import au.com.dytech.find_spike.model.MyBean;
import au.com.dytech.find_spike.service.SimpleBean;
public class SimpleBeanImpl implements SimpleBean
{
public MyBean getBean()
{
MyBean myBean = new MyBean();
myBean.setName("Test");
return myBean;
}
}
The Bean:
package au.com.dytech.find_spike.model;
import java.io.Serializable;
package au.com.dytech.find_spike.model;
import java.io.Serializable;
public class MyBean implements Serializable
{
private String name;
public String getName()
{
return name;
}
{
private String name;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
}
{
this.name = name;
}
}
The WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.find_spike.dytech.com.au" xmlns:tns3="http://model.find_spike.dytech.com.au" xmlns:impl="http://service.find_spike.dytech.com.au" xmlns:intf="http://service.find_spike.dytech.com.au" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://model.find_spike.dytech.com.au">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="MyBean">
<sequence>
<element name="name" nillable="true" type="soapenc:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getBeanResponse">
<wsdl:part name="getBeanReturn" type="tns3:MyBean"/>
</wsdl:message>
<wsdl:message name="getBeanRequest">
</wsdl:message>
<wsdl:portType name="SimpleBean">
<wsdl:operation name="getBean">
<wsdl:input name="getBeanRequest" message="impl:getBeanRequest"/>
<wsdl:output name="getBeanResponse" message="impl:getBeanResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleBeanSoapBinding" type="impl:SimpleBean">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getBean">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getBeanRequest">
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service.find_spike.dytech.com.au"/>
</wsdl:input>
<wsdl:output name="getBeanResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service.find_spike.dytech.com.au"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SimpleBean">
<wsdl:port name="SimpleBean" binding="impl:SimpleBeanSoapBinding">
<wsdlsoap:address location="http://localhost:8080/spike/axis-services/SimpleBean"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.find_spike.dytech.com.au" xmlns:tns3="http://model.find_spike.dytech.com.au" xmlns:impl="http://service.find_spike.dytech.com.au" xmlns:intf="http://service.find_spike.dytech.com.au" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://model.find_spike.dytech.com.au">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="MyBean">
<sequence>
<element name="name" nillable="true" type="soapenc:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getBeanResponse">
<wsdl:part name="getBeanReturn" type="tns3:MyBean"/>
</wsdl:message>
<wsdl:message name="getBeanRequest">
</wsdl:message>
<wsdl:portType name="SimpleBean">
<wsdl:operation name="getBean">
<wsdl:input name="getBeanRequest" message="impl:getBeanRequest"/>
<wsdl:output name="getBeanResponse" message="impl:getBeanResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleBeanSoapBinding" type="impl:SimpleBean">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getBean">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getBeanRequest">
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service.find_spike.dytech.com.au"/>
</wsdl:input>
<wsdl:output name="getBeanResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service.find_spike.dytech.com.au"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SimpleBean">
<wsdl:port name="SimpleBean" binding="impl:SimpleBeanSoapBinding">
<wsdlsoap:address location="http://localhost:8080/spike/axis-services/SimpleBean"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Does anyone have any idea what the problem is (and how to fix it)?
I think it's something to do with the way the service is deployed, because
I've got other services with the same problem, and I know it's not a client
problem because I get the problem with http get and through a webMethods Glue
client as well.
I've been pulling my hair out for some time now trying to find out what's
wrong. PLEASE HELP!!!
Kind regards,
Nathan