Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 1230 invoked from network); 19 Jun 2009 10:30:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jun 2009 10:30:32 -0000 Received: (qmail 27711 invoked by uid 500); 19 Jun 2009 10:30:40 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 27646 invoked by uid 500); 19 Jun 2009 10:30:40 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 27595 invoked by uid 99); 19 Jun 2009 10:30:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 10:30:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andreas.veithen@gmail.com designates 209.85.220.218 as permitted sender) Received: from [209.85.220.218] (HELO mail-fx0-f218.google.com) (209.85.220.218) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 10:30:31 +0000 Received: by fxm18 with SMTP id 18so1886715fxm.16 for ; Fri, 19 Jun 2009 03:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XMegkbRBInPtTgkmTuHZrwV58pikxp7h69PwEE5+KeY=; b=qMWSbpjjpCFeGoJmk1EgPu1WRdzAt42MH2+iC6WG0XP8VAWFZNTaf2i4B7vKGWYp8+ gwR+iKh35z8zmBBuKNiC/aCU+HGZyQiM2na0vHGMfEA48Bt0HvHVgffIvvbn7Q4tSVOK Jrdipz7dqhpRiLBpne0+yLCiePQauyKaGk7hE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kjiV7vPYFTdhyHDkf5zvViama4l15IT+fMtXQupmrfHkNQAWuK5X8GrQpL+qygVJfp 9CPlZPFdvZzOh3B9mGqFopZX2UDGFRYfQfBpzI9v45EACNrWJjkKPW4NHExQH+NQ9fWW JQzrZZ/34423Kl7+fWuCI85lQ0Kj4fdhFBgAg= MIME-Version: 1.0 Received: by 10.239.130.196 with SMTP id 4mr185320hbk.17.1245407410511; Fri, 19 Jun 2009 03:30:10 -0700 (PDT) In-Reply-To: <2FC11EE6EEA1B0479BEA5B365E1BD276039C1B3A@ibgalex01p.intecbilling.com> References: <2FC11EE6EEA1B0479BEA5B365E1BD276039C1B3A@ibgalex01p.intecbilling.com> Date: Fri, 19 Jun 2009 12:30:10 +0200 Message-ID: Subject: Re: Axis2 create sample response xml using generated stubs From: Andreas Veithen To: axis-user@ws.apache.org Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The correct approach would be to instantiate the bean, use reflection (java.beans.Introspector) to populate all properties and then create the XML from it. Note that you should not use OMNavigator because it doesn't do what you believe it does. Andreas 2009/6/19 Krystian Szczesny : > Hi, > > I want to create a sample response xml message, same way as soapui does w= hen you create a mock service. > I just want a sample xml message with all possible values set to '?'. > I wanted to navigate through the structure of my response using OMNavigat= or, but it fails to instantiate due to mandatory attributes: > Caused by: org.apache.axis2.databinding.ADBException: status cannot be nu= ll!! > > What I am trying to do now is: > response =3D new (); > OMFactory factory =3D OMAbstractFactory.getOMFactory(); > OMElement documentElement =3D response.getOMElement(response.MY_QNAME, fa= ctory); > OMNavigator navigator =3D new OMNavigator(documentElement); > > And at this stage I am getting the exception. > I do understand why I got the exception, however I am not sure how can I = easily and automatically (without knowing the structure upfront) loop throu= gh the whole response to set the values to "something". > > Any help will be appreciated. > > Regards, > Krystian > > !-- > KRYSTIAN SZCZ=CASNY > This e-mail and any attachments are confidential and may also be legally > privileged and/or copyright material of Intec Telecom Systems PLC (or its > affiliated companies). =A0If you are not an intended or authorised recipi= ent > of this e-mail or have received it in error, please delete it immediately > and notify the sender by e-mail. In such a case, reading, reproducing, > printing or further dissemination of this e-mail or its contents is stric= tly > prohibited and may be unlawful. > Intec Telecom Systems PLC does not represent or warrant that an attachmen= t > hereto is free from computer viruses or other defects. The opinions > expressed in this e-mail and any attachments may be those of the author a= nd > are not necessarily those of Intec Telecom Systems PLC. >