blob: 6df0c4ca28ddc76d39c9b8a4296002fccc2d1d68 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.11.1 at 2022-07-14
| Rendered using Apache Maven Fluido Skin 1.6
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20220714" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Axis2 &#x2013; Frequently Asked Questions on Apache Axis2</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.6.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.6.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><a href="http://www.apache.org/" id="bannerLeft"><img src="http://www.apache.org/images/asf_logo_wide.png" alt="Apache Axis2"/></a></div>
<div class="pull-right"><a href="./" id="bannerRight"><img src="images/axis.jpg" /></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2022-07-14<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 1.8.2<span class="divider">|</span></li>
<li class=""><a href="http://www.apache.org" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
<li class=""><a href="index.html" title="Axis2/Java">Axis2/Java</a><span class="divider">/</span></li>
<li class="active ">Frequently Asked Questions on Apache Axis2</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Axis2/Java</li>
<li><a href="index.html" title="Home"><span class="none"></span>Home</a> </li>
<li><a href="download.html" title="Downloads"><span class="none"></span>Downloads</a> </li>
<li><a href="javascript:void(0)" title="Release Notes"><span class="icon-chevron-down"></span>Release Notes</a>
<ul class="nav nav-list">
<li><a href="release-notes/1.6.1.html" title="1.6.1"><span class="none"></span>1.6.1</a> </li>
<li><a href="release-notes/1.6.2.html" title="1.6.2"><span class="none"></span>1.6.2</a> </li>
<li><a href="release-notes/1.6.3.html" title="1.6.3"><span class="none"></span>1.6.3</a> </li>
<li><a href="release-notes/1.6.4.html" title="1.6.4"><span class="none"></span>1.6.4</a> </li>
<li><a href="release-notes/1.7.0.html" title="1.7.0"><span class="none"></span>1.7.0</a> </li>
<li><a href="release-notes/1.7.1.html" title="1.7.1"><span class="none"></span>1.7.1</a> </li>
<li><a href="release-notes/1.7.2.html" title="1.7.2"><span class="none"></span>1.7.2</a> </li>
<li><a href="release-notes/1.7.3.html" title="1.7.3"><span class="none"></span>1.7.3</a> </li>
<li><a href="release-notes/1.7.4.html" title="1.7.4"><span class="none"></span>1.7.4</a> </li>
<li><a href="release-notes/1.7.5.html" title="1.7.5"><span class="none"></span>1.7.5</a> </li>
<li><a href="release-notes/1.7.6.html" title="1.7.6"><span class="none"></span>1.7.6</a> </li>
<li><a href="release-notes/1.7.7.html" title="1.7.7"><span class="none"></span>1.7.7</a> </li>
<li><a href="release-notes/1.7.8.html" title="1.7.8"><span class="none"></span>1.7.8</a> </li>
<li><a href="release-notes/1.7.9.html" title="1.7.9"><span class="none"></span>1.7.9</a> </li>
<li><a href="release-notes/1.8.0.html" title="1.8.0"><span class="none"></span>1.8.0</a> </li>
</ul>
</li>
<li><a href="modules/index.html" title="Modules"><span class="none"></span>Modules</a> </li>
<li><a href="tools/index.html" title="Tools"><span class="none"></span>Tools</a> </li>
<li class="nav-header">Documentation</li>
<li><a href="docs/toc.html" title="Table of Contents"><span class="none"></span>Table of Contents</a> </li>
<li><a href="docs/installationguide.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li>
<li><a href="docs/quickstartguide.html" title="QuickStart Guide"><span class="none"></span>QuickStart Guide</a> </li>
<li><a href="docs/userguide.html" title="User Guide"><span class="none"></span>User Guide</a> </li>
<li><a href="docs/jaxws-guide.html" title="JAXWS Guide"><span class="none"></span>JAXWS Guide</a> </li>
<li><a href="docs/pojoguide.html" title="POJO Guide"><span class="none"></span>POJO Guide</a> </li>
<li><a href="docs/spring.html" title="Spring Guide"><span class="none"></span>Spring Guide</a> </li>
<li><a href="docs/webadminguide.html" title="Web Administrator's Guide"><span class="none"></span>Web Administrator's Guide</a> </li>
<li><a href="docs/migration.html" title="Migration Guide (from Axis1)"><span class="none"></span>Migration Guide (from Axis1)</a> </li>
<li class="nav-header">Resources</li>
<li class="active"><a href="#"><span class="none"></span>FAQ</a>
</li>
<li><a href="articles.html" title="Articles"><span class="none"></span>Articles</a> </li>
<li><a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink" title="Wiki"><span class="none"></span>Wiki</a> </li>
<li><a href="refLib.html" title="Reference Library"><span class="none"></span>Reference Library</a> </li>
<li><a href="apidocs/index.html" title="Online Java Docs"><span class="none"></span>Online Java Docs</a> </li>
<li class="nav-header">Get Involved</li>
<li><a href="overview.html" title="Overview"><span class="none"></span>Overview</a> </li>
<li><a href="git.html" title="Checkout the Source"><span class="none"></span>Checkout the Source</a> </li>
<li><a href="mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li>
<li><a href="release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li>
<li><a href="guidelines.html" title="Developer Guidelines"><span class="none"></span>Developer Guidelines</a> </li>
<li><a href="siteHowTo.html" title="Build the Site"><span class="none"></span>Build the Site</a> </li>
<li class="nav-header">Project Information</li>
<li><a href="team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li>
<li><a href="issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li>
<li><a href="http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/" class="externalLink" title="Source Code"><span class="none"></span>Source Code</a> </li>
<li><a href="thanks.html" title="Acknowledgements"><span class="none"></span>Acknowledgements</a> </li>
<li class="nav-header">Apache</li>
<li><a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink" title="License"><span class="none"></span>License</a> </li>
<li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li>
<li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li>
<li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<section>
<h2><a name="Frequently_Asked_Questions_on_Apache_Axis2"></a><a name="top">Frequently Asked Questions on Apache Axis2</a></h2>
<p><b>General</b></p>
<ol style="list-style-type: decimal">
<li><a href="#a1">
I'm having a problem using Axis2. What should I do?
</a></li>
<li><a href="#mailinglists">
How to ask a question on the mailing list?
</a></li></ol>
<p><b>Class Loading Issues</b></p>
<ol style="list-style-type: decimal">
<li><a href="#b1">
How do I access resources that I put into my service or module archive file?
</a></li></ol>
<p><b>Client API</b></p>
<ol style="list-style-type: decimal">
<li><a href="#c1">
I want to do Request-Response Messaging, Where should I look?
</a></li>
<li><a href="#c2">
I want to do One Way Messaging, Where should I look?
</a></li>
<li><a href="#c3">
When I try to do a non blocking call with <tt>useSeparateListener=true</tt> I get the error <i>to do two Transport Channels the Addressing
Modules must be engaged</i>, Why is this?
</a></li>
<li><a href="#c4">
I have engaged addressing, and
when I try to invoke a service I get an exception
</a></li>
<li><a href="#c5">
What is Axis2 Repository?
</a></li></ol>
<p><b>Services</b></p>
<ol style="list-style-type: decimal">
<li><a href="#e1">
How do I have multiple services in one service archive?
</a></li>
<li><a href="#f1">
I see an internal server error page when I try to view the WSDL file.
</a></li></ol>
<p><b>Databindings</b></p>
<ol style="list-style-type: decimal">
<li><a href="#unexpected_subelement">
When using ADB, I get an &quot;Unexpected subelement&quot; exception. Is this a bug?
</a></li></ol></section><section>
<h2><a name="General"></a>General</h2>
<dl>
<dt><a name="a1">
I'm having a problem using Axis2. What should I do?
</a></dt>
<dd>
<p>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. You can download
the complete snapshot distributions from our
<a class="externalLink" href="https://hudson.apache.org/hudson/job/Axis2/lastStableBuild/org.apache.axis2$distribution">Hudson
continuous integration server</a> and individual JARs from our
<a class="externalLink" href="http://repository.apache.org/snapshots/org/apache/axis2/">snapshot repository</a>. The
snapshot repository is also the best choice if you are using Maven to build your project.
</p>
<p>If the problem still persists, then try to search for your
question in our <a class="externalLink" href="http://marc.theaimsgroup.com/?l=axis-dev&amp;r=1&amp;w=2">developer</a>
or <a class="externalLink" href="http://marc.theaimsgroup.com/?l=axis-user&amp;r=1&amp;w=2">user</a>
mailing archives as it might have already being answered.</p>
<p>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 (see next question). If
you think it is a bug, please fill a bug report in <a class="externalLink" href="http://issues.apache.org/jira/browse/AXIS2">JIRA</a>. 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. <b>PLEASE DO NOT ASK QUESTIONS USING JIRA; USE IT ONLY AS
AN ISSUE TRACKER.</b></p>
<p>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.</p>
<hr /></dd>
<dt><a name="mailinglists">
How to ask a question on the mailing list?
</a></dt>
<dd>
<p>
If you have a question that has not been answered elsewhere (see previous question),
you may ask it on one of the mailing lists:
</p>
<ul>
<li>Users : <a class="externalLink" href="mailto:java-user@axis.apache.org">java-user@axis.apache.org</a></li>
<li>Developers : <a class="externalLink" href="mailto:java-dev@axis.apache.org">java-dev@axis.apache.org</a></li>
</ul>
<p>
Before posting to a list, you need to <a href="mail-lists.html">subscribe</a> first.
Since the mailing lists are shared with other subprojects (such as Rampart), please
prefix the subject with <tt>[Axis2]</tt>.
</p>
<p><b>Note</b> : 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 <a class="externalLink" href="http://www.apache.org/foundation/faq.html#what-is-apache-NOT-about">
What is Apache not about?</a> ).</p>
<p>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 &quot;URGENT&quot; 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 :) .</p>
</dd></dl></section><section>
<h2><a name="Class_Loading_Issues"></a>Class Loading Issues</h2>
<dl>
<dt><a name="b1">
How do I access resources that I put into my service or module archive file?
</a></dt>
<dd>
<p>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,</p>
<ol style="list-style-type: decimal">
<li>
<p>A third party module wants to access your resources. Then the
scenario is as follows:</p>
<div>
<pre>
AxisService myService =
messageContext.getAxisConfiguration().getAxisService(&quot;serviceName&quot;);
</pre></div>
<p>or</p>
<div>
<pre>
AxisService myService = msgCtx.getAxisService();
</pre></div>
<p>Then you can use the service class loader through which you can
access its resources</p>
<div>
<pre>
ClassLoader clsLoader = myService.getServiceClassLoader();
clsLoader.getResourceAsStream(&quot;myResource&quot;);
</pre></div>
</li>
<li>
<p>To initialize the service implementation class at the
MessageReceiver level, the following steps need to be taken</p>
<div>
<pre>
AxisService service = msgCtx.getAxisService();
ClassLoader clsLoader = service.getServiceClassLoader();
Class.forName(&quot;serviceName&quot;,clsLoader,true);
</pre></div>
<p>NOTE : Axis2 default MessageReciver uses the same technique to
initialize service implementations</p>
</li>
<li>
<p>If you want to load your resources at the service
implementation class, then the scenario is as follows</p>
<div>
<pre>
getClass().getClassLoader().getResourceAsStream(&quot;myResource&quot;);
</pre></div>
</li>
</ol>
</dd></dl></section><section>
<h2><a name="Client_API"></a>Client API</h2>
<dl>
<dt><a name="c1">
I want to do Request-Response Messaging, Where should I look?
</a></dt>
<dd>
<p>Look at the <a class="externalLink" href="https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java">ServiceClient</a> class, for more information
please read the <a href="docs/adv-userguide.html">User's Guide</a></p>
<hr /></dd>
<dt><a name="c2">
I want to do One Way Messaging, Where should I look?
</a></dt>
<dd>
<p>From Axis2 0.94 onwards, both request-response and one way
messaging will be handled by <a class="externalLink" href="https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java">ServiceClient</a>.</p>
<hr /></dd>
<dt><a name="c3">
When I try to do a non blocking call with <tt>useSeparateListener=true</tt> I get the error <i>to do two Transport Channels the Addressing
Modules must be engaged</i>, Why is this?
</a></dt>
<dd>
<p>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 <code>Call.engageModule(QName)</code>. However,
addressing is enabled by default.</p>
<hr /></dd>
<dt><a name="c4">
I have engaged addressing, and
when I try to invoke a service I get an exception
</a></dt>
<dd>
<p>If you have engaged addressing, then you must have wsa:action,
the required WS-Addressing header. You have to call
<code>option.setAction(&quot;urn:myaction&quot;);</code>. Note that the
action should be a URI.</p>
<hr /></dd>
<dt><a name="c5">
What is Axis2 Repository?
</a></dt>
<dd>
<p>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.</p>
<img src="images/faq/1.jpg" alt="Sample repository" /></img>
<p>Modules and services have an archive format defined and they are
automatically picked up by Axis2 when they are copied to
corresponding folders.</p>
</dd></dl></section><section>
<h2><a name="Services"></a>Services</h2>
<dl>
<dt><a name="e1">
How do I have multiple services in one service archive?
</a></dt>
<dd>
<p>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 <strong>must</strong> look as follows,</p>
<div>
<pre>
&lt;serviceGroup&gt;
&lt;service <strong>name=&quot;myService1&quot;</strong>&gt;
...........................
&lt;/service&gt;
&lt;service <strong>name=&quot;myService2&quot;</strong>&gt;
...........................
&lt;/service&gt;
&lt;serviceGroup&gt;
</pre></div>
<p>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.</p>
<div>
<pre>
&lt;service&gt;
...............
&lt;service&gt;
</pre></div>
<hr /></dd>
<dt><a name="f1">
I see an internal server error page when I try to view the WSDL file.
</a></dt>
<dd>
<p>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
<a class="externalLink" href="http://www.apache.org/dist/java-repository/xalan/jars/">xalan-2.7.0.jar</a>
into the axis2/WEB-INF/lib directory</p>
</dd></dl></section><section>
<h2><a name="Databindings"></a>Databindings</h2>
<dl>
<dt><a name="unexpected_subelement">
When using ADB, I get an &quot;Unexpected subelement&quot; exception. Is this a bug?
</a></dt>
<dd>
<p>
In general, &quot;Unexpected subelement&quot; means that the message being processed
doesn't conform to the WSDL that was used to generate the ADB code. If you are getting
this exception on the client side, it means that the response from the server
is invalid. If you are seeing the error on the server side, it means that the
request received by the service is invalid.
</p>
<p>
If you are sure that the message conforms to the WSDL and believe that there
is an issue with the code generated by Axis2, you should do the following before
opening a JIRA issue:
</p>
<ol style="list-style-type: decimal">
<li>
Test the scenario with the latest Axis2 snapshot version. This includes
regenerating the code with the latest codegen version.
</li>
<li>
Provide the WSDL that causes the issue, or if for legal reasons you are not
allowed to provide the original WSDL, provide a minimal WSDL that reproduces
the problem.
</li>
<li>
Provide some hard evidence that this is indeed an issue in Axis2. This means
at least a transcript of the SOAP message that proves that it conforms to the WSDL.
</li>
</ol>
</dd></dl></section>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>Copyright &copy;2004&#x2013;2022
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>