Validating a SOAP Request in
Mule
Presented by Prince
We often come across SOAP web services in our project and
often face different challenges in handling SOAP web
services. One such challenge is SOAP request validation.
.
In Mule ESB we can expose a SOAP webservices and can
handle the request validation in very simple way.
.
Yes, I am talking about using message filter to validate a
SOAP request against a given XSD file
In simple words if we have the XSD file of
web service we can validate the request of
the web service against that XSD using a
schema validation filter in Mule..
Let’s see how…
Let consider we have a SOAP webs ervice exposed in Mule by
following way :-
Now, if we want to validate the request with an XSD file of the web
service and want to throw a custom message in case if the SOAP
request is invalid or incorrect, we need to use schema
validation filter
So after adding schema validation filter in our flow, our flow looks
like the following
We can also add a subflow which will throw custom message if the
SOAP request is invalid as follow :-
So, if we test the webservice with a wrong SOAP request in SoapUI
we will get a custom message :-
This is how the flow works:-
<mulexml:schema-validation-filter name="Schema_Validation"
schemaLocations="MainData.xsd" returnResult="true" doc:name="Schema Validation" />
The code:-
You need to use schema validation filter which will refer to your
XSD files for validating a SOAP request as follows:-
The Schema Validation Filter uses the JAXP libraries to validate a message against
a schema. You must provide the path, file name, and extension of the schema or
schemas in the Schema Locations property.
<flow name="ServiceFlow" doc:name="ServiceFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost"
port="8082" path="mainData" doc:name="HTTP"/>
<message-filter onUnaccepted="ValidationFailFlow" doc:name="filter to validate xml
against xsd" throwOnUnaccepted="true" >
<filter ref="Schema_Validation"/>
</message-filter>
<cxf:jaxws-service validationEnabled="true"
serviceClass="com.test.services.schema.maindata.v1.MainData" doc:name="SOAP"/>
<component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl"
doc:name="JavaMain_ServiceImpl"/>
</flow>
A code snipped of the Mule config:-
To get the full code access for implementing a SOAP Request
validator in Mule, please visit :-
http://anirbansenchowdhary.com/blog/?p=131
You can also visit Mule documentation on Schema Validation :-
http://www.mulesoft.org/documentation/display/current/Schema+
Validation+Filter
Validate Soap Request in Mule

More Related Content

PPTX
Validate soap request in mule
PPTX
Soap in mule
PPTX
Validating a soap request in mule
PPT
Mule and web services
PPTX
Creating dynamic json
PPTX
Soap In Mule
PPTX
Simple web service vm
PPTX
Mule soap
Validate soap request in mule
Soap in mule
Validating a soap request in mule
Mule and web services
Creating dynamic json
Soap In Mule
Simple web service vm
Mule soap

What's hot (8)

PPTX
Soap request in mule
PPTX
Mule velocity
PPTX
Creating dynamic json in Mule
 
PPTX
Scheduling and monitoring with java in mule
PPTX
VM example in mule
PPTX
Filtering jms messages with mule
PPTX
Mule soap
PPTX
Web service vm in mule
Soap request in mule
Mule velocity
Creating dynamic json in Mule
 
Scheduling and monitoring with java in mule
VM example in mule
Filtering jms messages with mule
Mule soap
Web service vm in mule
Ad

Viewers also liked (17)

PDF
Boletín de novidades. Sección adultos. Setembro-outubro 2015
PDF
Školský poriadok ZŠ Vazovova 4 Bratislava
DOCX
CV GUPRON & DOKUMEN LAIN
PPTX
Mule soap
PPTX
Mule for each scope headerc ollection
PPT
Doing Business In Web 2
PPT
Mule technology
PPTX
Message properties component in mule demo
PPTX
Filter expression in mule demo
PPTX
Jordy 3 parcial dfso
DOC
Nurses_Self Reported_Self Asssessment_2015
PPTX
Salesforce Integration using Mule ESB
PPTX
Mule in a nutshell
PPTX
PostgreSQL使いのエンジニアから見たMySQL
PPT
Implementation in mule esb
PPTX
Silver Line Update: Dec. 1, 2015
PDF
Introduction To Applied Machine Learning
Boletín de novidades. Sección adultos. Setembro-outubro 2015
Školský poriadok ZŠ Vazovova 4 Bratislava
CV GUPRON & DOKUMEN LAIN
Mule soap
Mule for each scope headerc ollection
Doing Business In Web 2
Mule technology
Message properties component in mule demo
Filter expression in mule demo
Jordy 3 parcial dfso
Nurses_Self Reported_Self Asssessment_2015
Salesforce Integration using Mule ESB
Mule in a nutshell
PostgreSQL使いのエンジニアから見たMySQL
Implementation in mule esb
Silver Line Update: Dec. 1, 2015
Introduction To Applied Machine Learning
Ad

Similar to Validate Soap Request in Mule (20)

