Got a question to be answered on Axis2? Then this document is just what the doctor ordered.
If you have any other doubts/issues, e-mail your questions to:
Prefix subject with [Axis2]. Subscribe to our mailing lists.
First make sure you go through the user guide and this FAQ. If you are using a released version of Axis2, then there is a possibility that your problem has already being fixed in the latest code. Download Axis2 nightly builds and test again.
If the problem still persists, then try to search for your question in our developer or user mailing archives as it might have already being answered.
If your problem is not answered in the mailing list, now is the best time to post your question to the axis-user mailing list. If you think it is a bug, please fill a bug report in JIRA. Please attach all the supportive information, like your wsdl, schema, clients, services, stacktraces, etc., to the JIRA issue you created, as it will help one of our contributors to re-create the problem. PLEASE DO NOT ASK QUESTIONS USING JIRA; USE IT ONLY AS AN ISSUE TRACKER.
If you are asking for an explanation of a feature in Axis2, there is a possibility that there is an article or FAQ written on it. Please search the web as there are lots of articles written and hosted by various sources on the web.
Note : When you ask questions in the mailing list, please remember that everyone working in our project are volunteers. No-one can be forced to fix your bugs (See What is Apache not about? ).
Make sure you add enough information about your problem with stacktraces and any other supportive information. It will improve the chances of your question being answered. Prefixing your mail subject with prefixes like "URGENT" will not help you in any means. Yes we also accept all the blames about Axis2 in these mailing lists, as those will definitely help us to improve Axis2 :) .
You have to add Bouncy Castle as a JCE provider. Add the following entry to java.security file of the appropriate JRE on your machine. This file is available in the lib\security\ directory within the JRE directory.
security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.# will have to be decided depending on the existing entries in the java.security file
NOTE: For Windows XP, the correct version can be found using 'java -version'. The correct file is JRE (typically c:\Program Files\Java\jre<version>\lib\security\java.security.
You have to copy the stax-api jar in the Axis2 distribution into your JRE's endorsed directory (see info on endorsed directory here - http://java.sun.com/j2se/1.4.2/docs/guide/standards/).
This issue can also be resolved by copying the stax-api jar to Tomcat's common/endorsed folder, when deploying Axis2 in Tomcat.
Axis2 has the notion of service isolation where each service or module gets its own class loader. Using this class loader you can access any resource that you put into your service archive file. You may want to access your resources from different locations. For example,
1. A third party module wants to access your resources. Then the scenario is as follows:
AxisService myService = messageContext.getAxisConfiguration().getAxisService("serviceName");
or
AxisService myService = msgCtx.getAxisService();
Then you can use the service class loader through which you can access its resources
ClassLoader clsLoader = myService.getServiceClassLoader(); clsLoader.getResourceAsStream("myResource");
2. To initialize the service implementation class at the MessageReceiver level, the following steps need to be taken
AxisService service = msgCtx.getAxisService(); ClassLoader clsLoader = service.getServiceClassLoader(); Class.forName("serviceName",clsLoader,true);
NOTE : Axis2 default MessageReciver uses the same technique to initialize service implementations
3. If you want to load your resources at the service implementation class, then the scenario is as follows
getClass().getClassLoader().getResourceAsStream("myResource");
Look at the ServiceClient class, for more information please read the User's Guide
From Axis2 0.94 onwards, both request-response and one way messaging will be handled by ServiceClient.
I get the error to do two Transport Channels the Addressing Modules
must be engaged, Why is this?
To do the two transport channel invocation, you need to engage the addressing module. You can enable it by un-commenting the entry in the axis2.xml file or Call.engageModule(QName). However, addressing is enabled by default.
If you have engaged addressing, then you must have wsa:action, the
required WS-Addressing header. You have to call
option.setAction("urn:myaction");
. Note that the action
should be a URI.
The Repository stores the configuration of Axis2. The users should specify the repository folder of the Axis Server (HTTP or TCP). In the case of Tomcat, it is the webapps/axis2/WEB-INF folder. The following picture shows a sample repository.
Modules and services have an archive format defined and they are automatically picked up by Axis2 when they are copied to corresponding folders.
Axis2 requires itest plugin to run some of the tests. Better get it using the following command.
I have problems building with Maven 1.1
It seems that Maven 1.1 doesn't come bundled with the required
artifact plugin. Run the following command to get it updated
You may also need to update the itest plugin, using the above command in 1.
What versions of Maven are supported?
Versions 1.0.2 and 1.1 are supported. Maven2 is not supported as yet.
Command
|
Description
|
---|---|
maven
|
Downloads relevant jars if not available, and compiles and runs the
tests in the system.
|
maven clean | Cleans all the content built so far in the target folder. This will not clean the jar repository. |
maven test
|
Runs only the tests. Performs automatic compilation of changed
sources as well. This will not run SOAP interop tests
|
maven clean all-tests
|
Cleans up and runs all offline and online tests.
|
maven itest
|
To run the online-mode tests for say the modules/integration, run
"maven itest" from modules/integration
|
maven test itest
|
To run all the tests for say the modules/integration, run "maven
test itest" from modules/integration
|
maven -g
|
Lists all the commands available in Maven
|
maven multiproject
|
Generates the site.
|
maven idea:multiproject
|
Generates IDEA .ipr, .iml and .iws project files.
|
maven -Dmaven.test.skip=true
|
Builds Axis2 and skips all the tests. |
maven dist-min-bin | Generates the binary version of Axis2 minimal distribution |
maven dist-min-src | Generates the source version of Axis2 minimal distribution |
maven dist-std-bin | Generates the binary version of Axis2 standard distribution |
maven dist-std-src | Generates the source version of Axis2 standard distribution |
maven release | Generates all the distributables for Axis2. |
maven clean jar -Dmaven.test.skip=true -o | Cleans the content in the target folder and compiles your source, without running the tests or downloading snapshots of the dependancies. This is the quickest way of compiling Axis2 sources. However it is highly recommended to run the tests all the time. |
It's just a matter of writing a services.xml file to configure the service or services in an archive file. The corresponding services.xml must look as follows,
<serviceGroup> <service name="myService1"> ........................... </service> <service name="myService2"> ........................... </service> <serviceGroup>
NOTE : The name attribute is a compulsory attribute that will become the name of the services. If you want to have one service in the archive file, then there are two options. You can either have one service inside the serviceGroup tag or have only one service tag, as shown below, in your services.xml, in which case, the name of the service will be the name of the archive file, which you cannot override.
<service> ............... <service>
This happens specifically with Tomcat 4.x and 5.0 in a JDK 1.5 environment. The reason is that the system picks up a wrong transformer factory class. This can be solved simply by putting the xalan-2.7.0.jar into the axis2/WEB-INF/lib directory
WSDL 2.0 is not supported yet. We do not have a working WSDL 2.0 reader.
However the codegen engine works off WOM (not WSDL4J). Hence if the WSDL 2.0 reader is done, we are all set to generate code for it.
And yes, it is perfectly possible for the codegen to generate code for the HTTP binding. We already have the client API support for making the REST calls and it should be a matter of putting in a correct template.