Hi Martin, Thanx a lot..yes now that problem is removed. But still there is problem. Now exception arises is [SOAPException: faultCode=SOAP-ENV:Server; msg=Exception while handling service request: Logger.log(MailInfo) -- no signature match] at SoapTestLogger.main(SoapTestLogger.java:59) Exception in thread "main" Process Exit... The exception is due to the fact that server class has paramater of Object type and from here i am sending MailInfo class...I can remove this problem by simply changing my parameter to MailInfo type..but i need this as object type as i have to send other classes to. I have to made it genric for some other fix classes..Is there any idea... Regards, Susheel Chauhan ----- Original Message ----- From: "Martin Smolny" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 30, 2001 2:53 PM Subject: Re: Its urgent..... Hi, I do not know your MailInfo class but I think you have no standard constructor (a constructor with no parameters) implemented. The BeanSerializer expects this - as defined in the Java Bean specification - because he instantiates the class using class.newInstance(); Hope this helps... --------------------------------------------------------- Hi all, i have my server class that accept java Object class as a parameter..The signature of this class is public String log(Object a_oActionInfoStruct) Now from my client i would like to send any user defined java class to this server ... I have tried to send my MailInfo class .I deployed my service using deployment descriptor successfully as attached with this mail.. The code for my java client is also mention below. But when i run my program it get exception [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'MailInfo': MailInfo] at SoapTestLogger.main(SoapTestLogger.java:59) Exception in thread "main" Process Exit... Please help me to resolve this condition as how to send Object class from client. public class SoapTestLogger { public static void main( String[] args) throws Exception { Call call = new Call(); URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter/"); String SOAPActionURI = ""; SOAPMappingRegistry smr = call.getSOAPMappingRegistry(); call.setTargetObjectURI("urn:loggerservice"); call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/"); BeanSerializer ser_0 = new BeanSerializer(); smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/", new QName( "urn:classtypes","MailInfo"), MailInfo.class, ser_0, ser_0); System.out.println ("Calling Log method"); MailInfo mlInfo = new MailInfo("[EMAIL PROTECTED]","[EMAIL PROTECTED]","TEST","TEST" ); call.setMethodName("log"); Vector params = new Vector(); params.addElement(new Parameter("obj",mlInfo.getClass(),mlInfo,null)); call.setParams(params); Response resp = call.invoke(url, SOAPActionURI); // Check the response. if (resp.generatedFault()) { Fault fault = resp.getFault(); throw new SOAPException(fault.getFaultCode(), fault.getFaultString()); } else { Parameter retValue = resp.getReturnValue(); String str= (String) retValue.getValue(); System.out.println ("Result is" + str); } } } Thanx in adnvance
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:loggerservice"> <isd:provider type="java" scope="Application" methods="log"> <isd:java class="Logger" static="false"/> </isd:provider> <isd:mappings> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="urn:classtypes" qname="x:MailInfo" javaType="MailInfo" xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer" java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/> </isd:mappings> </isd:service>