Apache Axis: Difference between revisions
Undid revision 461239988 by 168.87.3.33 (talk) |
No edit summary |
||
(35 intermediate revisions by 30 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Web service framework}} |
|||
{{Infobox software |
{{Infobox software |
||
| name = Apache Axis |
| name = Apache Axis |
||
| logo = [[ |
| logo = [[File:Apache Axis Logo.jpg|150px|Apache Axis Logo]] |
||
| screenshot = |
| screenshot = |
||
| caption = |
| caption = |
||
| developer = [[Apache Software Foundation]] |
| developer = [[Apache Software Foundation]] |
||
| latest release version = 1.4 |
| latest release version = 1.4 |
||
| latest release date = {{ |
| latest release date = {{Start date and age|2006|04|22}} |
||
| operating system = [[Cross-platform]] |
| operating system = [[Cross-platform]] |
||
| programming language = [[Java (programming language)|Java |
| programming language = [[C++]], [[Java (programming language)|Java]] |
||
| genre = [[Web service]] |
| genre = [[Web service]] |
||
| license = [[Apache License |
| license = [[Apache License 2.0]] |
||
| website = |
| website = {{URL|//axis.apache.org/}} |
||
}} |
}} |
||
⚫ | '''Apache Axis''' ('''A'''pache e'''X'''tensible '''I'''nteraction '''S'''ystem) is an [[Open-source software|open-source]], [[XML]] based [[Web service]] framework. It consists of a [[Java (programming language)|Java]] and a [[C++]] implementation of the [[SOAP (protocol)|SOAP]] server, and various utilities and [[API]]s for generating and deploying [[WWW|Web]] service applications. Using Apache Axis, developers can create interoperable, [[distributed computing]] applications. Axis development takes place under the auspices of the [[Apache Software Foundation]]. |
||
⚫ | '''Apache Axis''' is an [[ |
||
==Axis for Java== |
==Axis for Java== |
||
When using the Java version of Axis there are two ways to expose Java code as Web service. The easiest one is to use Axis native JWS (Java Web Service) files. |
When using the Java version of Axis, there are two ways to expose Java code as Web service. The easiest one is to use Axis native JWS (Java Web Service) files. |
||
Another way is to use custom deployment. Custom deployment enables you to customize resources that should be exposed as Web |
Another way is to use custom deployment. Custom deployment enables you to customize resources that should be exposed as Web services. |
||
See also [[Apache Axis2]]. |
See also [[Apache Axis2]]. |
||
Line 25: | Line 25: | ||
JWS files contain Java class source code that should be exposed as Web service. The main difference between an ordinary java file and jws file is the file extension. Another difference is that jws files are deployed as [[source code]] and not compiled [[class file]]s. |
JWS files contain Java class source code that should be exposed as Web service. The main difference between an ordinary java file and jws file is the file extension. Another difference is that jws files are deployed as [[source code]] and not compiled [[class file]]s. |
||
The following example |
The following example will expose methods ''add'' and ''subtract'' of class Calculator.<ref>{{Cite web|url=http://axis.apache.org/axis/java/user-guide.html#Publishing_Web_Services_with_Axis|title=Apache Axis – User's Guide|website=axis.apache.org|language=en|access-date=2018-11-22}}</ref> |
||
⚫ | |||
It will expose methods ''add'' and ''subtract'' of class Calculator. |
|||
⚫ | |||
public class Calculator |
public class Calculator |
||
{ |
{ |
||
Line 40: | Line 39: | ||
} |
} |
||
} |
} |
||
</syntaxhighlight> |
|||
</source> |
|||
====JWS Web service deployment==== |
====JWS Web service deployment==== |
||
Once the Axis servlet is deployed, you need only to copy the jws file to the Axis directory on the server. This will work if you are using |
Once the Axis servlet is deployed, you need only to copy the jws file to the Axis directory on the server. This will work if you are using an |
||
[[Apache Tomcat]] container. In the case that you are using another web container, custom [[WAR (Sun file format)|WAR]] archive creation will be required |
[[Apache Tomcat]] container. In the case that you are using another web container, custom [[WAR (Sun file format)|WAR]] archive creation will be required. |
||
====JWS Web service access==== |
====JWS Web service access==== |
||
JWS Web service is accessible using the URL <nowiki>http://localhost:8080/axis/Calculator.jws</nowiki> |
JWS Web service is accessible using the URL <nowiki>http://localhost:8080/axis/Calculator.jws</nowiki>. If you are running a custom configuration of [[Apache Tomcat]] or a different container, the URL might be different.<ref>{{Cite web |title=Apache Axis2 – ADB - Howto |url=https://axis.apache.org/axis2/java/core/docs/adb/adb-howto.html |access-date=2023-09-19 |website=axis.apache.org}}</ref> |
||
===Custom deployed Web service=== |
===Custom deployed Web service=== |
||
Line 54: | Line 54: | ||
====Automated generation of WSDL==== |
====Automated generation of WSDL==== |
||
When a Web service is exposed using Axis it will generate a [[Web Services Description Language|WSDL]] file automatically when accessing the Web service URL with ''?WSDL'' appended to it. |
When a Web service is exposed using Axis, it will generate a [[Web Services Description Language|WSDL]] file automatically when accessing the Web service URL with ''?WSDL'' appended to it. |
||
==Axis for C++== |
|||
An example for implementing and deploying a simple web-service with the C++ version of Axis can be found in the Axis-CPP Tutorial (link in the Reference section below). |
|||
The steps necessary are: |
|||
* Create the wsdl file |
|||
* Generate client and server stubs using wsdl2ws |
|||
* Provide the server side web service implementation (e.g. the add method of the calculator service) |
|||
* Build the server side code and update the generated deploy.wsdd with the .dll path |
|||
* Deploy the binaries to the directory specified in the wsdd |
|||
* Build client |
|||
* Run and enjoy... |
|||
For more information on the individual steps go directly to the tutorial. |
|||
==Related technologies== |
==Related technologies== |
||
Line 77: | Line 63: | ||
* [[Web Services Invocation Framework]] - Java API for invoking Web services |
* [[Web Services Invocation Framework]] - Java API for invoking Web services |
||
* [[webMethods Glue]] - commercial web services enabling product |
* [[webMethods Glue]] - commercial web services enabling product |
||
* AlchemySOAP - open source C++ web services framework |
|||
== |
==References== |
||
{{ |
{{Reflist}} |
||
<!-- formatting; please do not remove until some more text lines are added to compensate spacing --> |
|||
==External links== |
==External links== |
||
* [ |
* [//axis.apache.org/ Apache Axis Homepage] at the Apache Software Foundation |
||
* [http://ws.apache.org/axis/cpp/ Apache AXIS C++ Homepage] at the Apache Software Foundation |
|||
* [http://ws.apache.org/axis/cpp/arch/End-2-End-Sample.html] Axis-C++ tutorial at the Apache Software Foundation |
|||
* [http://ws.apache.org/axis2/ Apache Axis2/Java] at the Apache Software Foundation |
|||
* [http://ws.apache.org/axis2/c/ Apache Axis2/C] at the Apache Software Foundation |
|||
* [http://www.stylusstudio.com/open_ws_framework.html Stylus Studio Tools for Apache AXIS], see also Stylus Studio |
|||
{{Apache}} |
|||
{{Apache Software Foundation}} |
|||
[[Category:Apache Software Foundation projects|Axis]] |
|||
[[Category:Web services]] |
[[Category:Web services]] |
||
[[Category:Web service specifications]] |
[[Category:Web service specifications]] |
||
[[de:Apache Axis]] |
|||
[[fr:Apache Axis]] |
|||
[[ja:Apache Axis]] |
|||
[[pl:Apache Axis]] |
|||
[[pt:Apache Axis]] |
|||
[[th:อะแพชี แอกซิส]] |
|||
[[zh:Apache Axis]] |
Latest revision as of 12:45, 19 September 2023
Developer(s) | Apache Software Foundation |
---|---|
Stable release | 1.4
/ April 22, 2006 |
Written in | C++, Java |
Operating system | Cross-platform |
Type | Web service |
License | Apache License 2.0 |
Website | axis |
Apache Axis (Apache eXtensible Interaction System) is an open-source, XML based Web service framework. It consists of a Java and a C++ implementation of the SOAP server, and various utilities and APIs for generating and deploying Web service applications. Using Apache Axis, developers can create interoperable, distributed computing applications. Axis development takes place under the auspices of the Apache Software Foundation.
Axis for Java
[edit]When using the Java version of Axis, there are two ways to expose Java code as Web service. The easiest one is to use Axis native JWS (Java Web Service) files. Another way is to use custom deployment. Custom deployment enables you to customize resources that should be exposed as Web services.
See also Apache Axis2.
JWS Web service creation
[edit]JWS files contain Java class source code that should be exposed as Web service. The main difference between an ordinary java file and jws file is the file extension. Another difference is that jws files are deployed as source code and not compiled class files.
The following example will expose methods add and subtract of class Calculator.[1]
public class Calculator
{
public int add(int i1, int i2)
{
return i1 + i2;
}
public int subtract(int i1, int i2)
{
return i1 - i2;
}
}
JWS Web service deployment
[edit]Once the Axis servlet is deployed, you need only to copy the jws file to the Axis directory on the server. This will work if you are using an Apache Tomcat container. In the case that you are using another web container, custom WAR archive creation will be required.
JWS Web service access
[edit]JWS Web service is accessible using the URL http://localhost:8080/axis/Calculator.jws. If you are running a custom configuration of Apache Tomcat or a different container, the URL might be different.[2]
Custom deployed Web service
[edit]Custom Web service deployment requires a specific deployment descriptor called WSDD (Web Service Deployment Descriptor) syntax. It can be used to specify resources that should be exposed as Web services. Current version (1.3) supports
- RPC services
- EJB - stateless (Enterprise Java Bean)
Automated generation of WSDL
[edit]When a Web service is exposed using Axis, it will generate a WSDL file automatically when accessing the Web service URL with ?WSDL appended to it.
Related technologies
[edit]- Apache Axis2 - re-design/write of Axis
- Java Web Services Development Pack - web services framework
- Apache CXF - other Apache web services framework (old XFire & Celtix)
- XML Interface for Network Services - RPC/web services framework
- Web Services Invocation Framework - Java API for invoking Web services
- webMethods Glue - commercial web services enabling product
References
[edit]- ^ "Apache Axis – User's Guide". axis.apache.org. Retrieved 2018-11-22.
- ^ "Apache Axis2 – ADB - Howto". axis.apache.org. Retrieved 2023-09-19.
External links
[edit]- Apache Axis Homepage at the Apache Software Foundation