Hi

i'm having a problem processing a response from a web service call where my
objects end up with either null and/or have null properties. the raw
response is shown below:
---
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope";
   xmlns:xml="http://www.w3.org/XML/1998/namespace"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope";
       xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding
"></SOAP-ENV:Header>
   <SOAP-ENV:Body>
       <ser-root:captureDetailsResponse xmlns:ser-root="
http://domain.com/PAS";>
           <CaptureDetailsResponse xmlns:ser-root="
http://domain.com/CaptureDetailsResponse";>
               <ID>2121545</ID>
               <URN>78232150065</URN>
               <URL></URL>
           </CaptureDetailsResponse>
           <ServiceStatusCode xmlns:ser-root="
http://domain.com/haha:captureDetails";>OK</ServiceStatusCode>
       </ser-root:captureDetailsResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---

my resulting CaptureDetailsResponse is null and the status code is null too
both of which are returned within a non-null captureDetailsResponse object
(forgive confusing naming - not my idea)

i've trolled through docs, forums and w3c docs which helped greatly in my
understanding of how namespaces work but numerous combinations i have tried
on the client end still results in null values.

what does work is if the response was prefixed with the prefix defined for
that namespace as in:
<ser-root:CaptureDetailsResponse xmlns:ser-root="
http://domain.com/CaptureDetailsResponse";> ... etc

with the above, all is well but i can not impose that on the server (client
webmethods system). i fear i have missed something simple that is causing my
client components to not be populated with respective values. i also
understood from my reading that the above soap response is valid (dumb
naming aside) and that even though the prefix is not used, the fact that it
is declared is enough and it should also apply to child elements. from the
w3c recommendation i read: (http://www.w3.org/TR/REC-xml-names)

<x xmlns:edi='http://ecommerce.example.org/schema'>
 <!-- the "edi" prefix is bound to http://ecommerce.example.org/schema
      for the "x" element and contents -->
</x>

so in my similar case, even though x does not include the prefix, the
namespace prefixed by edi applies to x and all its contents. in my case,
which i believe is the same, it seems to fail. using soapUI (or even in my
own integration tests using a fake but running web service) the whole thing
works fine. but as an example the default response that soapUI generates
uses prefixes everywhere as does my fake web service. in any case, i believe
the response to be valid and something on the cxf end is misinterpreting or
not applying the namespace correctly.

suggestions appreciated, i'm really stumped.

thanks
Timothy

Reply via email to