This has some roots in the support for the WSI-Basic Profile.  The WSI-BP
 SPECIFICALLY disallows non-qualified elements as direct children of the 
soap:body.   See:
http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16462544
 

Thus, if CXF encounters schemas that don't have a target namespace
that is used for direct children of the body, it adds the namespace of the 
service.

My suggestion is to set a targetNamespace for the schema and change to
elementFormDefault="unqualified".  In that way, just the "root" elements 
would be qualified in both cases and can meet the requirements of the WSI-BP.

Dan


On Wed June 24 2009 3:51:22 pm Eric Hodges wrote:
> dkulp wrote:
> > Any chance you can capture the two soap messages (soap and rest) as well
> > as
> > attach the schema? (and/or the wsdl for the soap service)   That MAY be
> > able
> > to help diagnose why.
>
> I'd rather not post the full thing here.  Each message has an element named
> "Site".  Each uses the same XSD document.  I import it into the WSDL like
> this:
>
> <wsdl:types>
>       <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>               <xsd:import namespace='' schemaLocation="batchTrigger.xsd">
>               </xsd:import>
>       </xsd:schema>
> </wsdl:types>
>
> Inside the XSD, the element and attribute form defaults are this:
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
>       elementFormDefault="qualified" attributeFormDefault="unqualified">

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to