I am tasked to create a simple tool, invoking a specific, SOAP-based web service.
I am new to Java Spring Framework and Web services in general. I have been reading up on both for a while now.
So far, I am able to invoke a method, which does not have parameters and get back the result, but I hav trouble adding parameters to the request.
Code so far:
String msg = "<methodname xmlns=\"http://www.namespace.com/\">" +
"<param1>TEST</param1>"+
"<param2>TEST</param2>"+
"</methodname>";
ApplicationContext appCon = new ClassPathXmlApplicationContext("appCon.xml");
BeeSmartSpringConnector bee = (BeeSmartSpringConnector) appCon.getBean("BeeSmartConnector");
bee.setDefaultUri("http://127.0.0.1:85/WebServices/TestBean?wsdl");
bee.simpleSendAndReceive(msg);
As a result, the webservice returns the message:
Required parameter not found! --> Parameters : param1="null", param2="null"
According to the WSDL-file those two parameters are exactly what the method needs.
Can you please tell what I did wrong? Maybe wrong formatting of request?
How about setting msg as…