2. What I have done in these 24
weeks
Task 1
Writing test cases for migrating Axis2 from
Apache XMLSchema1 to Apache
XMLSchema2
3. What is Apache XMLSchema?
Apache XMLSchema is a lightweight Java object model
that can be used to manipulate and generate XML schema
representations. You can use it to read XML Schema (xsd)
files into memory and analyze or modify them, or to create
entirely new schemas from scratch.
Versions
1.4.x - The version which axis2 is using
2.0 - A major revision that takes advantage of
the facilities of Java 1.5.
4. Considerations
We cannot just migrate from 1.x to 2.0 because
both have same namespaces and different APIs
Many core modules of Axis2 uses XMLSchem1
libraries and there are no tests has written to
cover those usages.
So the starting point of this migration we had to
write tests cases for XMLSchema usage in
Axis2 and then do the migration.
5. Progress
I wrote test cases to cover XMLSchema1
usages in axis2 for all the modules like kernel,
codegen,etc.
Now migration can be started directly.
6. Task2 - Writing integration tests
for WSO2 ESB.
Added test coverage for
− Iterate Mediator
− Clone Mediator
− Store Mediator
− DB Lookup Mediator
− Message Stores
− Sevaral Patch automations
Wrote test utilities for clarity framework to
capture wire messages and generate SOAP
messages of predifined sizes.
7. Task 3 - Performance improvements for
Axis2's POJO web services
• What is a POJO Web Service?
myService.aar
8. Current service invocation method
Load service implementation
class through java reflection Service
Check method and parameters
needed through reflection
Request
RPC
Client
Client Message Invoke service method
Response
Receiver
Serialize output
In this method response time become considerably high due to
reflection overhead
9. Solution
Deployment Time
myService
Deploy
myService.
Support Classes
aar Axis2
Op1Wrapper
Generate
Op2Wrapper
Op3Wrapper
MyServiceReciever
10. Solution Ct.
SayHelloWrapper
Run Time
SayHelloParser()
SayHelloParser()
Service
Request: sayHello();
RPC Delegate
SayHelloEcecutor()
SayHelloEcecutor()
Client
Client Message
Receiver
Response: Hello
SayHelloSerializer()
SayHelloSerializer()
12. Performance Comparison
n (c=20) Current Method New Method
(req/second) (req/second)
100 602.9 1492.69
1000 2345.09 2619.91
10000 5636.28 6669.06
50000 5842.15 6828.96
n (c=50) Current Method New Method
(req/second) (req/second)
100 794.12 2,368.15
1000 3,183.93 4,590.14
10000 5,639.33 6,608.76
50000 5842.15 6828.96
13. Faced Challenges
• We did not had a detailed architecture design but a high
level design at the start. So architecture had to be evolve
with the project.
• We had to choose a byte code manipulation library to
generate the code. So I had to play with different
libraries as ASM, JavaAssist and choose one of them.
• Generated code cannot be debugged. They are in
bytecode and no source available. So finding a simple
error takes a lot of time.
• Java StaX was used to parse XML. So generating code
for it is complex than generating for a high level library
like Axiom
14. What I have learnt?
Technologies
• Java • XML • SOAP • JavaAssist • ASM • Jquery
• TestNG • Reflection • Stax • ByteCode • XML Unit • Axiom
Products
• Axis2 • Syna • WSO2 • Clarity • WSO2 AS • WSO2
pse ESB Framework Carbon
• Tomcat
Tools
• Eclipse • Idea • SOAP UI • Jmeter • JavaBench • TCP
Mon
• Maven • Ant • Subversion • Asmifire • Jetty • Jira
• Find • Sonar
Bugs
15. What I have learnt? Ct.
• Experience of working on large brown field
projects
• Software testing methodologies
• How to maintain good code quality
• How a organization operates
• Contributing to open source products
• Soft Skills