Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 40333 invoked by uid 500); 15 Jul 2002 13:35:15 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 40323 invoked from network); 15 Jul 2002 13:35:15 -0000 Date: 15 Jul 2002 13:35:29 -0000 Message-ID: <20020715133529.29961.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: axis-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 10824] New: - dynamic proxy client has problem with beans X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10824 dynamic proxy client has problem with beans Summary: dynamic proxy client has problem with beans Product: Axis Version: current (nightly) Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Serialization/Deserialization AssignedTo: axis-dev@xml.apache.org ReportedBy: cchabanois@cognicase.fr Note : I tested with beta-3 version but beta-3 is not proposed in "Version" listbox in Bugzilla ... I have a service that takes a bean as parameter. I deployed it using Axis. I got wsdl using "http://localhost:8080/axis/services/Address?wsdl". The wsdl I got was good. When I tried to use my dynamic proxy client, I got the following error : " - Mapping Exception to AxisFault AxisFault faultCode: {http://xml.apache.org/axis/}Server.userException faultString: java.io.IOException: No serializer found for class address.AddressBean in registry org.apache.axis.encoding.TypeMappingImpl@2ba11b faultActor: null faultDetail: ... " I tried then to use JAX-RPC RI from Sun (with my service running on Axis) >java address.AddressClient Your street : 55, rue des Lilas Your postCode : 75005 Which is the result that is intended. here is the interface : ======================== package address; public interface AddressService extends java.rmi.Remote { public String updateAddress(AddressBean addressBean, int newPostCode) throws javax.xml.rpc.ServiceException; } Here is the implementation : ============================ package address; public class AddressServiceImpl implements AddressService { public String updateAddress(AddressBean addressBean, int newPostCode) throws javax.xml.rpc.ServiceException { addressBean.setPostcode(newPostCode); return("Your street : "+addressBean.getStreet()+"\nYour postCode : "+newPostCode); } } Here is the bean : ================ package address; public class AddressBean implements java.io.Serializable { private java.lang.String street; private int postcode; public AddressBean() { } public java.lang.String getStreet() {return street;} public void setStreet(java.lang.String street) { this.street = street; } public int getPostcode() { return postcode; } public void setPostcode(int postcode) {this.postcode = postcode; } } And the wsdd : ============== And the client (dynamic proxy client) ======================================= package address; import java.net.*; import javax.xml.rpc.*; import javax.xml.namespace.QName; public class AddressClient { public static void main(String[] args) { try { URL urlWsdl = new URL("http://localhost:8080/axis/services/Address?wsdl"); String nameSpaceUri = "http://soapNcl/address/"; String serviceName = "AddressServiceImplService"; String portName = "Address"; ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(urlWsdl,new QName(nameSpaceUri, serviceName)); AddressService myProxy = (AddressService) service.getPort(new QName(nameSpaceUri, portName), AddressService.class); AddressBean addressBean = new AddressBean(); addressBean.setStreet("55, rue des Lilas"); System.out.println(myProxy.updateAddress(addressBean, 75005)); } catch (Exception e) { e.printStackTrace(); } } }