PPTX
Validating a soap request in mule
PPTX
Validating a soap request in mule
PPTX
Validate soap request in mule
PPTX
Validating soap request in mule
PPTX
Validate soap request in mule
PPTX
Validating a soap request in mule
PPTX
Validating soap request in mule
PPTX
Mule soap
PPTX
Soap in mule
PPTX
Soap validation
PPTX
Mule soap
PPTX
Mule soap
PPTX
Mule soap
PPTX
Mule soap
PPTX
Playing with cxf interceptor in mule
PPTX
Create dynamic json using mule
PPTX
Creating dynamic json
PPTX
Creating dynamic json
PPTX
Creating dynamic json in mule
PPTX
Creating dynamic json
Validating a soap request in mule
Validating a soap request in mule
Validate soap request in mule
Validating soap request in mule
Validate soap request in mule
Validating a soap request in mule
Validating soap request in mule
Mule soap
Soap in mule
Soap validation
Mule soap
Mule soap
Mule soap
Mule soap
Playing with cxf interceptor in mule
Create dynamic json using mule
Creating dynamic json
Creating dynamic json
Creating dynamic json in mule
Creating dynamic json

More from irfan1008 (20)

PPTX
Converting with custom transformer
PPTX
Caching and invalidating with managed store
PPTX
Cache for community edition
PPTX
Mule
PPTX
Groovy with Mule
PPTX
WebService with VM Mule
PPTX
Xslt in mule
PPT
Developing Oracle Connector Using Mule
PPTX
Send email attachment using smtp in mule esb
PPT
Mule oracle connectors
PPT
Mule google connectors
PPT
Mule execution
PPT
Mule database-connectors
PPT
Mule batch processing
PPT
Mule architecture
PPT
Mule anypoint exchange
PPTX
Mule soa
PPT
Mule security saml
PPT
Mule security jaas
PPTX
Mule esb
Converting with custom transformer
Caching and invalidating with managed store
Cache for community edition
Mule
Groovy with Mule
WebService with VM Mule
Xslt in mule
Developing Oracle Connector Using Mule
Send email attachment using smtp in mule esb
Mule oracle connectors
Mule google connectors
Mule execution
Mule database-connectors
Mule batch processing
Mule architecture
Mule anypoint exchange
Mule soa
Mule security saml
Mule security jaas
Mule esb

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPT
Geologic Time for studying geology for geologist
PPTX
The various Industrial Revolutions .pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Five Habits of High-Impact Board Members
PPTX
Modernising the Digital Integration Hub
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Getting started with AI Agents and Multi-Agent Systems
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Hindi spoken digit analysis for native and non-native speakers
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Geologic Time for studying geology for geologist
The various Industrial Revolutions .pptx
Module 1.ppt Iot fundamentals and Architecture
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
1 - Historical Antecedents, Social Consideration.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Five Habits of High-Impact Board Members
Modernising the Digital Integration Hub
DP Operators-handbook-extract for the Mautical Institute
Developing a website for English-speaking practice to English as a foreign la...
Web Crawler for Trend Tracking Gen Z Insights.pptx
CloudStack 4.21: First Look Webinar slides
observCloud-Native Containerability and monitoring.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
STKI Israel Market Study 2025 version august
Getting started with AI Agents and Multi-Agent Systems

Validate Soap Request in Mule

  • 1. Validating a SOAP Request in Mule Presented by Prince
  • 2. We often come across SOAP web services in our project and often face different challenges in handling SOAP web services. One such challenge is SOAP request validation. .
  • 3. In Mule ESB we can expose a SOAP webservices and can handle the request validation in very simple way. .
  • 4. Yes, I am talking about using message filter to validate a SOAP request against a given XSD file In simple words if we have the XSD file of web service we can validate the request of the web service against that XSD using a schema validation filter in Mule..
  • 5. Let’s see how… Let consider we have a SOAP webs ervice exposed in Mule by following way :-
  • 6. Now, if we want to validate the request with an XSD file of the web service and want to throw a custom message in case if the SOAP request is invalid or incorrect, we need to use schema validation filter
  • 7. So after adding schema validation filter in our flow, our flow looks like the following
  • 8. We can also add a subflow which will throw custom message if the SOAP request is invalid as follow :-
  • 9. So, if we test the webservice with a wrong SOAP request in SoapUI we will get a custom message :-
  • 10. This is how the flow works:-
  • 11. <mulexml:schema-validation-filter name="Schema_Validation" schemaLocations="MainData.xsd" returnResult="true" doc:name="Schema Validation" /> The code:- You need to use schema validation filter which will refer to your XSD files for validating a SOAP request as follows:- The Schema Validation Filter uses the JAXP libraries to validate a message against a schema. You must provide the path, file name, and extension of the schema or schemas in the Schema Locations property.
  • 12. <flow name="ServiceFlow" doc:name="ServiceFlow"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/> <message-filter onUnaccepted="ValidationFailFlow" doc:name="filter to validate xml against xsd" throwOnUnaccepted="true" > <filter ref="Schema_Validation"/> </message-filter> <cxf:jaxws-service validationEnabled="true" serviceClass="com.test.services.schema.maindata.v1.MainData" doc:name="SOAP"/> <component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/> </flow> A code snipped of the Mule config:-
  • 13. To get the full code access for implementing a SOAP Request validator in Mule, please visit :- http://anirbansenchowdhary.com/blog/?p=131 You can also visit Mule documentation on Schema Validation :- http://www.mulesoft.org/documentation/display/current/Schema+ Validation+Filter