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 "Oleg Efimov (JIRA)" <ji...@apache.org> on 2007/10/10 12:55:50 UTC

[jira] Created: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

WSDL2Java generates incorrect Exception stubs
---------------------------------------------

                 Key: AXIS2-3262
                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 1.3
            Reporter: Oleg Efimov
            Priority: Critical


I'm going to show simple example of the problem.

First, I create a test service:
-------------------------------------------------------------- test.axis.SoapService 
package test.axis;

public class SoapService {
    public void test() throws RemoteException {
    }
}
--------------------------------------------------------------- test.axis.RemoteException
package test.axis;

public class RemoteException extends Exception{
    public RemoteException() {
    }

    public RemoteException(Throwable cause) {
        super(cause);
    }

    public RemoteException(String message) {
        super(message);
    }

    public RemoteException(String message, Throwable cause) {
        super(message, cause);
    }
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I deploy it on tomcat5.5 on context /axis, web.xml is:
---------------------------------------------------------------- web.xml
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <servlet>
        <servlet-name>Axis2Servlet</servlet-name>
        <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Axis2Servlet</servlet-name>
        <url-pattern>/axis2/*</url-pattern>
    </servlet-mapping>
</web-app>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Service description:
----------------------------------------------------------------- services.xml
<service name="soapservice" scope="application">
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
                         class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>

    <parameter name="ServiceClass">test.axis.SoapService</parameter>
</service>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I use default axis2.xml with only one change:
------------------------------------------------------------------------ change in axis2.xml
<parameter name="servicePath">axis2</parameter>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then I use wsdl2java task to create client stubs:
------------------------------------------------------------------------- build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="testaxis2" basedir=".">
    <path id="build.classpath">
        <fileset dir="C:/axis2lib" includes="*.jar"/>
    </path>

    <macrodef name="wsdl2java">
        <attribute name="url"/>
        <attribute name="targetdir"/>
        <attribute name="package"/>
        <sequential>
            <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
                <arg value="-or"/>
                <arg value="-u"/>
                <arg value="-uw"/>
                <arg value="-sp"/>
                <arg value="-p"/>
                <arg value="@{package}"/>
                <arg value="-o"/>
                <arg value="@{targetdir}"/>
                <arg value="-uri"/>
                <arg value="@{url}"/>
            </java>
        </sequential>
    </macrodef>

    <target name="test-wsdl">
        <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
    </target>
</project>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

This task generates the following file tree inside testaxis/src/test/axis folder:
----------------------------------------------------------
/stub
     RemoteExceptionException0.java
     Soapservice.java
     SoapserviceCallbackHandler.java
     SoapserviceStub.java
/xsd
     ExtensionMapper.java
     RemoteException.java
Exception.java
RemoteException0.java
------------------------------------------------------------------------------------------------------------------------------------------------------------------

So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
test.axis.xsd.RemoteException IS test.axis.Exception

Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.

I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.

PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Sebastian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759529#action_12759529 ] 

Sebastian Schneider commented on AXIS2-3262:
--------------------------------------------

The behaviour of the tools in this manner is really uncomfortable. I use the generators because I do not want to edit the WSDL manually. The additional "Exception" in the name of Exception is really uncomfortable and makes the client code using the sub really unreadable. I would highly appreciate it if somebody could look into this.

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-3262.
-------------------------------------------------

    Resolution: Fixed

first of all you have to understand that the wsdl2java generates the code using the given wsdl. No matter how you generate it.
When generating the exceptions here is the convention. 
For each fault element declared in the Porttype/operation it adds a java.lang.Exception for method signature. and these exceptions contains a variable to keep the inside element details. 
when considering this convention I think what wsdl2java generates is correct.

why you want to throw a remote exception from a skelton mehtod? I think this is where you have made things wrong. From the skelton you are supposed to throw only the Bussiness logic exceptions. (here Remote exception has also though as a bussiness logic exception.)

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Ingo Fleer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545039 ] 

Ingo Fleer commented on AXIS2-3262:
-----------------------------------

Did I got something wrong - is there a solution for this issue?

I am experiencing exactly the same problem and struggling to get a satisfying solution to use Exception for the following code generation chain:
[Java-Interface for Server]->WSDL->[Java-Stub for Client]

(Everything with Axis2 1.3)

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Oleg Efimov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Efimov updated AXIS2-3262:
-------------------------------

    Description: 
I'm going to show simple example of the problem.

First, I create a test service:
-------------------------------------------------------------- test.axis.SoapService 
package test.axis;

public class SoapService {
    public void test() throws RemoteException {
    }
}
--------------------------------------------------------------- test.axis.RemoteException
package test.axis;

public class RemoteException extends Exception{
    public RemoteException() {
    }

    public RemoteException(Throwable cause) {
        super(cause);
    }

    public RemoteException(String message) {
        super(message);
    }

    public RemoteException(String message, Throwable cause) {
        super(message, cause);
    }
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I deploy it on tomcat5.5 on context /axis, web.xml is:
---------------------------------------------------------------- web.xml
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <servlet>
        <servlet-name>Axis2Servlet</servlet-name>
        <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Axis2Servlet</servlet-name>
        <url-pattern>/axis2/*</url-pattern>
    </servlet-mapping>
</web-app>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Service description:
----------------------------------------------------------------- services.xml
<service name="soapservice" scope="application">
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
                         class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>

    <parameter name="ServiceClass">test.axis.SoapService</parameter>
</service>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I use default axis2.xml with only one change:
------------------------------------------------------------------------ change in axis2.xml
<parameter name="servicePath">axis2</parameter>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

WSDL, generated by ?wsdl request, is:
------------------------------------------------------------------------ wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
    <wsdl:documentation>soapservice</wsdl:documentation>
    <wsdl:types>
        <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
    <xs:complexType name="RemoteException">
        <xs:complexContent>
            <xs:extension base="ns1:Exception">
                <xs:sequence/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
</xs:schema>
        <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
    <xs:complexType name="Exception">
        <xs:sequence>
            <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="RemoteException">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
    </wsdl:types>
    <wsdl:message name="testRequest"/>
    <wsdl:message name="testResponse"/>
    <wsdl:message name="RemoteException">
        <wsdl:part name="parameters" element="ns1:RemoteException"/>
    </wsdl:message>
    <wsdl:portType name="soapservicePortType">
        <wsdl:operation name="test">
            <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
            <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
            <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="test">
            <soap:operation soapAction="urn:test" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="RemoteException">
                <soap:fault use="literal" name="RemoteException"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="test">
            <soap12:operation soapAction="urn:test" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="RemoteException">
                <soap12:fault use="literal" name="RemoteException"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="test">
            <http:operation location="soapservice/test"/>
            <wsdl:input>
                <mime:content type="text/xml" part="test"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="soapservice">
        <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
            <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
        </wsdl:port>
        <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
            <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
        </wsdl:port>
        <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
            <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then I use wsdl2java task to create client stubs:
------------------------------------------------------------------------- build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="testaxis2" basedir=".">
    <path id="build.classpath">
        <fileset dir="C:/axis2lib" includes="*.jar"/>
    </path>

    <macrodef name="wsdl2java">
        <attribute name="url"/>
        <attribute name="targetdir"/>
        <attribute name="package"/>
        <sequential>
            <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
                <arg value="-or"/>
                <arg value="-u"/>
                <arg value="-uw"/>
                <arg value="-sp"/>
                <arg value="-p"/>
                <arg value="@{package}"/>
                <arg value="-o"/>
                <arg value="@{targetdir}"/>
                <arg value="-uri"/>
                <arg value="@{url}"/>
            </java>
        </sequential>
    </macrodef>

    <target name="test-wsdl">
        <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
    </target>
</project>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

This task generates the following file tree inside testaxis/src/test/axis folder:
----------------------------------------------------------
/stub
     RemoteExceptionException0.java
     Soapservice.java
     SoapserviceCallbackHandler.java
     SoapserviceStub.java
/xsd
     ExtensionMapper.java
     RemoteException.java
Exception.java
RemoteException0.java
------------------------------------------------------------------------------------------------------------------------------------------------------------------

So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
test.axis.xsd.RemoteException IS test.axis.Exception

Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.

I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.

PS Damn, I really hope someone will read it :)

  was:
I'm going to show simple example of the problem.

First, I create a test service:
-------------------------------------------------------------- test.axis.SoapService 
package test.axis;

public class SoapService {
    public void test() throws RemoteException {
    }
}
--------------------------------------------------------------- test.axis.RemoteException
package test.axis;

public class RemoteException extends Exception{
    public RemoteException() {
    }

    public RemoteException(Throwable cause) {
        super(cause);
    }

    public RemoteException(String message) {
        super(message);
    }

    public RemoteException(String message, Throwable cause) {
        super(message, cause);
    }
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I deploy it on tomcat5.5 on context /axis, web.xml is:
---------------------------------------------------------------- web.xml
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <servlet>
        <servlet-name>Axis2Servlet</servlet-name>
        <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Axis2Servlet</servlet-name>
        <url-pattern>/axis2/*</url-pattern>
    </servlet-mapping>
</web-app>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Service description:
----------------------------------------------------------------- services.xml
<service name="soapservice" scope="application">
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
                         class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>

    <parameter name="ServiceClass">test.axis.SoapService</parameter>
</service>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I use default axis2.xml with only one change:
------------------------------------------------------------------------ change in axis2.xml
<parameter name="servicePath">axis2</parameter>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then I use wsdl2java task to create client stubs:
------------------------------------------------------------------------- build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="testaxis2" basedir=".">
    <path id="build.classpath">
        <fileset dir="C:/axis2lib" includes="*.jar"/>
    </path>

    <macrodef name="wsdl2java">
        <attribute name="url"/>
        <attribute name="targetdir"/>
        <attribute name="package"/>
        <sequential>
            <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
                <arg value="-or"/>
                <arg value="-u"/>
                <arg value="-uw"/>
                <arg value="-sp"/>
                <arg value="-p"/>
                <arg value="@{package}"/>
                <arg value="-o"/>
                <arg value="@{targetdir}"/>
                <arg value="-uri"/>
                <arg value="@{url}"/>
            </java>
        </sequential>
    </macrodef>

    <target name="test-wsdl">
        <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
    </target>
</project>
------------------------------------------------------------------------------------------------------------------------------------------------------------------

This task generates the following file tree inside testaxis/src/test/axis folder:
----------------------------------------------------------
/stub
     RemoteExceptionException0.java
     Soapservice.java
     SoapserviceCallbackHandler.java
     SoapserviceStub.java
/xsd
     ExtensionMapper.java
     RemoteException.java
Exception.java
RemoteException0.java
------------------------------------------------------------------------------------------------------------------------------------------------------------------

So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
test.axis.xsd.RemoteException IS test.axis.Exception

Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.

I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.

PS Damn, I really hope someone will read it :)


> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Sebastian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760189#action_12760189 ] 

Sebastian Schneider commented on AXIS2-3262:
--------------------------------------------

This also affects 1.5. I overlooked the version number in the issue report and I am using Axis2-1.5.

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Oleg Efimov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Efimov reopened AXIS2-3262:
--------------------------------


I really beleive that this is issue is not resolved. Developers, please, pay more attention to the problem description.

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-3262:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Oleg Efimov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540386 ] 

Oleg Efimov commented on AXIS2-3262:
------------------------------------

I don't want to throw a remote exception from a skeleton method, simply the name of my business logic exception is test.axis.RemoteException. For clarity let's name it test.axis.BusinessException. 

And if my service method has signature 
test() throws test.axis.BusinessException

I expect stub method look something like
test() throws AxisFault, BusinessException
where BusinessException here should be a generated subclass of AxisFault, shouldn't it?

Still, in the case I've presented,  3 exception classes are generated, with real unintuitive relations. Moreover, exception RemoteExceptionException0, which is stated in stub method's signature,  isn't AxisFault at all, so really in case of this exception on server, I get simple AxisFault with some fault details! I mean, no proper excption catching can be written.

> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3262) WSDL2Java generates incorrect Exception stubs

Posted by "Ingo Fleer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548980 ] 

Ingo Fleer commented on AXIS2-3262:
-----------------------------------

I do have a solution for my special problem. But therefor I had to change the generated WSDL by hand.

First I can tell you how I understood the code generation and usage of the stubs/skeletons
Understanding code generation:
1) The WSDL generation constructs some fault messages named "RemoteException"
2) The Java-code generation by WSDL generates a class that represents the fault message and an Exception to transport the fault message.
(for your example:If you would rename your "RemoteException" to "RemoteFault" it would be more obvious)

What I did:
I wrote an interface with no Exceptions to generate the WSDL (and removed all "/xsd" extension of all namespaces). Then I did ad the fault messages named xxFault  (for your example: it should  have a name like "RemoteFault")
>From the WSDL I generated the client stub and the server skeleton - so both of them handle faults (with Exceptions).

IMPORTANT:
* Client stub methods throw an Exception named like xxFaultMessage (defined by the name of the fault message in the WSDL)
* Server skeleton methods also throw an Exception named like xxFaultMessage, but to recieve this at client side you have to create new instance of xxFault class and give it to the xxFaultMessage before throwing it: Example for the server code:
public void test() throws xxFaultMessage{
  final xxFault fault = new xxFault();
  xxFaultMessage msg = new xxFaultMessage();
  msg.setFaultMessage(fault );
  throw msg;
}
If this method is called by client the proper Exception named xxFaultMessage can be caught there.
Be advised to declare the fault variable final - without that it never worked for me. That brought plenty of grey hair ;o)

I think in Axis2 the code generation and especially the naming of faults is not very (or too) straight forward (or only intransparent for me). But with a little hand work you can get satisfying solutions

Good luck for your project.



> WSDL2Java generates incorrect Exception stubs
> ---------------------------------------------
>
>                 Key: AXIS2-3262
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3262
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: Oleg Efimov
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I'm going to show simple example of the problem.
> First, I create a test service:
> -------------------------------------------------------------- test.axis.SoapService 
> package test.axis;
> public class SoapService {
>     public void test() throws RemoteException {
>     }
> }
> --------------------------------------------------------------- test.axis.RemoteException
> package test.axis;
> public class RemoteException extends Exception{
>     public RemoteException() {
>     }
>     public RemoteException(Throwable cause) {
>         super(cause);
>     }
>     public RemoteException(String message) {
>         super(message);
>     }
>     public RemoteException(String message, Throwable cause) {
>         super(message, cause);
>     }
> }
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I deploy it on tomcat5.5 on context /axis, web.xml is:
> ---------------------------------------------------------------- web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>     <servlet>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Axis2Servlet</servlet-name>
>         <url-pattern>/axis2/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Service description:
> ----------------------------------------------------------------- services.xml
> <service name="soapservice" scope="application">
>     <messageReceivers>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                          class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                          class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">test.axis.SoapService</parameter>
> </service>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I use default axis2.xml with only one change:
> ------------------------------------------------------------------------ change in axis2.xml
> <parameter name="servicePath">axis2</parameter>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> WSDL, generated by ?wsdl request, is:
> ------------------------------------------------------------------------ wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axis.test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://axis.test" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://axis.test">
>     <wsdl:documentation>soapservice</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ax21="http://axis.test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test/xsd">
>     <xs:complexType name="RemoteException">
>         <xs:complexContent>
>             <xs:extension base="ns1:Exception">
>                 <xs:sequence/>
>             </xs:extension>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>         <xs:schema xmlns:ns="http://axis.test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axis.test">
>     <xs:complexType name="Exception">
>         <xs:sequence>
>             <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:element name="RemoteException">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="testRequest"/>
>     <wsdl:message name="testResponse"/>
>     <wsdl:message name="RemoteException">
>         <wsdl:part name="parameters" element="ns1:RemoteException"/>
>     </wsdl:message>
>     <wsdl:portType name="soapservicePortType">
>         <wsdl:operation name="test">
>             <wsdl:input message="ns1:testRequest" wsaw:Action="urn:test"/>
>             <wsdl:output message="ns1:testResponse" wsaw:Action="urn:testResponse"/>
>             <wsdl:fault message="ns1:RemoteException" name="RemoteException" wsaw:Action="urn:testRemoteException"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="soapserviceSOAP11Binding" type="ns1:soapservicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceSOAP12Binding" type="ns1:soapservicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="test">
>             <soap12:operation soapAction="urn:test" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>             <wsdl:fault name="RemoteException">
>                 <soap12:fault use="literal" name="RemoteException"/>
>             </wsdl:fault>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="soapserviceHttpBinding" type="ns1:soapservicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="test">
>             <http:operation location="soapservice/test"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="test"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="soapservice">
>         <wsdl:port name="soapserviceSOAP11port_http" binding="ns1:soapserviceSOAP11Binding">
>             <soap:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceSOAP12port_http" binding="ns1:soapserviceSOAP12Binding">
>             <soap12:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>         <wsdl:port name="soapserviceHttpport" binding="ns1:soapserviceHttpBinding">
>             <http:address location="http://localhost:8081/axis/axis2/soapservice"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Then I use wsdl2java task to create client stubs:
> ------------------------------------------------------------------------- build.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="testaxis2" basedir=".">
>     <path id="build.classpath">
>         <fileset dir="C:/axis2lib" includes="*.jar"/>
>     </path>
>     <macrodef name="wsdl2java">
>         <attribute name="url"/>
>         <attribute name="targetdir"/>
>         <attribute name="package"/>
>         <sequential>
>             <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes" classpathref="build.classpath">
>                 <arg value="-or"/>
>                 <arg value="-u"/>
>                 <arg value="-uw"/>
>                 <arg value="-sp"/>
>                 <arg value="-p"/>
>                 <arg value="@{package}"/>
>                 <arg value="-o"/>
>                 <arg value="@{targetdir}"/>
>                 <arg value="-uri"/>
>                 <arg value="@{url}"/>
>             </java>
>         </sequential>
>     </macrodef>
>     <target name="test-wsdl">
>         <wsdl2java targetdir="c:/testaxis" url="http://localhost:8081/axis/axis2/soapservice?wsdl" package="test.axis.stub"/>
>     </target>
> </project>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This task generates the following file tree inside testaxis/src/test/axis folder:
> ----------------------------------------------------------
> /stub
>      RemoteExceptionException0.java
>      Soapservice.java
>      SoapserviceCallbackHandler.java
>      SoapserviceStub.java
> /xsd
>      ExtensionMapper.java
>      RemoteException.java
> Exception.java
> RemoteException0.java
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
> So, we've got plenty of exception classes here. To briefly describe their relations in UML-like style, I can say:
> test.axis.stub.RemoteExceptionException0 HAS test.axis.RemoteException0 IS java.lang.Exception
> test.axis.RemoteException0 HAS test.axis.xsd.RemoteException
> test.axis.xsd.RemoteException IS test.axis.Exception
> Stub method test() is reported to throw test.axis.stub.RemoteExceptionException0, which is simply java.lang.Exception, not an AxisFault, so really in case of RemoteException on server I'll get just AxisFault with message preserved, not any specific RemoteException I've wanted.
> I believe, only one exception stub should be generated, called RemoteException, and it should subclass AxisFault.
> PS Damn, I really hope someone will read it :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org