SlideShare a Scribd company logo
1 of 13
Soap Service in Mule
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.
.
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
Mule soap

More Related Content

What's hot

Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in muleMohammed246
Ā 
Soap request in mule
Soap request in mule Soap request in mule
Soap request in mule Praneethchampion
Ā 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovyAnirban Sen Chowdhary
Ā 

What's hot (7)

Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
Ā 
Soap in mule
Soap in muleSoap in mule
Soap in mule
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Soap request in mule
Soap request in mule Soap request in mule
Soap request in mule
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Ā 
Timer Interceptor in Mule
Timer Interceptor in MuleTimer Interceptor in Mule
Timer Interceptor in Mule
Ā 

Viewers also liked

KITCHEN FLOOR PLAN
KITCHEN FLOOR PLANKITCHEN FLOOR PLAN
KITCHEN FLOOR PLANTara Miller
Ā 
Mule Choice component
Mule Choice component Mule Choice component
Mule Choice component AbdulImrankhan7
Ā 
Arctic
ArcticArctic
Arcticthomield
Ā 
Naveen Kumar ccna - network engineer
Naveen Kumar   ccna - network engineerNaveen Kumar   ccna - network engineer
Naveen Kumar ccna - network engineerNAVEEN KUMAR
Ā 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gatewayKhasim Saheb
Ā 
Mulesoft cloudhub
Mulesoft cloudhubMulesoft cloudhub
Mulesoft cloudhubkeshav Naidu
Ā 
Production schedule
Production scheduleProduction schedule
Production schedulebethanyymichele
Ā 
Cystic Fibrosis Letter
Cystic Fibrosis LetterCystic Fibrosis Letter
Cystic Fibrosis LetterKim Rubin
Ā 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesGennaro Spagnoli
Ā 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesGennaro Spagnoli
Ā 
Apply Rate Limiting Policy
Apply Rate Limiting Policy Apply Rate Limiting Policy
Apply Rate Limiting Policy Vince Soliza
Ā 
Pontics /certified fixed orthodontic courses by Indian dental academy
Pontics  /certified fixed orthodontic courses by Indian dental academy Pontics  /certified fixed orthodontic courses by Indian dental academy
Pontics /certified fixed orthodontic courses by Indian dental academy Indian dental academy
Ā 
commit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studiocommit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studioSunil Komarapu
Ā 

Viewers also liked (15)

KITCHEN FLOOR PLAN
KITCHEN FLOOR PLANKITCHEN FLOOR PLAN
KITCHEN FLOOR PLAN
Ā 
Mule Choice component
Mule Choice component Mule Choice component
Mule Choice component
Ā 
Arctic
ArcticArctic
Arctic
Ā 
Naveen Kumar ccna - network engineer
Naveen Kumar   ccna - network engineerNaveen Kumar   ccna - network engineer
Naveen Kumar ccna - network engineer
Ā 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
Ā 
Mulesoft cloudhub
Mulesoft cloudhubMulesoft cloudhub
Mulesoft cloudhub
Ā 
Production schedule
Production scheduleProduction schedule
Production schedule
Ā 
Cystic Fibrosis Letter
Cystic Fibrosis LetterCystic Fibrosis Letter
Cystic Fibrosis Letter
Ā 
La web
La webLa web
La web
Ā 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
Ā 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
Ā 
Apply Rate Limiting Policy
Apply Rate Limiting Policy Apply Rate Limiting Policy
Apply Rate Limiting Policy
Ā 
Pontics /certified fixed orthodontic courses by Indian dental academy
Pontics  /certified fixed orthodontic courses by Indian dental academy Pontics  /certified fixed orthodontic courses by Indian dental academy
Pontics /certified fixed orthodontic courses by Indian dental academy
Ā 
commit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studiocommit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studio
Ā 
Nursing process diagnosing
Nursing process diagnosingNursing process diagnosing
Nursing process diagnosing
Ā 

