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 "Shawn Dever (JIRA)" <ji...@apache.org> on 2007/06/06 22:55:25 UTC

[jira] Created: (AXIS2-2778) WSDL2Java Is Oddly Naming Exceptions

WSDL2Java Is Oddly Naming Exceptions
------------------------------------

                 Key: AXIS2-2778
                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
         Environment: Windows
            Reporter: Shawn Dever


We have reduced our problem to a simple test case.

SCENARIO 
We have a web service with two methods: "Method1" and "Method2".
Each method can throw an exception called "CustomException".

We use the WSDL2Java to build our Java client proxy.

The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)

PROBLEM
When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.

MORE INFORMATION
We are using the latest Axis 2 code.
The web service is written using Microsoft .NET WCF/Indigo.  
.Net clients are working fine.

We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 

In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.

Here is an example of what we do and see:
-------------------------
set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2

%AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
-------------------------

Using the above command, the resulting interface for the Interopt test looks like this:
public interface AppFaultsService {
  ...
public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
throws 
java.rmi.RemoteException,
org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
...
public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
throws
java.rmi.RemoteException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;

The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.

Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
public myproduct.mycompany.MyMethod1Response MyMethod1(
       myproduct.mycompany.MyMethod1 myMethod10)
       throws java.rmi.RemoteException
,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;

Thank you.


-- 
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] Resolved: (AXIS2-2778) WSDL2Java Is Oddly Naming Exceptions

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

Amila Chinthaka Suriarachchi resolved AXIS2-2778.
-------------------------------------------------

    Resolution: Fixed

I think here the problem is generating one exception class if the internal element Qname is same for all the fault messages. Now it has fixed

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>         Attachments: Program.cs, WSTest_wsdl.xml, WSTest_wsdl0.xml
>
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Shawn Dever commented on AXIS2-2778:
------------------------------------

Amila,  

I just tested the nightly build (dated June 13th), and it does provide a workable solution to the problem we are experiencing. 

Each method throws its own version of the exception.  
MyMethod1 throw org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage 
and 
MyMethod2 throw org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage
and
MyMethod3  throw org.tempuri.WSTest_MyMethod3_CustomExceptionFault_FaultMessage


I think our preferred solution would be if all the methods generated the same CustomExceptionFault (not specific to a method).
MyMethod1 throw org.tempuri.WSTest_CustomExceptionFault_FaultMessage 
and 
MyMethod2 throw org.tempuri.WSTest_CustomExceptionFault_FaultMessage
and
MyMethod3  throw org.tempuri.WSTest_CustomExceptionFault_FaultMessage

But the solution you  provided will allow the web service to continue to evolve without breaking our client code.
Thank you for the fast turn around to this problem.

Shawn

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>         Attachments: Program.cs, WSTest_wsdl.xml, WSTest_wsdl0.xml
>
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Davanum Srinivas updated AXIS2-2778:
------------------------------------

    Priority: Blocker  (was: Major)

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Jaliya Ekanayake reassigned AXIS2-2778:
---------------------------------------

    Assignee: Amila Chinthaka Suriarachchi  (was: Deepal Jayasinghe)

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Davanum Srinivas updated AXIS2-2778:
------------------------------------

    Assignee: Deepal Jayasinghe  (was: Davanum Srinivas)

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Deepal Jayasinghe
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Shawn Dever updated AXIS2-2778:
-------------------------------

    Attachment: Program.cs
                WSTest_wsdl.xml
                WSTest_wsdl0.xml

Hello,

The latest nightly build did not solve the problem we are experiencing.
Let me attempt to illustrate the problem again.

Here is an example of the client proxy class generated by WSDL2Java.
There are two commands: MyMethod1 and MyMethod2.  Each throws a
CustomExceptionFault.  Notice that the WSDL2Java in naming the exception
thrown by both methods as
org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage.   

//------------------------------------------------------------------
// Initial Interface of Web Service v1.0
package org.tempuri;
public interface WSTest {

	 public myproduct.mycompany.MyMethod1Response MyMethod1(
					myproduct.mycompany.MyMethod1
myMethod1)
					throws 
						java.rmi.RemoteException
	
,org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage;

 
	 public myproduct.mycompany.MyMethod3Response MyMethod3(
					myproduct.mycompany.MyMethod3
myMethod3)
					throws 
						java.rmi.RemoteException
	
,org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage;
}
//------------------------------------------------------------------

We implement a client that calls these methods and catches the
org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage.  

Later, the web service developer decides to add a new method to the web
service.  In this example, they add MyMethod2.  We regenerate the client
side proxy classes and this is what we get.

//------------------------------------------------------------------
// Interface of Web Service v2.0
// after web service adds MyMethod2
package org.tempuri;
public interface WSTest {
	public myproduct.mycompany.MyMethod1Response MyMethod1(
					myproduct.mycompany.MyMethod1
myMethod1)
					throws 
						java.rmi.RemoteException
	
,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage;

	 public myproduct.mycompany.MyMethod2Response MyMethod2(
					myproduct.mycompany.MyMethod2
myMethod2)
					throws 
						java.rmi.RemoteException
	
,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage;
 
