angeloNZ wrote:
Hi,

I observed from running the wsdl-first example that the <GetPersonResponse>
element contains a default namespace declaration and not a prefix.  I'm
comparing this with the request body that gets generated by soapUI where the
<GetPerson> element contains a "wsdl" namespace prefix:

request generated by soapUI:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";
xmlns:wsdl="http://servicemix.apache.org/samples/wsdl-first";>
   <soap:Header/>
   <soap:Body>
      <wsdl:GetPerson>
         <wsdl:personId>?</wsdl:personId>
      </wsdl:GetPerson>
   </soap:Body>
</soap:Envelope>

response generated by soapUI:  GetPersonResponse contains a default
namespace instead of a xmlns:wsdl="" declaration.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
   <soap:Body>
      <GetPersonResponse
xmlns="http://servicemix.apache.org/samples/wsdl-first";>
         <personId
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>?</personId>
         <ssn
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>000-000-0000</ssn>
         <name
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>Guillaume</name>
      </GetPersonResponse>
   </soap:Body>
</soap:Envelope>

I saw that the wsdl is doc/literal and that both GetPerson and
GetPersonResponse is defined in the same schema definition where they share
the same targetNamespace so I'm assuming that the response element will also
contain the "wsdl" prefix.  Is this response standard behavior for doc/lit
web services or is it just ServiceMix?
I also have another doc/lit web service in ServiceMix that has the same
response format.  Is there a way to get a response where I will get the
namespace prefix?  The default namespace is causing problems for me because
I'm running xpath queries on the soap response and xpath returns null for
default namespace declarations.
Is there a particular way of editing the wsdl for what I want?  If you could
also point me to what particular ServiceMix class I can extend to achieve my
goal would be appreciated.
You are using wsdl-first or cxf-wsdl-first?
Sorry, I'm confused with your question, what kind of response are you expected?

And go back to your question

Is there a particular way of editing the wsdl for what I want? No, I don't think so. Actually how is the xml message looks like is controlled by the xml processor api the component used underlying, for smx-cxf, it's stax implementation wstx-asl.
Freeman


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to