You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by ge...@ws.apache.org on 2005/01/11 11:34:45 UTC
[Apache Web Services Wiki] New: FrontPage/Axis/DealingWithCommonExceptions
Date: 2005-01-11T02:34:45
Editor: ToshiyukiKimura
Wiki: Apache Web Services Wiki
Page: FrontPage/Axis/DealingWithCommonExceptions
URL: http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions
Importing old wiki ...
New Page:
##language:en
'''Common Axis Exceptions (Java)'''
* '''Exception: javax.xml.rpc.ServiceException: Cannot find service:'''
What's probably happening here is that you aren't setting the qualified name of the service properly. This means the name can't simply be an unqualified string, the namespace URI must also be included. Usually this means looking at the service's associated WSDL and making sure that the targetNamespace attribute value is used when the QName of the service is constructed
* '''Exception: No client transport named 'null' found!'''
What's probably happening here is that you are forgetting to set the endpoint explicitly. If your endpoint uses the http scheme, this fact needs to be set on the Call object instance using the setTarget Endpoint Address function. For most newbies, you'll be using an http-based service and will need to create a java.net.URL object out of the endpoint first before calling setTarget Endpoint Address .
* '''Exception: org.apache.axis.ConfigurationException: Can't find handler name:'null''''
If you are trying to write your own handler and add it to the deployment descriptor, you may see this exception if you leave out the java namespace prefix on the type attribute value of <handler> element:
Example:
{{{ <handler name="myHandler" type="java:GenericHandler" /> }}}
Make sure you don't forget the java prefix. This can be confusing because sometimes the class names get long and one might falsely assume that a qualified java class name goes here instead.
* '''Exception: Exception in thread "main" java.lang.NoClassDefFoundError: Software'''
Make sure all directories listed in your { { { Axis/Tomcat/JDK } } } environment variables (in that order) do not contain spaces.
Example:
'''Bad:'''
{{{
CLASSPATH = C:\PROGRAM FILES\JDK\LIB\TOOLS.JAR
AXIS_HOME = C:\PROGRAM FILES\APACHE SOFTWARE FOUNDATION\AXIS 1.1\
}}}
'''Good:'''
{{{
CLASSPATH = C:\JDK\LIB\TOOLS.JAR
AXIS_HOME = C:\ASF\AXIS1.1\
}}}
* '''Exception: invalid xml character &0xC; (or other < 32 decimal char) on AXIS-Client side'''
Only three characters are allowed below decimal 32 in XML. If you are developing alongside a legacy application (or new one) that sends old ascii characters such as Form Feed / FF / 0xC, Server-side AXIS will not throw an exception. The client will however throw an exception and stop parsing the SOAP message. The solutions for this are:
{{{
1. Parse out and remove those characters yourself on the server side.
2. Encode these strings in a Base64Encoding - this is actually pretty easy, just declare get/set methods with byte[] that masks a private String.
3. Encode these strings with custom escape-sequences, i.e. <company-name:esc value="0xC">, which your client must decode *after* standard String (de)serialization.
}}}