Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 32211 invoked from network); 20 Jan 2007 13:51:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jan 2007 13:51:43 -0000 Received: (qmail 3307 invoked by uid 500); 20 Jan 2007 13:51:46 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 3245 invoked by uid 500); 20 Jan 2007 13:51:46 -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 3234 invoked by uid 99); 20 Jan 2007 13:51:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jan 2007 05:51:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of atmanes@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jan 2007 05:51:37 -0800 Received: by nf-out-0910.google.com with SMTP id o63so733960nfa for ; Sat, 20 Jan 2007 05:51:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E+vuHml1/I2xTv9w9yRhUOOvst+fOFCs4xJzl5eykNzC7SYDrfo/T3ThhvKKKATmJnOurc3HyQn4ATuw9KDac8InDlTPuvOpLkFacSF9BaLpzZKTVuBnuRsh69IXw4oaG14WugHPctxdlFuYgVLZRh1AGT2OJcu36fb234UgK58= Received: by 10.82.162.14 with SMTP id k14mr2482625bue.1169301074991; Sat, 20 Jan 2007 05:51:14 -0800 (PST) Received: by 10.82.117.17 with HTTP; Sat, 20 Jan 2007 05:51:14 -0800 (PST) Message-ID: Date: Sat, 20 Jan 2007 08:51:14 -0500 From: "Anne Thomas Manes" To: axis-dev@ws.apache.org Subject: Re: not able to retrieve attribute (elements work fine) In-Reply-To: <45B1DAFF.1090006@sosnoski.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45B1DAFF.1090006@sosnoski.com> X-Virus-Checked: Checked by ClamAV on apache.org The attribute is defined as a global attribute in the jxdm.xsd, therefore it must be namespace qualified. The error is in the message generated by the server. Anne On 1/20/07, Dennis Sosnoski wrote: > I think this is the wrong way around, Anne. It looks to me like the > attribute is not namespace qualified in the schema (it's defined in > jxdm.xsd, not in the WSDL schema which has > attributeFormDefault="qualified"), so the response being sent from the > server is good and the error is apparently in the client-side generated > code. > > Either way, it looks like a problem with the XMLBeans code generation > for Axis2. That's assuming you're using the same exact WSDL and schema > for both client and server code generation - you might want to > double-check that to be sure. Then can you try this out using the Axis2 > 1.1.1 release? There were a number of bug fixes in that, and it's > possible this problem has been corrected. > > - Dennis > > Dennis M. Sosnoski > SOA and Web Services in Java > Training and Consulting > http://www.sosnoski.com - http://www.sosnoski.co.nz > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 > > > > Anne Thomas Manes wrote: > > Danny, > > > > According to your schema, the attribute should be namespace qualified. > > Hence the message you get back from the service should look like this: > > > > > xmlns:ns1="http://jxdm.ws.doc.state.sc.us" > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > > Rebecca > > Mace > > Smith > > > > > > The reason why your request for the comment text returns null is > > because it's looking for an attribute called > > ns1:personNameCommentText. Since that attribute doesn't exist, it > > returns null. > > > > If you implemented the service using Axis2 and XMLBeans, then I think > > this is a bug in XMLBeans. > > > > Anne > > > > On 1/19/07, Danny Lin wrote: > >> > >> > >> I added more logging on the web service server end just to see what's > >> going > >> on. The document that was prepared contains the namespace in the > >> attribute. > >> However, at the point where the client received, the namespace in the > >> attribute is gone. Can someone please help? I feel that has something > >> to do > >> with the WSDL which I do not have very good understanding. > >> > >> Thanks. > >> > >> Danny > >> > >> > >> ________________________________ > >> From: Danny Lin > >> Sent: Friday, January 19, 2007 6:24 PM > >> To: axis-dev@ws.apache.org; axis-user@ws.apache.org > >> Subject: not able to retrieve attribute (elements work fine) > >> > >> > >> > >> > >> I am attaching my WSDL and my schema to this message. Hopefully > >> someone with > >> good knowledge can spot where I did wrong here. I am using XMLBeans > >> binding > >> (version 2.2). My Axis2 version 1.1. > >> > >> Basically I am having problem in getting the "personNameCommentText" > >> attribute in the "PersonAlternateName" element. > >> > >> After my webservice is called, the server returns: > >> ... > >> >> xmlns:ns1="http://jxdm.ws.doc.state.sc.us"> > >> Rebecca > >> Mace > >> Smith > >> > >> ... > >> > >> In my client side, I have code that looks like this: > >> ... > >> String commentText = al.getPersonNameCommentText(); > >> log.debug("XML: "+al); > >> ... > >> > >> The output is: > >> >> xmlns:ns1="http://jxdm.ws.doc.state.sc.us" > >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > >> Rebecca > >> Mace > >> Smith > >> > >> > >> BUT, the commentText is null, not the "A" that I am expecting!! > >> > >> Then, I just want to see what the client is expecting for the XML to > >> look > >> like, I added the code: > >> ... > >> al.setPersonNameCommentText("R"); > >> log.debug("XML after change:\n"+al); > >> ... > >> > >> Now the output added a namespace to the personNameCommentText. > >> >> xmlns:ns1="http://jxdm.ws.doc.state.sc.us" > >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > >> Rebecca > >> Mace > >> Smith > >> > >> > >> And, if I call getPersonNameCommentText(), I am getting "R". > >> > >> Any help is greatly appreciated. > >> > >> Danny > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-dev-help@ws.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-dev-help@ws.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org