Similar to Mule soap

Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating soap request in mule javeed_mhd
Ā 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in muleSunil Komarapu
Ā 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in muleRajkattamuri
Ā 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in muleHasan Syed
Ā 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in muleKhan625
Ā 
Validating a soap request in mule
Validating a soap request in mule Validating a soap request in mule
Validating a soap request in mule AbdulImrankhan7
Ā 
Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating soap request in mule mdfkhan625
Ā 
Soap validation
Soap validationSoap validation
Soap validationSon Nguyen
Ā 
Mule soap
Mule soapMule soap
Mule soapPhaniu
Ā 
Mule soap
Mule soapMule soap
Mule soapirfan1008
Ā 
Mule soap
Mule soapMule soap
Mule soapPhaniu
Ā 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in muleAnirban Sen Chowdhary
Ā 
Web services101
Web services101Web services101
Web services101chaos41
Ā 
Web services automation from sketch
Web services automation from sketchWeb services automation from sketch
Web services automation from sketchIT Weekend
Ā 
Json
JsonJson
Jsonmanavp
Ā 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json mdfkhan625
Ā 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json javeed_mhd
Ā 

Similar to Mule soap (20)

Soap in mule
Soap in muleSoap in mule
Soap in mule
Ā 
Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating soap request in mule
Ā 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
Ā 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
Ā 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
Ā 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
Ā 
Validating a soap request in mule
Validating a soap request in mule Validating a soap request in mule
Validating a soap request in mule
Ā 
Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating soap request in mule
Ā 
Soap validation
Soap validationSoap validation
Soap validation
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Mule soap
Mule soapMule soap
Mule soap
Ā 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
Ā 
Web services101
Web services101Web services101
Web services101
Ā 
Web services automation from sketch
Web services automation from sketchWeb services automation from sketch
Web services automation from sketch
Ā 
Json
JsonJson
Json
Ā 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
Ā 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
Ā 

More from Anand kalla

Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1Anand kalla
Ā 
Maven in Mule
Maven in MuleMaven in Mule
Maven in MuleAnand kalla
Ā 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in MuleAnand kalla
Ā 
Java in Mule
Java in MuleJava in Mule
Java in MuleAnand kalla
Ā 
web services
web servicesweb services
web servicesAnand kalla
Ā 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule EsbAnand kalla
Ā 
UDDI in Mule Esb
UDDI in Mule EsbUDDI in Mule Esb
UDDI in Mule EsbAnand kalla
Ā 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule EsbAnand kalla
Ā 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esbAnand kalla
Ā 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectorsAnand kalla
Ā 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectorsAnand kalla
Ā 
Mule execution
Mule executionMule execution
Mule executionAnand kalla
Ā 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectorsAnand kalla
Ā 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingAnand kalla
Ā 
Mule architecture
Mule architectureMule architecture
Mule architectureAnand kalla
Ā 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchangeAnand kalla
Ā 
Mule security saml
Mule security samlMule security saml
Mule security samlAnand kalla
Ā 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaasAnand kalla
Ā 
Mule for each scope header collection
Mule for each scope header collectionMule for each scope header collection
Mule for each scope header collectionAnand kalla
Ā 

More from Anand kalla (20)

Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1
Ā 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
Ā 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
Ā 
Java in Mule
Java in MuleJava in Mule
Java in Mule
Ā 
web services
web servicesweb services
web services
Ā 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule Esb
Ā 
UDDI in Mule Esb
UDDI in Mule EsbUDDI in Mule Esb
UDDI in Mule Esb
Ā 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
Ā 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
Ā 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
Ā 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectors
Ā 
Mule execution
Mule executionMule execution
Mule execution
Ā 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
Ā 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
Ā 
Mule architecture
Mule architectureMule architecture
Mule architecture
Ā 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchange
Ā 
Mule soa
Mule soaMule soa
Mule soa
Ā 
Mule security saml
Mule security samlMule security saml
Mule security saml
Ā 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
Ā 
Mule for each scope header collection
Mule for each scope header collectionMule for each scope header collection
Mule for each scope header collection
Ā 

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
Ā 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationRadu Cotescu
Ā 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
Ā 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
Ā 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
Ā 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Ā 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Ā 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 

Mule soap

  • 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. 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..
  • 4. Letā€™s see howā€¦ Let consider we have a SOAP webs ervice exposed in Mule by following way :-
  • 5. 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
  • 6. So after adding schema validation filter in our flow, our flow looks like the following
  • 7. We can also add a subflow which will throw custom message if the SOAP request is invalid as follow :-
  • 8. So, if we test the webservice with a wrong SOAP request in SoapUI we will get a custom message :-
  • 9. This is how the flow works:-
  • 10. <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.
  • 11. <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:-
  • 12. 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