The CXF wsdl2java does support the jaxb binding files as well (-b flag).  
However, the -b things must be actual jaxb/jaxws binding files, not 
another schema.   That's very strange syntax that I haven't seen before.  
Interesting.   

Thus, to get it working for CXF, you would need to modify the schema to 
put the proper <s:import> in place to import the schema schema, then 
include the binding file to deal with the duplicate classes.

Alternatively, use the workround on that blog with wsgen to generated the 
code, then use CXF at runtime.   It's just straight JAX-WS code so it 
should work.

However, both those approaches generate a full object model for the 
schema, which may not be desired.   The simplest option might be to just 
download the wsdl, modify the schema to change:
 <s:sequence>
    <s:element ref="s:schema" />
    <s:any />
 </s:sequence>

to something like:
 <s:sequence>
    <s:any minOccurs="2"/>
 </s:sequence>
or something.  That will allow you to get it as a DOM.

Dan



On Tuesday 08 April 2008, Tim Perrett wrote:
> Thats what I have traced the problem too also - after some googling it
> seems that this is a known issue with M$ SOAP services.
> I found this link:
>
> http://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.
>html
>
> Thats obviously for wsimport, but I thought a similar solution might
> work for CXF? What are your thoughts? Other services written in .net
> consume no problem at all with CXF, its just this one im having
> problems with.
>
> I could always ditch the service methods that are causing the problem?
> I think they might be MS datasets exposed as SOAP - I've used this
> service before and it hasnt been a huge problem before as the
> wsdl2<lang> has usually just ignored them I think.
>
> Cheers
>
> Tim
>
> On 8 Apr 2008, at 17:00, Benson Margulies wrote:
> > This error emerges from the bowels of JAXB's xjc tool, complete with
> > the
> > lack of navigational info.
> >
> > However,
> >
> > What is
> >
> >             <s:complexType>
> >               <s:sequence>
> >                 <s:element ref="s:schema" />
> >                 <s:any />
> >               </s:sequence>
> >             </s:complexType>
> >
> >
> > supposed to mean?
> >
> > I see no element named 'schema' .



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

Reply via email to