Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 98516 invoked from network); 12 Sep 2006 22:42:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 22:42:51 -0000 Received: (qmail 15616 invoked by uid 500); 12 Sep 2006 22:42:48 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 15581 invoked by uid 500); 12 Sep 2006 22:42:48 -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 15570 invoked by uid 99); 12 Sep 2006 22:42:48 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 15:42:48 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([209.237.227.198:44938] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id C8/B1-05218-5F737054 for ; Tue, 12 Sep 2006 15:43:01 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3760714347 for ; Tue, 12 Sep 2006 22:39:22 +0000 (GMT) Message-ID: <17035395.1158100762782.JavaMail.jira@brutus> Date: Tue, 12 Sep 2006 15:39:22 -0700 (PDT) From: "Eran Chinthaka (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-928) Not all added header elements are included in outgoing SOAP header unless run under debugger - bug in OMElement caching? In-Reply-To: <10300054.1153784954062.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS2-928?page=comments#action_12434303 ] Eran Chinthaka commented on AXIS2-928: -------------------------------------- Can you please attach F.xsd as well? > Not all added header elements are included in outgoing SOAP header unless run under debugger - bug in OMElement caching? > ------------------------------------------------------------------------------------------------------------------------ > > Key: AXIS2-928 > URL: http://issues.apache.org/jira/browse/AXIS2-928 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: client-api > Affects Versions: 1.0 > Reporter: Derek Foster > Assigned To: Eran Chinthaka > Priority: Blocker > > Hi, folks. > I have two custom headers, CARSLogin and CARSPassword, that are declared and used in my WSDL like so: > > > > > > > > > > > > > > > > > > > > > > > > > > > > F Port Type > > > > > > > > F Soap Binding > > > > > > > > > > > > > > > > > Now, when I use WSDL2Java to generate XMLBeans Java code for these, and try to write a client that will send a message in this format, I write something like this: > final CLoginDocument login = CLoginDocument.Factory.newInstance(); > login.setCLogin( "testlogin" ); > final CPasswordDocument password = CPasswordDocument.Factory.newInstance(); > password.setCPassword( "testpassword" ); > final FServiceStub service = new FServiceStub( null, targetEndpoint ); > final FullEventUpdateDocument fullEventUpdate = FullEventUpdateDocument.Factory.newInstance(); > fullEventUpdate.setFullEventUpdate( getSituation() ); > return service.acceptFEvent( fullEventUpdate, login, password ); > This seems reasonable, and mostly works. Except that when I look at the SOAP output using TCPMon, the SOAP header that is included in the outgoing SOAP message contains the CLogin element as expected, but totally omits the CPassword element (!). I can find no reason for this. Both were passed to the stub, and both are non-null, so both should be included in the output. > When I step through the code in the stub using a debugger, however, then the code seems to correctly generate the header including both the login and password, as I would expect. So this is a stereotypical "heisenbug" as per the Jargon File: everything works fine when I run it under the debugger and watch what is happening, but it fails when run normally. > My theory is that the debugger is calling toString() on various items such as the SOAP envelope which is constructed to contain both the CLogin and CHeader elements. I suspect that calling toString() in this fashion forces the underlying OMElements to cache the results of parsing the XML, and that when it comes time to generate the SOAP message for output, reading from this cache works differently from parsing the header elements directly somehow. > Regardless, this seems like a pretty serious bug in Axis2: If I add multiple header elements to a message, I expect that they all should be included in the outgoing SOAP message, but that is not happening unless I run the program under a debugger. The fact that this is nondeterministic hints at a caching or multithreading bug at some level within the Axis architecture, which is quite worrisome, since the process of formatting and sending a SOAP message should be completely deterministic and repeatable. > Derek -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org