You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ryan Moquin <fr...@gmail.com> on 2007/09/10 16:09:54 UTC

Referencing an external XSD not referenced in WSDL

I'm trying to generate some Java code for a WSDL that is paired with an XSD
with the CXF with WSDL2Java, but doesn't actually reference the XSD from it
(such as with an include).  This isn't my wsdl but one for a service that
I'm trying to access, and I don't have control of the WSDL to change it.
How can I generate the java code for the WSDL along with the XSD?  Do I have
to generate the XSD separately?  How is that recommended to do?

Thanks!

Re: Referencing an external XSD not referenced in WSDL

Posted by James Mao <ja...@iona.com>.
You can use CXF xsd2java maven plugin, or just use the JAXB xjc tools 
directly

James

> I'm trying to generate some Java code for a WSDL that is paired with an XSD
> with the CXF with WSDL2Java, but doesn't actually reference the XSD from it
> (such as with an include).  This isn't my wsdl but one for a service that
> I'm trying to access, and I don't have control of the WSDL to change it.
> How can I generate the java code for the WSDL along with the XSD?  Do I have
> to generate the XSD separately?  How is that recommended to do?
>
> Thanks!
>
>   

Re: Referencing an external XSD not referenced in WSDL

Posted by Ryan Moquin <fr...@gmail.com>.
Yes, the issue I encountered is due to the fact the wsdl is invalid because
it uses an XSD that isn't referenced from it.  The problem is, I'm not in
control of the wsdl so there isn't anything I can do about it, except find a
way to call it just like others are doing successfully, but in a .net
environment which obviously I'm not using.

I can get everything generated now, I just have the other mysterious problem
now that I've been posting about (along with a test wsdl that illustrates
the problem).  I really hope I'm making a mistake somewhere since I really
need to find a way to be able to call this service or I'm sunk :)  I
couldn't get the original XFire to make it through the wsdl2java no matter
what I did, so my hopes are up with CXF right now.

On 9/10/07, James Mao <ja...@iona.com> wrote:
>
> But the wsdl is still invalid, isn't it?
> Can you pass the wsdl2java now?
>
> Regards,
> James
>
> > Never mind, I managed to finally turn something up in my google search
> which
> > is to use the cxf-common-xsd plugin to do it.
> >
> > On 9/10/07, Ryan Moquin <fr...@gmail.com> wrote:
> >
> >> I'm trying to generate some Java code for a WSDL that is paired with an
> >> XSD with the CXF with WSDL2Java, but doesn't actually reference the XSD
> from
> >> it (such as with an include).  This isn't my wsdl but one for a service
> that
> >> I'm trying to access, and I don't have control of the WSDL to change
> it.
> >> How can I generate the java code for the WSDL along with the XSD?  Do I
> have
> >> to generate the XSD separately?  How is that recommended to do?
> >>
> >> Thanks!
> >>
> >>
> >
> >
>

Re: Referencing an external XSD not referenced in WSDL

Posted by James Mao <ja...@iona.com>.
But the wsdl is still invalid, isn't it?
Can you pass the wsdl2java now?

Regards,
James

> Never mind, I managed to finally turn something up in my google search which
> is to use the cxf-common-xsd plugin to do it.
>
> On 9/10/07, Ryan Moquin <fr...@gmail.com> wrote:
>   
>> I'm trying to generate some Java code for a WSDL that is paired with an
>> XSD with the CXF with WSDL2Java, but doesn't actually reference the XSD from
>> it (such as with an include).  This isn't my wsdl but one for a service that
>> I'm trying to access, and I don't have control of the WSDL to change it.
>> How can I generate the java code for the WSDL along with the XSD?  Do I have
>> to generate the XSD separately?  How is that recommended to do?
>>
>> Thanks!
>>
>>     
>
>   

Re: Referencing an external XSD not referenced in WSDL

Posted by Ryan Moquin <fr...@gmail.com>.
Never mind, I managed to finally turn something up in my google search which
is to use the cxf-common-xsd plugin to do it.

On 9/10/07, Ryan Moquin <fr...@gmail.com> wrote:
>
> I'm trying to generate some Java code for a WSDL that is paired with an
> XSD with the CXF with WSDL2Java, but doesn't actually reference the XSD from
> it (such as with an include).  This isn't my wsdl but one for a service that
> I'm trying to access, and I don't have control of the WSDL to change it.
> How can I generate the java code for the WSDL along with the XSD?  Do I have
> to generate the XSD separately?  How is that recommended to do?
>
> Thanks!
>