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:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 3:47 AM
To: [EMAIL PROTECTED]
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="[EMAIL PROTECTED]"/>
    <realProperty:interiorImage 
href="[EMAIL PROTECTED]"/>
   </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).


Reply via email to