"out" parameter in web service
by Yanguang Chen
Hello everyone,
Wise 1.1 is really great, i like the easy way to use it. But recently i
encounter a problem.
When i tried to invoke a simple web service with "out" parameter, "argument
type mismatch" exceptions were thrown. I read the API carefully and took a
close look at the source code (to be more precise,
"src\core\src\test\java\org\jboss\wise\core\client\impl\reflection\WSMethodImplTest.java"),
then found wise did support the "out" parameter, am i right?
Here is a code snippet:
val clientBuilder = WSDynamicClientFactory.getJAXWSClientBuilder();
val client =
clientBuilder.tmpDir("clienttmp").verbose(true).keepSource(true)
.wsdlURL("http://localhost:7777/info?wsdl").build();
val method = client.getWSMethod("InformationService", "InformationPort",
"getInfo");
val requestMap = new HashMap[String, Object]
requestMap.put("arg0", "test".asInstanceOf[Object]);
requestMap.put("arg1", Integer.valueOf(3));
requestMap.put("arg2", Integer.valueOf(0));
val result = method.invoke(requestMap, null);
System.out.println(result.getMapRequestAndResult(null, null));
client.close();
It's written in Scala. Since it's very simple , i don't think there is a
need to explain it.
The logfile and sample server-side web service code are in the attachment.
Can anybody help me?
Thanks in advance.
Best Regards,
Yanguang Chen
14 years