axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystian Szczesny" <>
Subject RE: Axis2 create sample response xml using generated stubs
Date Fri, 19 Jun 2009 10:59:17 GMT
Thanks a lot for prompt answer.


-----Original Message-----
From: Andreas Veithen [] 
Sent: 19 June 2009 11:30
Subject: Re: Axis2 create sample response xml using generated stubs

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.


2009/6/19 Krystian Szczesny <>:
> Hi,
> I want to create a sample response xml message, same way as soapui does when 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 OMNavigator, but it fails
to instantiate due to mandatory attributes:
> Caused by: org.apache.axis2.databinding.ADBException: status cannot be null!!
> What I am trying to do now is:
> <StubResponseGeneratedByADB> response = new <StubResponseGeneratedByADB>();
> OMFactory factory = OMAbstractFactory.getOMFactory();
> OMElement documentElement = response.getOMElement(response.MY_QNAME, factory);
> OMNavigator navigator = 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 through the whole response to set the values
to "something".
> Any help will be appreciated.
> Regards,
> Krystian
> !--
> 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).  If you are not an intended or authorised recipient
> 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 strictly
> prohibited and may be unlawful.
> Intec Telecom Systems PLC does not represent or warrant that an attachment
> 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 and
> are not necessarily those of Intec Telecom Systems PLC.

View raw message