[
https://issues.apache.org/jira/browse/CXF-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-2132.
------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.2)
2.2.1
2.1.5
> @Oneway doesn't work with simple/bare element types
> ---------------------------------------------------
>
> Key: CXF-2132
> URL: https://issues.apache.org/jira/browse/CXF-2132
> Project: CXF
> Issue Type: Bug
> Components: Soap Binding
> Affects Versions: 2.2
> Environment: Win XP, CXF 2.2, Java 5
> Reporter: Abhishek Goel
> Assignee: Daniel Kulp
> Fix For: 2.1.5, 2.2.1
>
> Attachments: screenshot-1.jpg, src.zip
>
>
> If the service interface is specified to have a parameter style of
> bare/simple by using the @SOAPBinding annotation, a method that has been
> annotated with @Oneway does not behave as expected. The method still acts as
> a two way method in that the client is not free'd up immediately. The client
> waits for method to finish processing.
> Interface:
> @WebService
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface HelloWorld
> {
> @WebMethod
> @Oneway
> void sayHiOneWay(String text);
> }
> Impl:
> @WebService(endpointInterface = "demo.hw.server.HelloWorld", serviceName =
> "HelloWorld")
> public class HelloWorldImpl implements HelloWorld
> {
> @Oneway
> public void sayHiOneWay(String text)
> {
> System.out.println("sayHiOneWay called");
> System.out.println("sleeping for 10 secs");
> try { Thread.sleep(10000); }
> catch (InterruptedException e) { e.printStackTrace(); }
> System.out.println("woke up after 10 secs");
> System.out.println("accepted: " + text);
> }
> }
> Client:
> public final class Client
> {
> private static final QName SERVICE_NAME = new
> QName("http://server.hw.demo/", "HelloWorld");
> private static final QName PORT_NAME = new
> QName("http://server.hw.demo/", "HelloWorldPort");
> private Client()
> {
> }
> public static void main(String args[]) throws Exception
> {
> Service service = Service.create(SERVICE_NAME);
> // Endpoint Address
> String endpointAddress = "http://localhost:9090/Hello";
> // Add a port to the Service
> service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING,
> endpointAddress);
>
> HelloWorld hw = service.getPort(HelloWorld.class);
>
> System.out.println("Invoke sayHiOneWay()....");
> long startTime = System.currentTimeMillis();
> hw.sayHiOneWay(System.getProperty("user.name"));
> System.out.println("Time taken to call sayHiOneWay(): " +
> (System.currentTimeMillis()-startTime) + " ms");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.