On Friday 29 February 2008, John-M Baker wrote:
> Sounds great.
>
> Should I be using the Axis2 java2wsdl generator, or CXF's version? I
> can't help feeling that I should let Axis2 generate it... And I
> couldn't get the java2wsdl task to work :) 

Well, if the map is in there, it either won't work or won't generate a 
usable wsdl.   CXF 2.0.4 java2wsdl stuff really is just JAX-WS+JAXB so 
you kind of have to deal with that.

The 2.1 snapshot stuff java2ws tool does have the ability to user the 
Aegis databinding which would support the Map (possibly).   

> Take a look: 
>
>     <java classname="org.apache.cxf.tools.java2wsdl.JavaToWSDL"
> fork="true">
>        <arg value="-o"/>
>        <arg value="${dist.dir}/Query.wsdl"/>
>        <arg value="com.db.websso.ws.service.Query"/>
>        <classpath>
>           <path refid="classpath.cxf"/>
>        </classpath>
>     </java>
>
> Anything look obviously wrong with that?

No.  You MAY need to add the path to the "classes" dir or jar or whatever 
where the class is found.   It looks like you just have the CXF path 
there.   Thus, it may not know where to look.

> As a matter of interest, are there ant tasks (I copied that example
> from the docs)?

Hmm..    The answer is "yes", but for some reason they aren't in the 
distribution at all.  (probably cause they aren't complete or 
documented, not really sure though)
http://people.apache.org/repo/m2-incubating-repository/org/apache/cxf/cxf-anttasks/2.0.4-incubator/
I'm also not sure how they are used.   Hmmm..........

Dan

>
>
>
> John Baker
> --
> Web SSO
> IT Infrastructure
> Deutsche Bank London
>
> URL:  http://websso.cto.gt.intranet.db.com
>
>
>
>
> Daniel Kulp <[EMAIL PROTECTED]>
> 29/02/2008 17:34
> Please respond to
> cxf-user@incubator.apache.org
>
>
> To
> cxf-user@incubator.apache.org
> cc
> John-M Baker/ext/[EMAIL PROTECTED]
> Subject
> Re: WSDLtoJava
>
> 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