[
https://issues.apache.org/jira/browse/CXF-8003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800673#comment-16800673
]
Andriy Redko edited comment on CXF-8003 at 3/25/19 1:16 PM:
------------------------------------------------------------
Hi [~Oneping],
Regarding the first part, the async flavour you are referencing is applicable
to the methods which **do return results****. In case of **void**, the method
become @Oneway (you could spot this annotation in the contract). There is a
documentation section
[http://cxf.apache.org/docs/developing-a-service.html#DevelopingaService-The@Onewayannotation]
regarding it:
{quote}The {{@Oneway}} annotation is defined by the {{javax.jws.Oneway}}
interface. It is placed on the methods in the SEI that will not require a
response from the service. The {{@Oneway}} annotation tells the run time that
it can optimize the execution of the method by not waiting for a response and
not reserving any resources to process a response.
{quote}
The Spring Boot documentation is there:
[http://cxf.apache.org/docs/springboot.html] (we also have a lot of samples in
[https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples]
for typical scenarios).
If you run Maven builds from your IDE, the test may finish the execution before
breakpoint triggers (again, the nature of async call). The log statements is
the best tool here but if you really need to debug, the simplest way in this
particular case would be to set really delay (a few minutes) so the JVM won't
finish before you are done with debugging.
was (Author: reta):
Hi [~Oneping],
Regarding the first part, the async flavour you are referencing is applicable
to the methods which **do return results**. In case of **void**, the method
become @Oneway (you could spot this annotation in the contract). There is a
documentation section
[http://cxf.apache.org/docs/developing-a-service.html#DevelopingaService-The@Onewayannotation]
regarding it:
{quote}The {{@Oneway}} annotation is defined by the {{javax.jws.Oneway}}
interface. It is placed on the methods in the SEI that will not require a
response from the service. The {{@Oneway}} annotation tells the run time that
it can optimize the execution of the method by not waiting for a response and
not reserving any resources to process a response.
{quote}
The Spring Boot documentation is there:
[http://cxf.apache.org/docs/springboot.html] (we also have a lot of samples in
[https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples]
for typical scenarios).
If you run Maven builds from your IDE, the test may finish the execution before
breakpoint triggers (again, the nature of async call). The log statements is
the best tool here but if you really need to debug, the simplest way in this
particular case would be to set really delay (a few minutes) so the JVM won't
finish before you are done with debugging.
> @MockBean issue in cxf-spring-boot-starter-jaxws
> ------------------------------------------------
>
> Key: CXF-8003
> URL: https://issues.apache.org/jira/browse/CXF-8003
> Project: CXF
> Issue Type: Bug
> Reporter: Tsvetoslav
> Priority: Minor
> Attachments: cxf-jaxws-spring-boot-new.zip, image (1).png,
> image-2019-03-22-15-30-26-348.png, image-2019-03-22-15-30-49-153.png
>
>
> Hi,
>
> I'm creating Soap web service using wsdl2java plugin. I use
> cxf-spring-boot-starter-jaxws dependency which gives me an opportunity to
> create the service using both frameworks Apache-cxf and Spring boot. When I
> was developing my Integration tests, I faced an issue which blocks my work.
> I've created a component which is client to another service. This component
> has been @Autowired in my Implementation class. In my test I would like to
> mock this component because during the build I don't want to have real call
> to the service. For some reason when the Implementation method is from *void*
> return type, the Mocking doesn't work properly.
> I attached you a Screenshot from my test and implementation class.
> Here is the log from the execution:
> 11:09:09.697 [http-nio-9091-exec-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> Executing operation es2GetEIS
> 11:09:09.698 [http-nio-9091-exec-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> *TEST BEAN: CallMockClient_ES2GetEis*
> ----
> 11:09:09.733 [default-workqueue-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> Executing operation es2DownloadProfile
> 11:09:09.734 [default-workqueue-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> *TEST BEAN: null*
> I hope you can help me out for the problem.
> Thank you in advance!
>
> PS: I tested with different dependencies version and hit the same issue
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)