Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 51990 invoked from network); 8 Jun 2007 13:56:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jun 2007 13:56:09 -0000 Received: (qmail 57755 invoked by uid 500); 8 Jun 2007 13:55:56 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 57610 invoked by uid 500); 8 Jun 2007 13:55:55 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 57553 invoked by uid 99); 8 Jun 2007 13:55:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2007 06:55:55 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2007 06:55:48 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8CB127141E4 for ; Fri, 8 Jun 2007 06:55:28 -0700 (PDT) Message-ID: <30714541.1181310928573.JavaMail.jira@brutus> Date: Fri, 8 Jun 2007 06:55:28 -0700 (PDT) From: "Davanum Srinivas (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Updated: (AXIS2-2778) WSDL2Java Is Oddly Naming Exceptions In-Reply-To: <2039854.1181163325880.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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