I have a web application that contains an Axis web service that is available for other applications to connect through http. I also have a servlet in the same web application that I would like to have access the service using the LocalTransport. I am having trouble getting the client calls setup right for the local call. Can anyone give me some pointers.
Here is the code I am using in the servlet. System.out.println("This is a test"); String wsdd = "<deployment xmlns=\"http://xml.apache.org/axis/wsdd/\" " + "xmlns:java=\"" + WSDDConstants.URI_WSDD_JAVA + "\">\n" + " <transport name=\"local\" pivot=\"java:org.apache.axis.transport.local.LocalSender\"/>\n" + " <service name=\"" + WSDDConstants.URI_WSDD + "\" provider=\"java:MSG\">\n" + " <parameter name=\"allowedMethods\" value=\"AdminService\"/>\n" + " <parameter name=\"className\" value=\"org.apache.axis.utils.Admin\"/>\n" + " </service>\n" + "</deployment>"; try { //Service service = new Service(); Service service = new Service(new XMLStringProvider(wsdd)); Call call = (Call) service.createCall(); call.setOperationName(new QName("LocalTester", "ReturnString")); call.addParameter( "str", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); call.setTransport( new LocalTransport() ); String ret = (String) call.invoke(new Object[] { "Hello!" }); System.out.println("Sent 'Hello!', got '" + ret + "'"); } catch (Exception e) { e.printStackTrace(); }
This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [EMAIL PROTECTED] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation. Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("e-sign") unless a specific statement to the contrary is included in this message.