axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16263] New: - WSDL2Java generates incorrect code for void functions that throw Exceptions
Date Mon, 20 Jan 2003 16:52:28 GMT
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=16263>.
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=16263

WSDL2Java generates incorrect code for void functions that throw Exceptions

           Summary: WSDL2Java generates incorrect code for void functions
                    that throw Exceptions
           Product: Axis
           Version: 1.0
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: stevenmartin2000@hotmail.com


<from developer who I asked to verify this behavoir>
I am not positive, but it may be that your problem is the code generated by
the WSDL2Java utility.  In the generated *Stub.java file, look at the
marshalling/unmarshalling code for the routines that return void.  The
WSDL2Java generates a line that looks like this:

        _call.invokeOneWay(new java.lang.Object[]{portalId, group,
emailAddress});

However, what you really need is something like this:

        Object _resp = _call.invoke(new java.lang.Object[]{portalId, group,
emailAddress});

        if (_resp instanceof java.rmi.RemoteException)
        {
            throw (java.rmi.RemoteException) _resp;
        }

The latter causes the returned SOAP object which is actually a
RemoteException to be thrown.  And the RemoteException is actually your
AxisFault derived exception class.  So if you add these lines, your
RegException(s) should show back up.  Hope this helps.
</from developer>

Mime
View raw message