SlideShare a Scribd company logo
SOAP VALIDATION
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.MAIND
ATA" DOC:NAME="SOAP"/>
<COMPONENT
CLASS="COM.TEST.SERVICES.SCHEMA.MAINDATA.V1.IMPL.MAINDAT
AIMPL" 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/Sch
ema+Validation+Filter

More Related Content

Viewers also liked

Quartz in mule
Quartz in muleQuartz in mule
Quartz in mule
Son Nguyen
 
The routing message processor scatter gather
The routing message processor scatter gatherThe routing message processor scatter gather
The routing message processor scatter gather
Son Nguyen
 
Jesusmata hardware.ppt
Jesusmata hardware.pptJesusmata hardware.ppt
Jesusmata hardware.ppt
Jesus Mata
 
Robo de identidad y seguridad informatica
Robo de identidad y seguridad informaticaRobo de identidad y seguridad informatica
Robo de identidad y seguridad informatica
Claudia Reyess
 
Neurotransmisores
NeurotransmisoresNeurotransmisores
Neurotransmisores
Maria E. Panzarelli R.
 
Actividad Integradora Ser o no ser Social
Actividad Integradora Ser o no ser SocialActividad Integradora Ser o no ser Social
Actividad Integradora Ser o no ser Social
María Guadalupe Serrano Briseño
 
Diabetes gestacional who 2013
Diabetes gestacional who 2013Diabetes gestacional who 2013
Diabetes gestacional who 2013
Rosabell Orfelinda
 
Digging github
Digging githubDigging github
Digging github
Hansol Lim
 
Flow measurement
Flow measurementFlow measurement
Flow measurement
Srinivasa Rao
 
Tumores oseos
Tumores oseosTumores oseos
Tumores oseos
Luis Blanco
 
Korean drama
Korean dramaKorean drama
Korean drama
Meleidy Santiago
 
Robo de identidad y seguridad informatica
Robo de identidad y seguridad informaticaRobo de identidad y seguridad informatica
Robo de identidad y seguridad informatica
Claudia Reyess
 
Neurotransmisores y sus aplicaciones en la psicologia
Neurotransmisores y sus aplicaciones en la psicologiaNeurotransmisores y sus aplicaciones en la psicologia
Neurotransmisores y sus aplicaciones en la psicologia
tinaa_
 
Derecho Romano - Sesion y garantia derechos de credito
Derecho Romano - Sesion y garantia derechos de creditoDerecho Romano - Sesion y garantia derechos de credito
Derecho Romano - Sesion y garantia derechos de credito
Fran Mendoza
 
managed-services-buying-guide
managed-services-buying-guidemanaged-services-buying-guide
managed-services-buying-guideMarie Peters
 

Viewers also liked (17)

Quartz in mule
Quartz in muleQuartz in mule
Quartz in mule
 
The routing message processor scatter gather
The routing message processor scatter gatherThe routing message processor scatter gather
The routing message processor scatter gather
 
Jesusmata hardware.ppt
Jesusmata hardware.pptJesusmata hardware.ppt
Jesusmata hardware.ppt
 
Robo de identidad y seguridad informatica
Robo de identidad y seguridad informaticaRobo de identidad y seguridad informatica
Robo de identidad y seguridad informatica
 
Neurotransmisores
NeurotransmisoresNeurotransmisores
Neurotransmisores
 
Actividad Integradora Ser o no ser Social
Actividad Integradora Ser o no ser SocialActividad Integradora Ser o no ser Social
Actividad Integradora Ser o no ser Social
 
Diabetes gestacional who 2013
Diabetes gestacional who 2013Diabetes gestacional who 2013
Diabetes gestacional who 2013
 
Digging github
Digging githubDigging github
Digging github
 
Flow measurement
Flow measurementFlow measurement
Flow measurement
 
Tumores oseos
Tumores oseosTumores oseos
Tumores oseos
 
Korean drama
Korean dramaKorean drama
Korean drama
 
Robo de identidad y seguridad informatica
Robo de identidad y seguridad informaticaRobo de identidad y seguridad informatica
Robo de identidad y seguridad informatica
 
Neurotransmisores y sus aplicaciones en la psicologia
Neurotransmisores y sus aplicaciones en la psicologiaNeurotransmisores y sus aplicaciones en la psicologia
Neurotransmisores y sus aplicaciones en la psicologia
 
Gaussjordan
GaussjordanGaussjordan
Gaussjordan
 
Edgar
EdgarEdgar
Edgar
 
Derecho Romano - Sesion y garantia derechos de credito
Derecho Romano - Sesion y garantia derechos de creditoDerecho Romano - Sesion y garantia derechos de credito
Derecho Romano - Sesion y garantia derechos de credito
 
managed-services-buying-guide
managed-services-buying-guidemanaged-services-buying-guide
managed-services-buying-guide
 

Similar to Soap validation

Soap in mule
Soap in muleSoap in mule
Soap in mule
D.Rajesh Kumar
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
D.Rajesh Kumar
 
Soap In Mule
Soap In MuleSoap In Mule
Soap In Mule
Bui Kiet
 
Mule soap
Mule soapMule soap
Mule soap
Anand kalla
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
irfan1008
 
Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating soap request in mule
mdfkhan625
 
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
javeed_mhd
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
Sunil Komarapu
 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
Rajkattamuri
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
Hasan Syed
 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
Khan625
 
Mule soap
Mule soapMule soap
Mule soap
Phaniu
 
Mule soap
Mule soapMule soap
Mule soap
Phaniu
 
Mule soap
Mule soapMule soap
Mule soap
Praneethchampion
 
Mule soap
Mule soapMule soap
Mule soap
irfan1008
 
Mule soap
Mule soapMule soap
Mule soap
D.Rajesh Kumar
 
Mule soap
Mule soapMule soap
Mule soap
princeirfancivil
 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
Anirban Sen Chowdhary
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
Anirban Sen Chowdhary
 

Similar to Soap validation (20)

Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Soap In Mule
Soap In MuleSoap In Mule
Soap In Mule
 
Mule soap
Mule soapMule soap
Mule soap
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
 
Validating soap request in mule
Validating soap request in mule Validating soap request in mule
Validating 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
 
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
 
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
 
Mule soap
Mule soapMule soap
Mule soap
 
Validating a soap request in mule
Validating a soap request in muleValidating a soap request in mule
Validating a soap request in mule
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
 

More from Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
Son Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
Son Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
Son Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
Son Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
Son Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
Son Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
Son Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
Son Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
Son Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
Son Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
Son Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
Son Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
Son Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
Son Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
Son Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
Son Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
Son Nguyen
 
Jms queue
Jms queueJms queue
Jms queue
Son Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
Son Nguyen
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
Son Nguyen
 

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Soap validation

  • 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.MAIND ATA" DOC:NAME="SOAP"/> <COMPONENT CLASS="COM.TEST.SERVICES.SCHEMA.MAINDATA.V1.IMPL.MAINDAT AIMPL" 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/Sch ema+Validation+Filter