[
https://issues.apache.org/jira/browse/AXIS-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tom Jordahl reassigned AXIS-1205:
---------------------------------
Assignee: (was: Tom Jordahl)
> not all exceptions marked throwable?
> ------------------------------------
>
> Key: AXIS-1205
> URL: https://issues.apache.org/jira/browse/AXIS-1205
> Project: Axis
> Issue Type: Bug
> Components: Serialization/Deserialization
> Affects Versions: 1.2 Alpha
> Environment: Operating System: Other
> Platform: Other
> Reporter: spencer portee
>
> I have two basic exeptions, DataSourceException and PrimaryKeyException which
> are thrown by a class behind an axis web-service. They are exactly the same
> except for their class names....
> ---
> package mypackage;
> import java.io.*;
> import java.rmi.*;
> public class DataSourceException extends RemoteException implemetns
> Serializable
> {
> public DataSourceException()
> {
> super();
> }
> public DataSourceException(String string)
> {
> super(string);
> }
> }
> ---
> When I deploy a service with the prototype...
> public class UserRemote implements UserDaoInterface
> which implements this and this alone...
> public void insert(User user) throws PrimaryKeyException,
> DataSourceException;
> I get a weird soap message after throwing PrimaryKeyException with the
> following
> descriptor.
> -- Deployment --
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> <service name="allocations/User" provider="java:RPC">
> <namespace>allocations/User</namespace>
> <parameter name="className" value="mypackage.user.UserRemote"/>
> <parameter name="allowedMethods" value="insert"/>
> <beanMapping
> xmlns:ns="allocations/User"
> qname="ns:PrimaryKeyException"
> type="java:mypackage.PrimaryKeyException"
> />
> <beanMapping
> xmlns:ns="allocations/User"
> qname="ns:DataSourceException"
> type="java:mypackage.DataSourceException"
> />
> <beanMapping
> xmlns:ns="allocations/User"
> qname="ns:Company"
> type="java:mypackage.company.Company"
> />
> <beanMapping
> xmlns:ns="allocations/User"
> qname="ns:User"
> type="java:mypackage.user.User"
> />
> </service>
> </deployment>
> --- Soap response ---
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>mypackage.PrimaryKeyException</faultstring>
> <detail>
> <mypackage.PrimaryKeyException xsi:type="ns1:PrimaryKeyException"
> xmlns:ns1="directory/User">
> <cause xsi:nil="true"/>
> <message xsi:type="xsd:string" xsi:nil="true"/>
> </mypackage.PrimaryKeyException>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> --
> If I exclude the bean serialization, i get the following for a wsdl descriptor
> which totally confuses axis, since Throwable can't be deserialized.
> --- wsdl response sniplet ---
> <complexType name="PrimaryKeyException">
> -
> <sequence>
> <element name="cause" nillable="true" type="xsd:anyType"/>
> <element name="message" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> -
> <complexType name="DataSourceException">
> -
> <sequence>
> <element name="cause" nillable="true" type="tns2:Throwable"/>
> <element name="message" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> ---
> If I switch the declaration order of the method exceptions, the throwable and
> anytype switch positions.
> I saw the bug about throwable being replaced by anytype for exceptions. It
> seems to have resurfaced. I tried 1.1, 1.2alpha and cvs versions. ALso, if I
> don't extend RemoteException, axis doesn't put it in the <detail/> element, as
> the documentation said it should. I thought it wasn't necessary as a prior
> bug
> pointed out, but unless I extend, it becomes blank. Hepl?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]