I am using a wsdl first approach.
The schema definition uses `elementFormDefault="qualified"` property. It
still doesn't work.
I am posting the schema part for you too see:
=========== SCHEMA ELEMENT ===========
<xsd:schema
elementFormDefault="qualified"
attributeFormDefault="unqualified"
targetNamespace="http://prime.simplesoft.org/2009/xsd"
xmlns:spx="http://prime.simplesoft.org/2009/xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
======== SCHEMA ELEMENT ENDS ========
Any other ideas ?
Thanks,
amit_9b
dkulp wrote:
>
>
> I assume you mean you want:
> <models xmlns="http://prime.simplesoft.org/2009/xsd">
> ....
>
> You don't say if this is a wsdl first or not type situation.
>
> If it IS, then you need to check the schema in the wsdl. You would need
> to
> add elementFormDefault="qualified" to the schema. By default, it would be
> unqualified which results in the message format you see.
>
> On Wed July 29 2009 10:25:50 am amit_9b wrote:
>> Hi,
>>
>> I am hosting a webservice using apache-cxf v2.1.1.
>
> I'd also suggest upgrading to something newer. :-)
>
> Dan
>
>
>
>> The issue i am facing is that the 'first element of response' is
>> namespace-qualified, but other child elements are not. (SOAP
>> Request/Response as seen in CXF logs is attached to this email).
>>
>> So here is the output I get:
>> ==================== RESPONSE ====================
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body>
>> <ns2:models xmlns:ns2="http://prime.simplesoft.org/2009/xsd">
>> <model active="true" provider="gili" name="nn" id="1">
>> <display-name>Near Neighbors</display-name>
>> <description>Find near neighbors in cpd collection</description>
>> <model-output-types>
>> <model-output-type data-type="integer" name="near neighborId"
>> id="1">
>> <description>LSN of gili near neighbors</description>
>> </model-output-type>
>> <model-output-type data-type="smiles" name="near neighbor
>> structure" id="2">
>> <description>Structure of near neighbors</description>
>> </model-output-type>
>> </model-output-types>
>> </model>
>> <model active="true" provider="gili2" name="nn2" id="2">
>> <display-name>gili Near Neighbors 2</display-name>
>> <description>Find near neighbors in gili cpd
>> collection</description>
>> <model-output-types>
>> <model-output-type data-type="integer" name="near neighbor Id"
>> id="1">
>> <description>LSN of gili near neighbors</description>
>> </model-output-type>
>> <model-output-type data-type="smiles" name="near neighbor
>> structure" id="2">
>> <description>Structure of gili near neighbors</description>
>> </model-output-type>
>> </model-output-types>
>> </model>
>> </ns2:models>
>> </soap:Body>
>> </soap:Envelope>
>> ==================== RESPONSE ENDS ====================
>>
>> So - making the issue more explicit if you take a look at the following
>> soap response:
>> <ns2:models xmlns:ns2="http://prime.simplesoft.org/2009/xsd">
>> <model active="true" provider="gili" name="nn" id="1">
>> <display-name>Near Neighbors</display-name>
>>
>> The models element is qualified with `ns2` while any other element is
>> not!
>> I want to get rid of this `ns2` qualifier.
>>
>> So the soap response I desire is :
>> ==================== DESIRED RESPONSE ====================
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body>
>> <models xmlns:ns2="http://prime.simplesoft.org/2009/xsd">
>> <model active="true" provider="gili" name="nn" id="1">
>> <display-name>Near Neighbors</display-name>
>> <description>Find near neighbors in cpd collection</description>
>> <model-output-types>
>> <model-output-type data-type="integer" name="near neighborId"
>> id="1">
>> <description>LSN of gili near neighbors</description>
>> </model-output-type>
>> <model-output-type data-type="smiles" name="near neighbor
>> structure" id="2">
>> <description>Structure of near neighbors</description>
>> </model-output-type>
>> </model-output-types>
>> </model>
>> <model active="true" provider="gili2" name="nn2" id="2">
>> <display-name>gili Near Neighbors 2</display-name>
>> <description>Find near neighbors in gili cpd
>> collection</description>
>> <model-output-types>
>> <model-output-type data-type="integer" name="near neighbor Id"
>> id="1">
>> <description>LSN of gili near neighbors</description>
>> </model-output-type>
>> <model-output-type data-type="smiles" name="near neighbor
>> structure" id="2">
>> <description>Structure of gili near neighbors</description>
>> </model-output-type>
>> </model-output-types>
>> </model>
>> </models>
>> </soap:Body>
>> </soap:Envelope>
>> ==================== DESIRED RESPONSE ENDS====================
>>
>> Thanks in advance.
>> http://www.nabble.com/file/p24719842/cxf-request-response.txt
>> cxf-request-response.txt
>
> --
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
>
>
--
View this message in context:
http://www.nabble.com/Namespace-problem-in-webservice-response-tp24719842p24733054.html
Sent from the cxf-user mailing list archive at Nabble.com.