axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris" <chris.had...@cobia.net>
Subject RE: getChildElements(Name) trouble
Date Mon, 15 Dec 2003 14:03:15 GMT

Cyril - 

Most likely, you are running into a namespace issue.

Try     public abstract Name createName(String localName, String prefix,
String uri) and see if it works.  Though, why the API designers put the
prefix in the signature befuddles me....   The getChildElements call is
going to end up performing a comparison of the entire qualified name....

/Chris


-----Original Message-----
From: Cyril Godefroy [mailto:cgodefroy@mac.com] 
Sent: Friday, December 12, 2003 3:47 AM
To: axis-user@ws.apache.org
Subject: getChildElements(Name) trouble

I'm having trouble iterating through my SOAPBody. I get the top element 
fine, but when I go down, the iterators come back empty.

Here's my SOAPBody :
<ns1:Body xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
   <realProperty:propertyListing id="property_1234" 
xmlns:realProperty="http://schemas.realhouses.com/listingSubmission">
    <realProperty:listingAgency>Really Nice Homes, 
Inc</realProperty:listingAgency>
    <realProperty:listingType>add</realProperty:listingType>
    <realProperty:frontImage 
href="property1234_front_jpeg@realhouses.com"/>
    <realProperty:interiorImage 
href="property1234_interior_jpeg@realhouses.com"/>
   </realProperty:propertyListing>
  </ns1:Body>

This code produces some result:

Name listingElName = soapFactory.createName(
	     "propertyListing", "realProperty",
	     "http://schemas.realhouses.com/listingSubmission");
Iterator listings = body.getChildElements(listingElName);

But this gives back an empty iterator:

Iterator ageIt = body.getChildElements(se.createName("listingAgency"));

I have tried variations with no luck (looking at the first element in 
the listings iteration for example).



Mime
View raw message