A healthy diet for your Java application Devoxx France.pdf
Consuming SOAP Web Services with MuleSoft CXF Proxy Client
1. CONSUMING SOAP WEB SERVICE
- MULESOFT CXF PROXY-CLIENT MODULE
Vince Jason Soliza
2. MuleSoft CXF Proxy Client Module
When using CXF inside of Mule, there are
several different ways to consume web service.
One is the Proxy Client: Unlike jax-ws-client that
oblige to use JAXB-Objects, this one could work
directly with XML when consuming web
services.
4. Main Flow Components
• HTTP Listener
– Accepts the request
• Transform Message
– Create request for web service consumer the output is XML
• Flow Reference
– Reference to the Flow of EchoServiceFlow
• Transform Message
– Parse the response of EchoServiceFlow to XML
5. CXF Client Components
• CXF
– proxy-client configuration
• HTTP request
– http request hold the configuration for the target endpoint
6. Request Configuration
We used Transform Message to create a SOAP request, cxf:jax-ws-client
requires jaxb-object as the acceptable request so we added xml-to-jaxb-
object transformer after it.
8. cxf:proxy-client Configuration
CXF proxies support working with the SOAP body or the entire SOAP
envelope. By default only the SOAP body is sent as payload, but the payload
mode can be set via the "payload" attribute to envelope if needed.
9. Cxf:proxy-client Configuration
We put cxf:proxy-client into a new private flow, to wrap it as a SOAP web
service consumer.
code snippet:
<flow name="EchoServiceProxyFlow">
<cxf:proxy-client
doc:name="CXF"
soapVersion="1.2" payload="body" />
<http:request config-ref="HTTP_Request_Configuration"
path="/echo-ws/ws/EchoService" method="POST"
doc:name="HTTP" />
</flow>
12. Test the application
• Run the application in Anypoint Studio.
• Send request through HTTP using Postman, browser or any client you
prefer.
• We can see in the screenshot below, the response of the soap web service
we consumed using cxf:proxy-client as web service consumer.
13. Summary
This slide describes how to consume web services
using the CXF proxy-client message processor.
While it is recommended to use web service
consumer in consuming SOAP web service there
are several reasons you may want to use proxy-
client, such as:
• You don’t want to use the WSDL
• You want to work with the SOAP envelope
• To take advantage of the CXF web service
standards support to use WS-Security or WS-
Addressing
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Sections can help to organize your slides or facilitate collaboration between multiple authors. On the Home tab under Slides, click Section, and then click Add Section.
Notes
Use the Notes pane for delivery notes or to provide additional details for the audience. You can see these notes in Presenter View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Summarize presentation content by restating the important points from the lessons.
What do you want the audience to remember when they leave your presentation?