1. Run 'ant' command in 'wso2esb-4.0.3\samples\axis2Server\src\SimpleStockQuoteService'
2. Start axis2server in ESB from 'wso2esb-4.0.3\samples\axis2Server\axis2server.bat'
3. Start ESB from 'wso2esb-4.0.3\bin\wso2server.bat'
Now Create Proxy for test Log mediator in WSO2 ESB (4.0.3)
4. Fill Fields as Below
Then You will Find proxy we create on 'Web Services'-->'List'-->'LogMediatorTest'
5. Go to 'LogMediatorTest' and click on 'Edit' in ‘Specific Configuration’
6. Then go to 'Step 2 of 3 - In Sequence and Endpoint Options' by click on Next button
7. Click Define Inline (Radio Button) and click on 'Create'
8. Add ‘Log’
9. Change the Log level to ‘Full’ and update
Source view
<log xmlns="http://ws.apache.org/ns/synapse" level="full" />
10. Then ‘Apply’ and ‘save’
Finish the editing by ‘next’ and ‘Finish’
11. Enter 'ant' in '\wso2esb-4.0.3\samples\axis2Client' to build clients
12. Then Enter 'ant stockquote -Dtrpurl=http://localhost:8280/services/LogMediatorTest -Dsymbol=IBM' in Client.
Here is log from ESB
Here is the Envelope Body of the log.
<soapenv:Body>
<m0:getQuote xmlns:m0="http://services.samples">
<m0:request>
<m0:symbol>IBM</m0:symbol>
</m0:request>
</m0:getQuote>
</soapenv:Body>
Now I need log only the symbol.
b. Now we will create 'Custom' log
b1. Now we update 'properties of the Log mediator'
'//m0:getQuote/m0:request/m0:symbol' in Expression
Adding name space for custom log. (Click ‘save’ to save)
'm0' as Prefix
'http://services.samples' as URI
To Test this Run the client again
‘ant stockquote -Dtrpurl=http://localhost:8280/services/LogMediatorTest -Dsymbol=IBM’
Here is console log of the esb
Ok, work is success.
Add ‘//m0:getQuote/m0:request/m0:symbol’ as
Add a comment