Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 54863 invoked from network); 29 Jul 2004 11:58:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Jul 2004 11:58:56 -0000 Received: (qmail 48335 invoked by uid 500); 29 Jul 2004 11:58:56 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 48265 invoked by uid 500); 29 Jul 2004 11:58:55 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 48001 invoked by uid 99); 29 Jul 2004 11:58:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.68.1.20] (HELO relay.pair.com) (209.68.1.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 29 Jul 2004 04:58:51 -0700 Received: (qmail 23896 invoked from network); 29 Jul 2004 11:58:49 -0000 Received: from 182.250.adsl.sltnet.lk (HELO ?192.168.101.4?) (220.247.250.182) by relay.pair.com with SMTP; 29 Jul 2004 11:58:49 -0000 X-pair-Authenticated: 220.247.250.182 Subject: Re: Unexpected #includes within WSDL2Ws generated AxisClientException.h From: damitha kumarage To: Apache AXIS C Developers List In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1091102352.1271.54.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 29 Jul 2004 17:59:12 +0600 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Adrian, Sorry for the late reply On Thu, 2004-07-15 at 21:26, Adrian Dick wrote: > > > Hi, > > When using WSDL2Ws to generate client stubs, I notice that > AxisClientException is generated. Within the header file, the fault type > is included for each method. But, if the same fault type is used for more > than one method, no checking takes place, so it is included each time. The > attached patch introduces a check to ensure each fault type is included > only once. > (See attached file: ExceptionHeaderWriter.java.patch) Thanks Adrian for the patch > > However, looking through the rest of the AxisClientException code, there > are no further references to the fault types. Which, for me, raises the > further question - Why are we including the fault types, if they're not > actually being used? > Actually the user has the option to do something with the fault type. He may use it to print the fault information. see the code below from AxisClientException.cpp void AxisClientException::processException (ISoapFault* pFault) { /*User can do something like deserializing the struct into a string*/ const char* pcCmplxFaultName; const char* pcDetail; if(pFault) { m_sMessage = "Fault Code:"; m_sMessage += pFault->getFaultcode(); m_sMessage += "\n"; m_sMessage += "Fault String:"; m_sMessage += pFault->getFaultstring(); m_sMessage += "\n"; m_sMessage += "Fault Actor:"; m_sMessage += pFault->getFaultactor(); m_sMessage += "\n"; pcDetail = pFault->getSimpleFaultDetail().c_str(); if(NULL != pcDetail && 0 != strcmp("", pcDetail)) m_sMessage += pcDetail; else { pcCmplxFaultName = pFault->getCmplxFaultObjectName().c_str(); //printf("pcCmplxFaultName:%s\n", pcCmplxFaultName); } if(0 == strcmp("OutOfBoundStruct", pcCmplxFaultName)) { OutOfBoundStruct* pFaultDetail = NULL; pFaultDetail = (OutOfBoundStruct*)pFault-> getCmplxFaultObject(); .... .... As I promished to John earlier I'll move the documentation about this into a proper place soon. Thanks, damitha > These observations and the patch are based on the 1.2 release. > > Regards, > Adrian > _______________________________________ > Adrian Dick (adrian.dick@uk.ibm.com)