Something I forgot to show, public class FooImpl implements Foo
-----Original Message----- From: Deppen, Jeff [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 3:10 PM To: [EMAIL PROTECTED] Subject: Interface in public web service method? All, Is it possible to expose a method (operation) that has an interface parameter type? For example, assume I have an interface and an implementing class: public interface Foo { String getName(); void setName(String pName); } public class FooImpl { public FooImpl() {} public String getName() { return "abc";} public void setName(String pName) { } } Can I expose as a web service operation the following method? public class MyService { public MyService() {} public String getName(Foo aFoo) { return aFoo.getName(); } } When I try to do something similar to this, I get a SAXException "Unable to create JavaBean of type Foo. Missing default constructor?". Why is it trying to create an instance of Foo instead of FooImpl - I've defined a type mapping for Foo in my wsdd file that references FooImpl. Here's a snippet of my wsdd: <service name="MyService" provider="java:RPC"> <parameter name="className" value="MyService"/> <parameter name="allowedMethods" value="getName"/> </service> <typeMapping xmlns:ns="http://localhost:8080/myservice" qname="ns:Foo" type="java:FooImpl" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
