Axis defaults to "rpc" style, so you must set the OPERATION_STYLE_PROPERTY to "document". You also must pass the "wrapped" elements rather than the "unwrapped" parameters. So you must pass in the "getMessage" value object, and get the "getMessageResponse" value object for the return value.
Anne On 12/27/06, Pradyumna Kanchi <[EMAIL PROTECTED]> wrote:
Hi, I want to invoke a web service. I don't want to generate the client from WSDL. Instead I am using axis client Call. I am able to invoke the web service method written in .Net and getting the acknowledgement. But the .Net web service is receiving empty parameter from the axis client even though the data is being passed. (But it is receiving data if I invoke from the classes generated from WSDL) The web service is of document / literal. I am using axis 1.4. Is it possible to invoke .Net service without using the classes generated from WSDL? Following is the code that I am using. String endPointAddress = "http://192.168.1.22/testws/service.asmx"; String qname = "http://tempuri.org/"; String soapURI = "http://tempuri.org/getMessage"; String methodName = "getMessage"; org.apache.axis.client.Service service = new org.apache.axis.client.Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(new java.net.URL(endPointAddress)); call.setUseSOAPAction(true); call.setSOAPActionURI(soapURI); call.setEncodingStyle(null); call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); call.setOperationName(new javax.xml.namespace.QName(qname, methodName)); call.setTimeout(60000); String returned = (String) call.invoke(new Object[]{" Test Message"}); Thanks & Regards, Pradyumna --------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information contained in this transmittal and Documents accompanying same are legally privileged and confidential information intended only for the use of the individual or entity named herein. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copy of this transmittal is strictly prohibited. --------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
