Raghu Upadhyayula,

Thank you for responding to my inquiry.  It is good to hear that your client
and web service are working.  (There might be hope for ours yet!)  

Would it be possible to provide me with some additional information about
your environment and the command line options used with WSDL2Java? Also, is
your web service based on Microsoft WCF?  I would like to research this
further before adding it to JIRA.

Here is more information about our situation:
We are running Windows XP.  Here are the environment settings and the
command line arguments we used for the "interopt test" uri.  Our test case
uses the same options (albeit a different uri).

-------------------------
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_FaultMessag
eException;
...
public xwsinterop.soapwsdl.faults.ThrowMultipleAppFaultsResponse
ThrowMultipleAppFaults(xwsinterop.soapwsdl.faults.ThrowMultipleAppFaults
throwMultipleAppFaults34)
throws
java.rmi.RemoteException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfInt32Fault_Faul
tMessageException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_ArrayOfStringFault_Fau
ltMessageException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppDerivedFaultFault_F
aultMessageException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_StringFault_FaultMessa
geException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppStringFaultFault_Fa
ultMessageException
,org.tempuri.IAppFaultsService_ThrowAppComplexFault_AppComplexFaultFault_Fau
ltMessageException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_Int32Fault_FaultMessag
eException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppBaseFaultFault_Faul
tMessageException
,org.tempuri.IAppFaultsService_ThrowMultipleAppFaults_AppEmptyFaultFault_Fau
ltMessageException;

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;

Thanks, Shawn

-----Original Message-----
From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 05, 2007 12:39 PM
To: [email protected]
Subject: RE: AXIS 2 WSDL2Java Oddly Naming Exceptions

I'm not really sure whether this is a problem or not, because my
webservice has 3 methods and all the 3 methods throw a
UnexpectedException.

And when I generated my client code using WSDL2Java, it generated only
UnexpectedException class, but not method1_UnexpectedException etc.

I'm using ADB.

Thanks
Raghu

-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 05, 2007 10:26 AM
To: [email protected]; [EMAIL PROTECTED]
Subject: Re: AXIS 2 WSDL2Java Oddly Naming Exceptions

Shawn,

This is indeed a problem. Can you please open a JIRA enhancement issue?

thanks,
dims

On 6/5/07, Shawn Dever <[EMAIL PROTECTED]> wrote:
>
>
>
>
> In hopes that someone might be able shed some light on it, 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.
>
>
>
> QUESTIONS
>
> Is there a way around this problem?
>
> Is there a way to force the WSDL2Java to not put the method name in
the
> exception fault?
>
> Has anyone experience this issue before (or maybe it is just us).
>
>
>
> 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/AppFaultsSer
vice.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.
>
>
>
> Thanks for any guidance you can provide.
>
> Shawn
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to