ppalaga commented on code in PR #144: URL: https://github.com/apache/camel-quarkus-examples/pull/144#discussion_r1220332393
########## cxf-soap/README.adoc: ########## @@ -0,0 +1,197 @@ += Camel Quarkus CXF SOAP example +:cq-example-description: An example that shows how to use Camel CXF SOAP component. + +{cq-description} + +In this example we will create two SOAP webservices with two different approaches. Both services will use Camel routes as service implementation exposed via CXF component. + +== WSDL first + +"WSDL first" approach assumes writing WSDL file manually at the beginning of SOAP service design (such wsdl can be found at `src/main/resources/wsdl/CustomerService.wsdl`). Then we can use the _quarkus-maven-plugin_ and its _generate-code_ goal (see `pom.xml`) which will generate Java classes for us. To configure the plugin, see `src/main/resources/application.properties` file (properties started with `quarkus.cxf.codegen.wsdl2java` prefix). + +The customer web service will be exposed via Camel route endpoint `cxf:bean:customer` and its logic implemented directly in the route with the help of `org.acme.cxf.soap.wsdl.repository.CustomerRepository`. It will enable two operations - _getCustomersByName_ and _updateCustomer_. + +NOTE: Generated classes can be directly used in your IDE (you can see usage eg. in `org.acme.cxf.soap.wsdl.repository.CustomerRepository`). + +TIP: More info about generating Java classes from WSDL can be found at https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/dev/user-guide/first-soap-client.html#wsdl2java. + +== Java first + +On the other hand if we don't have the WSDL file, we can create SOAP service directly from Java interface (see `org.acme.cxf.soap.pojo.service.ContactService`) which is then processed by CXF (will create WSDL file as a benefit - how to obtain it will be shown later) and from that point we can implement the service in Camel fashion (see `org.acme.cxf.soap.pojo.MyPojoRouteBuilder`) as with "WSDL first" approach (but here we implement the logic in bean service - see `org.acme.cxf.soap.pojo.service.impl.ContactServiceInMemoryImpl` and not directly in route). + +The exposed contact web service will enable five operations - _addContact_, _getContact_, _getContacts_, _updateContact_, _removeContact_. + +TIP: If you would like to only generate WSDL from Java, you can follow https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/dev/user-guide/generate-wsdl-from-java.html. + +--- Review Comment: Ah, `---` is horizontal line? I did not know. I thought it is some leftover. No problem with having it there. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org