manirathnamgowd / soi-toolkit

Automatically exported from code.google.com/p/soi-toolkit
0 stars 0 forks source link

Document how returned Soap-faults can be customised for inbound SOAP/HTTP-endpoints #338

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Clarification is needed on how to adopt the returned Soap-fault for different 
kind of error conditions and error codes.

There is a soap-fault transformer generated by default and declared:
a) in the commons.xml file as:
  <custom-transformer class="org.soitoolkit.commons.mule.soap.CreateSoapFaultIfExceptionTransformer" name="createSoapFaultIfException"/>
b) on the inbound http-endpoint as:
  responseTransformer-refs="createSoapFaultIfException logRespOut" />

A suggested way to change the default behaviour is to:
1. copy the default transformer class to your own integration component and 
give it a proper name in your own package namespace
2. declare your new transformer, either in your service.xml or your common.xml
3. configure the transformer on the http-inbound endpoint (instead of the 
default)
4. run tests to see that the refactoring is ok
5. modify behaviour in your own fault-transformer

Example from service-file:

  <custom-transformer name="myFaultTransformer" class="org.sample.icwstows.wstows.CreateSoapFaultIfExceptionTransformer"/>

  <flow name="wsToWs-service">
    <http:inbound-endpoint
        ...
        responseTransformer-refs="myFaultTransformer logRespOut" />

Original issue reported on code.google.com by hakan.dahl@gmail.com on 23 Apr 2013 at 8:54

GoogleCodeExporter commented 9 years ago
Thanks!

Very good, let's give this one priority.

Original comment by magnus.l...@gmail.com on 24 Apr 2013 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by hakan.dahl@gmail.com on 24 Feb 2014 at 4:31