You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/03/27 14:33:52 UTC
DO NOT REPLY [Bug 18409] New: -
Throwable not mapped correctly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18409>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18409
Throwable not mapped correctly
Summary: Throwable not mapped correctly
Product: Axis
Version: 1.1rc2
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Blocker
Priority: Other
Component: WSDL processing
AssignedTo: axis-dev@ws.apache.org
ReportedBy: Tony.Thompson@stone-ware.com
When I request the wsdl for my service, I get the following error on the web
server:
- The class java.lang.Throwable is defined in a java or javax package and
cannot be converted into an xml schema type. An xml schema anyType will be
used to define this class in the wsdl file.
This would be OK except the wsdl that is generated actually maps it to a
type="tns2:Throwable".
Here is the wsdl that is generated:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://192.168.0.8/axis/services/StonewareResetIDService"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://192.168.0.8/axis/services/StonewareResetIDService"
xmlns:intf="http://192.168.0.8/axis/services/StonewareResetIDService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://stoneware.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema
targetNamespace="http://stoneware.com"
xmlns="http://www.w3.org/2001/XMLSchema"><import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType
name="StonewareException"><sequence><element name="errorCode"
type="xsd:int"/><element name="errorMessage" nillable="true"
type="xsd:string"/><element name="rootCause" nillable="true"
type="tns2:Throwable"/></sequence></complexType></schema></wsdl:types>
<wsdl:message name="StonewareException">
<wsdl:part name="fault" type="tns1:StonewareException"/>
</wsdl:message>
<wsdl:message name="authenticateUserResponse1">
<wsdl:part name="authenticateUserReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="changeObjectPasswordRequest">
<wsdl:part name="session" type="xsd:string"/>
<wsdl:part name="userDN" type="xsd:string"/>
<wsdl:part name="newPassword" type="xsd:string"/>
<wsdl:part name="resetIntruderLock" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="authenticateUserResponse">
<wsdl:part name="authenticateUserReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="authenticateUserRequest1">
<wsdl:part name="context" type="xsd:string"/>
<wsdl:part name="user" type="xsd:string"/>
<wsdl:part name="password" type="xsd:string"/>
<wsdl:part name="relayDN" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="authenticateUserRequest">
<wsdl:part name="context" type="xsd:string"/>
<wsdl:part name="user" type="xsd:string"/>
<wsdl:part name="password" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="changeObjectPasswordResponse">
</wsdl:message>
<wsdl:portType name="ResetIDServicesBean">
<wsdl:operation name="changeObjectPassword" parameterOrder="session userDN
newPassword resetIntruderLock">
<wsdl:input message="impl:changeObjectPasswordRequest"
name="changeObjectPasswordRequest"/>
<wsdl:output message="impl:changeObjectPasswordResponse"
name="changeObjectPasswordResponse"/>
<wsdl:fault message="impl:StonewareException" name="StonewareException"/>
</wsdl:operation>
<wsdl:operation name="authenticateUser" parameterOrder="context user
password">
<wsdl:input message="impl:authenticateUserRequest"
name="authenticateUserRequest"/>
<wsdl:output message="impl:authenticateUserResponse"
name="authenticateUserResponse"/>
</wsdl:operation>
<wsdl:operation name="authenticateUser" parameterOrder="context user
password relayDN">
<wsdl:input message="impl:authenticateUserRequest1"
name="authenticateUserRequest1"/>
<wsdl:output message="impl:authenticateUserResponse1"
name="authenticateUserResponse1"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="StonewareResetIDServiceSoapBinding"
type="impl:ResetIDServicesBean">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="changeObjectPassword">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="changeObjectPasswordRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:input>
<wsdl:output name="changeObjectPasswordResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:output>
<wsdl:fault name="StonewareException">
<wsdlsoap:fault
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="authenticateUser">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="authenticateUserRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:input>
<wsdl:output name="authenticateUserResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="authenticateUser">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="authenticateUserRequest1">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:input>
<wsdl:output name="authenticateUserResponse1">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://192.168.0.8/axis/services/StonewareResetIDService"
use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ResetIDServicesBeanService">
<wsdl:port binding="impl:StonewareResetIDServiceSoapBinding"
name="StonewareResetIDService">
<wsdlsoap:address
location="http://192.168.0.8/axis/services/StonewareResetIDService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
***************************************************************************
Here is the method signature for a method that throws a StonewareException:
public void changeObjectPassword( String session, String userDN, String
newPassword, boolean resetIntruderLock ) throws StonewareException;
***************************************************************************
Here is the StonewareException class:
/*
* StonewareException.java
*
* Originated by Stoneware, Inc. http://www.stone-ware.com
*
* The enclosed material is Stoneware Confidential and is the sole
* property of Stoneware, Inc. Unauthorized disclosure, distribution
* or other use of this material is expressly prohibited.
*
* (c) Copyright 1999-2002 Stoneware, Inc. All rights reserved.
*
* @author <a href="mailto:Tony.Thompson@stone-ware.com">Tony Thompson</a>
*/
package com.stoneware;
/**
*
*/
public class StonewareException extends Exception {
public static final int SUCCESS = 0;
public static final int INVALID_SESSION_ID = 1;
public static final int ACCESS_DENIED = 2;
public static final int FAVORITES_DISABLED = 3;
public static final int INSUFFICIENT_RIGHTS = 4;
public static final int OBJECT_ALREADY_EXISTS = 5;
public final static int NOT_INITIALIZED = 6;
public final static int PARAMETER_INVALID = 7;
public final static int FILE_NOT_FOUND = 8;
public final static int IO_ERROR = 9;
public final static int NOT_IMPLEMENTED = 10;
public static final int MISSING_CREDENTIALS = 11;
public static final int MISSING_CONFIG = 12;
public static final int NULL_POINTER = 13;
public static final int NOT_CACHEABLE = 14;
public static final int INVALID_DATA_PATH = 15;
public static final int NO_LICENSE = 16;
public static final int HOST_UNAVAILABLE = 17;
private int m_errorCode = -1;
private Throwable m_nested = null;
// Change this later to load locale specific strings.
private static String m_messages[] = {
/* 0 */ "Success",
"Invalid session ID",
"Access to resource denied",
"Favorites disabled for user",
"Insufficient rights",
/* 5 */ "Object already exists",
"Not initialized",
"Parameter invalid",
"File not found",
"I/O Error",
/* 10 */ "Not Implemented",
"Missing credentials",
"Missing configuration",
"NULL pointer",
"Object not cacheable",
/* 15 */ "Invalid data path",
"No license",
"Host unavailable"
};
/***************************************************************************
/
/**
*/
public StonewareException( int errorCode ) {
m_errorCode = errorCode;
}
/***************************************************************************
/
/**
*/
public StonewareException( int errorCode, String message ) {
super( message );
m_errorCode = errorCode;
}
/***************************************************************************
/
/**
*/
public StonewareException( int errorCode, Throwable exception ) {
this( errorCode );
m_nested = exception;
}
/***************************************************************************
/
/**
*/
public StonewareException( int errorCode, String message, Throwable
exception ) {
this( errorCode, message );
m_nested = exception;
}
/***************************************************************************
/
/**
*/
public int getErrorCode() {
return m_errorCode;
}
/***************************************************************************
/
/**
*/
public String getErrorMessage() {
if( (m_errorCode >= 0) && (m_errorCode < m_messages.length) ) {
return m_messages[m_errorCode];
}
return null;
}
/***************************************************************************
/
/**
*/
public Throwable getRootCause() {
return m_nested;
}
/***************************************************************************
/
/**
*/
public String toString() {
StringBuffer sb = new StringBuffer( "StonewareException: " );
if( (m_errorCode >= 0) && (m_errorCode < m_messages.length) ) {
sb.append( m_messages[m_errorCode] );
sb.append( ' ' );
}
sb.append( '(' );
sb.append( Integer.toString( m_errorCode ) );
sb.append( ')' );
if( getMessage() != null ) {
sb.append( ": " );
sb.append( getMessage() );
}
return sb.toString();
}
/***************************************************************************
/
/**
*/
public void printStackTrace() {
super.printStackTrace();
if( m_nested != null ) {
System.err.println( "---- Root cause ->" );
m_nested.printStackTrace();
}
}
}