-----Original Message-----
From: Ole Matzura [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 1. Juni 2005 17:37
To: [email protected]
Subject: RE: Using SAAJ 1.3 and XMLBeans 1.0.3 for a web service clientHiYou need to generate your xmlbeans from the webservice's wsdl (if possible); xmlbeans will create a wrapper bean for the soap-body content element named XxxDocument, where Xxx is your xmlbeans type for the soap body content.For example if your root element in the soap-body is searchRequest of type SearchRequest, xmlbeans will create a SearchRequest interface and a SearchRequestDocument interface. The latter should be used to parse the searchRequest element, it will contain a getSearchRequest method for getting the actual request.. (corresponding XxxDocument interface is also created for the response..).we've done this with basic-profile compliant doc-literal services and it works very well..good luck!/Ole
From: Cordes, Hans-Dieter [mailto:[EMAIL PROTECTED]
Sent: Wed 01/06/2005 17:19
To: [email protected]
Subject: Using SAAJ 1.3 and XMLBeans 1.0.3 for a web service clientHello,
I use SAAJ 1.3 and XMLBeans 1.0.3 to develop a web service client. I use SAAJ for the SOAP part and XMLBeans for the data payload part. My problem is that I cannot figure out how to get the child element from the SOAP-Body element that corresponds to my root XMLBeans element. The work-around I use for now is that I iterate through all SOAP-Body childs until an XMLBeans parse method for a org.w3c.dom.Node object does not throw an exception. I have tried to use a javax.xml.soap.Name object that contains the "localname" of my XMLBeans root element, but that creates an empty iterator. I cannot use the javax.xml.soap.Name object that in addition contains the namespace prefix and namespace URL, as the prefix may change.
My work-around works, but it seems to be very, very ugly. Any ideas here?
I have attached the corresponding JAVA code and some logging output so you can see the XML I try to process.
Thanks in advance,
Hans-Dieter Cordes
------------------------------------------------------------------------
Hans-Dieter Cordes
Software Dev. Spec. in the Network Configuration team
NIBS Development & Support (Network Information & Business Systems)
AT&T LABS EMEA
Lyoner Strasse 24-26
D-60528 Frankfurt
Germany
EMail: [EMAIL PROTECTED]
Phone: +49 69 15306 235
Fax: +49 69 15306 330
------------------------------------------------------------------------
********************************************************************************
This message and any attachments to it contain confidential business information
intended solely for the recipients. If you have received this email in error
please do not forward or distribute it to anyone else, but call +49/69/15306-235
to report the error, and then delete this message from your system.
********************************************************************************
Title: Using SAAJ 1.3 and XMLBeans 1.0.3 for a web service client
Ole,
thanks
for your response. It helped to eliminate the manual work of extracting XSD
files from the WSDL file, as I had not been aware that XMLBeans also work with
WSDL files.
However, my original problem does not seem to be "attacked" by this (or
at least I cannot discover the solution, perhaps; I have inspected the source
code that XMLBeans has generated). I still have the situation that I process the
SOAP elements from the reply message using SAAJ features until I get to the
SOAP-Body element. At that point I have to retrieve my own root data element,
and currently I use the "getChildElements()" method of the SOAP-Body element to
get access to my root data element. My question now would
be:
- how do I get directly to the child element that is my
root data element
without iterating over all child elements
and without waiting until
no parse exception
occurs?
Perhaps you know this detail, as you mentioned that you have done similar
things in the past.
Thanks
in advance,
Hans-Dieter Cordes
- Using SAAJ 1.3 and XMLBeans 1.0.3 for a web service cl... Cordes, Hans-Dieter
- RE: Using SAAJ 1.3 and XMLBeans 1.0.3 for a web s... Ole Matzura
- Cordes, Hans-Dieter

