You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mmansoor <ma...@gmail.com> on 2008/04/10 22:21:11 UTC

xmlns problem

My SOAP message has an object Foo, which has a body type as anyType. I am
using JAXB to generate that anyType body.

Now when i look at the Message that is being generated, there is one extra
tag as :

<ns4:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns6="http://my.a.b.c.com/v1" xmlns="" xsi:type="FooInner">

Any idea how can i remove this extra [xmlns=""] attribute ?.

Thanks
-- 
View this message in context: http://www.nabble.com/xmlns-problem-tp16617506p16617506.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: xmlns problem

Posted by mmansoor <ma...@gmail.com>.
yes, this was the problem, I was using Artix IDE to generate jar. As i was
not compiling from the "SOURCE" folder in my Java Project, it did not put
the package-info.java file in the jar, and hence getting this problem.

Thanks again.



dkulp wrote:
> 
> On Thursday 10 April 2008, mmansoor wrote:
>> My SOAP message has an object Foo, which has a body type as anyType. I
>> am using JAXB to generate that anyType body.
>>
>> Now when i look at the Message that is being generated, there is one
>> extra tag as :
>>
>> <ns4:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ns6="http://my.a.b.c.com/v1" xmlns="" xsi:type="FooInner">
>>
>> Any idea how can i remove this extra [xmlns=""] attribute ?.
>>
>> Thanks
> 
> I'd probably need to see the entire xml message as well as the objects 
> themselves, but usually jaxb only generates that xmlns="" thing when it 
> really should be there.   For example, are you Foo.java and FooInner 
> objects in the same package?  Is there a package-info.java for the 
> FooInner type that specifies elementFormDefault=QUALIFED?
> 
> -- 
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/xmlns-problem-tp16617506p16678513.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: xmlns problem

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 10 April 2008, mmansoor wrote:
> My SOAP message has an object Foo, which has a body type as anyType. I
> am using JAXB to generate that anyType body.
>
> Now when i look at the Message that is being generated, there is one
> extra tag as :
>
> <ns4:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ns6="http://my.a.b.c.com/v1" xmlns="" xsi:type="FooInner">
>
> Any idea how can i remove this extra [xmlns=""] attribute ?.
>
> Thanks

I'd probably need to see the entire xml message as well as the objects 
themselves, but usually jaxb only generates that xmlns="" thing when it 
really should be there.   For example, are you Foo.java and FooInner 
objects in the same package?  Is there a package-info.java for the 
FooInner type that specifies elementFormDefault=QUALIFED?

-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog