WSF/Jython Heshan T. Suriyaarachchi November 2007
What is Jython ? <ul><li>JPython was the first implementation of Python programming language in java. Then the project was...
WSF/Jython usage <ul><li>Expose python scripts as web services through the Python Deployer  </li></ul><ul><li>Write servic...
Axis2 Architecture
<ul><li>Python Deployer  </li></ul>
Python Deployer – Server Side
Python Deployer – Data Binding <ul><li>Python data types are dynamic as opposed to XML, which has static data types. There...
Python Deployer – Annotating a Python Script <ul><li>Following code shows how a method should be annotated, in order to us...
How a Python Service gets Deployed <ul><li>Annotations of the python service are read. </li></ul><ul><li>AxisService is cr...
<ul><li>Jython Service Client API </li></ul>
Jython Client API
Jython Client API <ul><li>When your jython client script is executed, a mapping java service client is created and execute...
Jython Client API <ul><li>SOAP </li></ul><ul><li>WS – Addressing </li></ul><ul><li>WS – Security </li></ul><ul><li>Attachm...
A Sample Client
<ul><li>Thank you </li></ul>
Upcoming SlideShare
Loading in …5
×

WSO2 WSF/Jython

2,260 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,260
On SlideShare
0
From Embeds
0
Number of Embeds
101
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WSO2 WSF/Jython

  1. 1. WSF/Jython Heshan T. Suriyaarachchi November 2007
  2. 2. What is Jython ? <ul><li>JPython was the first implementation of Python programming language in java. Then the project was moved to SourceForge and renamed Jython. </li></ul><ul><li>Jython is a programming hybrid. It exhibits the strengths of both its parents, namely Java and Python. </li></ul><ul><li>Since Jython is written in 100% in java , scripts written using jython will run on top of any compliant Java Virtual Machine (JVM). </li></ul>
  3. 3. WSF/Jython usage <ul><li>Expose python scripts as web services through the Python Deployer </li></ul><ul><li>Write service clients using the WSF/Jython API. </li></ul>
  4. 4. Axis2 Architecture
  5. 5. <ul><li>Python Deployer </li></ul>
  6. 6. Python Deployer – Server Side
  7. 7. Python Deployer – Data Binding <ul><li>Python data types are dynamic as opposed to XML, which has static data types. Therefore within the deployer we have to map the python data types to XML schema data types. This process is known as data binding. </li></ul>
  8. 8. Python Deployer – Annotating a Python Script <ul><li>Following code shows how a method should be annotated, in order to use the python deployer. </li></ul>
  9. 9. How a Python Service gets Deployed <ul><li>Annotations of the python service are read. </li></ul><ul><li>AxisService is created for the python service. </li></ul><ul><li>AxisOperaion is created for every python method. </li></ul><ul><li>AxisMessage is added to the operation. It contains the types of the method parameters. </li></ul><ul><li>Each and every AxisOperation is added to the AxisService. </li></ul><ul><li>Then XML Schema for the python message is generated. </li></ul><ul><li>Finally the generated AxisService is given to axis2 engine. Then axis2 engine generates the WSDL out of it. </li></ul>
  10. 10. <ul><li>Jython Service Client API </li></ul>
  11. 11. Jython Client API
  12. 12. Jython Client API <ul><li>When your jython client script is executed, a mapping java service client is created and executed. </li></ul><ul><li>Then a web service call is made and the result is passed back to your client script. </li></ul><ul><li>Bottom line is that WSF/Jython client API is a a wrapper for Axis2 Service Client API. </li></ul>
  13. 13. Jython Client API <ul><li>SOAP </li></ul><ul><li>WS – Addressing </li></ul><ul><li>WS – Security </li></ul><ul><li>Attachments with MTOM </li></ul><ul><li>REST </li></ul>
  14. 14. A Sample Client
  15. 15. <ul><li>Thank you </li></ul>

×