	 public myproduct.mycompany.MyMethod3Response MyMethod3(
					myproduct.mycompany.MyMethod3
myMethod3)
					throws 
						java.rmi.RemoteException
	
,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage;
}
//------------------------------------------------------------------

Notice that the methods now throw
org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage, 
where previously they threw
org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage.

We have to go through our code and fix all the exception handlers to deal
with the name change.

Question and Comments:
Why does the exception name need to be included in the method or message
name?  

a) Could all Methods throw org.tempuri.WSTest_CustomException_FaultMessage?
(ie. Not include the method/message name in the name of the exception.)

b) Or could all the
org.tempuri.WSTest_MethodXXXX_CustomExceptionFault_FaultMessage inherit from

the same CustomExceptionFault base class?

c) Or could 
MyMethod1 
throw org.tempuri.WSTest_MyMethod1_CustomExceptionFault_FaultMessage 
and 
MyMethod2
throw org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessage
and
MyMethod3 
throw org.tempuri.WSTest_MyMethod3_CustomExceptionFault_FaultMessage

Attached are examples of the WSDL/WSDL0 of the web service with two methods:
MyMethod1 and MyMethod3.  I have also included the source of the .Net web
service.

Thanks again for any help.
Shawn




> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>         Attachments: Program.cs, WSTest_wsdl.xml, WSTest_wsdl0.xml
>
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Davanum Srinivas updated AXIS2-2778:
------------------------------------

    Assignee: Davanum Srinivas

> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Davanum Srinivas
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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-2778) WSDL2Java Is Oddly Naming Exceptions

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

Amila Chinthaka Suriarachchi commented on AXIS2-2778:
-----------------------------------------------------

hi,
Can you try out with a nighly build? 
I generate the code for the method you have given below and it looks like this
              public  xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(

                            xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults70)
                        

                    throws java.rmi.RemoteException
                    
                    
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessage
                        ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessage{


the exceptin suffix has removed due to a change after 1.2
Here the fault class names are formed using the MessageNames not using the method names.
i.e in axis 1.2 a fault class name is formed using the message part + Exception suffix.

for an instance the 
exception IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException
corresponds to the message 
IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessage

and the ThrowMultipleAppFaults operation has all those fault elements declared.

Can you attach your sample wsdl file?






> WSDL2Java Is Oddly Naming Exceptions
> ------------------------------------
>
>                 Key: AXIS2-2778
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2778
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows
>            Reporter: Shawn Dever
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> We have reduced our problem to a simple test case.
> SCENARIO 
> We have a web service with two methods: "Method1" and "Method2".
> Each method can throw an exception called "CustomException".
> We use the WSDL2Java to build our Java client proxy.
> The exception is generated with a name such as "Method1_CustomException".  In the client proxy code, both methods now throw/catch "Method1_CustomException".  (Notice how the "Method1" is used in the name of the exception.)
> PROBLEM
> When the web service designer adds a new method, say "Method3", and we regenerate the client proxy, the exception names changes to "Method3_CustomException".  This forces us to modify our existing client code to recognize the name change to the exception.
> MORE INFORMATION
> We are using the latest Axis 2 code.
> The web service is written using Microsoft .NET WCF/Indigo.  
> .Net clients are working fine.
> We tried WSDL2Java on the WCF Interop Endpoints (see URL below) and the proxy code looks like it will suffer the same problem.  http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl 
> In our test web service, we created a method called AAAAExceptions that threw all the exceptions.  We thought that by doing this, all the proxy exceptions would be named with this method's name such as: AAAAException_CustomException.  Oddly enough, this worked for all but one of the exceptions.
> Here is an example of what we do and see:
> -------------------------
> set JAVA_HOME=C:\Program Files\Java\jre1.5.0_09
> set AXIS2_HOME=C:\downloads\ApacheAxis2\1.2\unzipped\axis2-1.2
> %AXIS2_HOME%\bin\wsdl2java --unpack-classes -uri http://131.107.72.15/SoapWsdl_Faults_DocLitW_Service_Indigo/AppFaultsService.svc?wsdl
> -------------------------
> Using the above command, the resulting interface for the Interopt test looks like this:
> public interface AppFaultsService {
>   ...
> public xwsinterop.soapwsdl.faults.ThrowStringFaultResponse 
> ThrowStringFault(xwsinterop.soapwsdl.faults.ThrowStringFault throwStringFault10)
> throws 
> java.rmi.RemoteException,
> org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException;
> ...
> public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults throwMultipleAppFaults34)
> throws
> java.rmi.RemoteException
> ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_FaultMessageException       ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_FaultMessageException          ,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_FaultMessageException;
> The ThrowStringFault method and ThrowMulipleAppFaults method both throw as StringFault.  But notice how the exception name has one of the method names (ThrowMultipleAppFaults) in it: IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessageException.
> Here is an example of what we seeing from our simple test web service.  The MyMethod1 throw an exception with MyMethod2 in the name.
> public myproduct.mycompany.MyMethod1Response MyMethod1(
>        myproduct.mycompany.MyMethod1 myMethod10)
>        throws java.rmi.RemoteException
> ,org.tempuri.WSTest_MyMethod2_CustomExceptionFault_FaultMessageException;
> Thank you.

-- 
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