On Friday 29 February 2008, John-M Baker wrote:
> Yep, I agree. Or rather, Axis2's java2wsdl has helpfully put that
> namespace in the file. The -p option obviously resolved it for me. I
> assume Axis2 is behaving correctly by generating this WSDL given
> returning a Map must be a fairly common feature, yet 'claiming' that
> namespace seems to be a 'bad thing'?
>
>
> John Baker

Actually, passing a Map is actually not a common thing to do with 
JAX-WS/JAXB as it's a non-trivial thing to do with JAXB.  

Actually, looking at your WSDL, Axis2 isn't doing it correctly either.  
If you look at the schema:

            <xs:complexType name="Map">
                <xs:sequence>
                    <xs:element minOccurs="0"
                        name="empty" 
                        type="xs:boolean"/>
                </xs:sequence>
            </xs:complexType>

That sure doesn't describe a usefule map to me.    On the wire, it will 
just say if it's empty or not.   Not too useful.

Anyway, with CXF 2.1 snapshots (our trunk) you can pass maps.  However, 
you have to defines some JAXB types that completely model the schema 
that you want and then an adapter to convert the Map to/from those 
types.   Maps are not "automatic".     The latest snapshots have a 
sample (java_first_jaxws) that show this in action.


-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to