Hi

On Tue, May 3, 2011 at 3:07 PM, Clint Dovholuk <[email protected]> wrote:
> Hi All,
>
>
>
> Preface: If this has been addressed in the past I'm sorry...
>
> I really did scour the internet but my search foo was apparently insufficient.
>
>
>
> I am having a problem where the namespace of the service and all types in the 
> service are getting translated from the expected namespace to xmlns="".  I 
> created a silly contrived example (which I could provide schema, mvn pom 
> usage etc if need be) but basically I have:
>
> Class/Method:
>
>    @WebService(targetNamespace = "http://testing-cxf-and-jaxws";)
>
>    public class FoodSoapService
>
>    {
>
>      public AbstractFood testing(@WebParam(name = "input") AbstractFood input)
>
>      {
>
>        return input;
>
>      }
>
>    }
>
>
>
> Produces:
>
>    <soap:Body>
>
>      <testing xmlns="http://test/";>
>
>        <input xmlns:q1="http://testing-cxf-and-jaxws"; xsi:type="q1:Meat" 
> xmlns="">
>
>          <animal />
>
>        </input>
>
>      </testing>
>
>    </soap:Body>
>
>
>
> See how the testing tag has the 'proper' namespace but the input tag has 
> switched over to xmlns=""?
>
>

I think you need to make sure a schema representing the 'testing'
element has an elementFormDefault attribute set 'qualified'.
Otherwise, xmlns="" trick is used to enforce that child elements with
namespaces are not qualified

Cheers, Sergey

>
> I am sure this is a totally simple issue but boy - I just cannot figure out 
> what I've done wrong. Any pointers or thoughts would be much appreciated.
>
>
>
> -Clint
>
>
>
> More Details:
>
> We start with a schema, generate domain artifacts via JAXB, the JAXB 
> artifacts are in the 'proper' namespace ala: @XmlType(name = "AbstractFood", 
> namespace = "http://testing-cxf-and-jaxws";)
>
>



-- 
Sergey Beryozkin

Application Integration Division of Talend
http://sberyozkin.blogspot.com

Reply via email to