I am working on a patch against: https://issues.apache.org/jira/browse/CXF-4196
It was a lot messier than I first thought, but I might be able to simplify it some from what I have initially come up with. On Fri, Mar 23, 2012 at 3:00 PM, Jason Pell <ja...@pellcorp.com> wrote: > Can I just write the Contents of the Schema Document element on a > ?xsd= request? This information is stored. WOuld that be a bad > approach? > > On Fri, Mar 23, 2012 at 2:58 PM, Jason Pell <ja...@pellcorp.com> wrote: >> Hi, >> >> This did not work either as the XSD's are not registered for download. >> I refactored the ServiceWSDLBuilder to add SchemaImport's to the >> Schema just like is done for the default (non xsd import case), >> however the XSD's are still not properly registered. The code is >> using the OASISCatalog but I cannot see how XSD's are being >> registered. This code is all new to me, so may take some more head >> scratching before I can work it out :-) >> >> On Fri, Mar 23, 2012 at 1:09 PM, Jason Pell <ja...@pellcorp.com> wrote: >>> I take it back, I just need to call the build method with a map! >>> >>> On Fri, Mar 23, 2012 at 1:04 PM, Jason Pell <ja...@pellcorp.com> wrote: >>>> I am still going to look at what exactly I might have to do to enhance >>>> ServiceWSDLBuilder to support this use case. >>>> >>>> >>>> >>>> On Fri, Mar 23, 2012 at 12:57 PM, Jason Pell <ja...@pellcorp.com> wrote: >>>>> Seems its not so easy :-) The build() method ignores the flag, the >>>>> comment: >>>>> >>>>> Create the WSDL Definition object and return it. This function will never >>>>> create >>>>> * imports to schemas. >>>>> >>>>> >>>>> On Fri, Mar 23, 2012 at 10:56 AM, Jason Pell <ja...@pellcorp.com> wrote: >>>>>> I will take a look and submit a patch if I come up with anything. I >>>>>> am assuming the best way is via a jira and patchset? >>>>>> >>>>>> On Thu, Mar 22, 2012 at 12:47 AM, Daniel Kulp <dk...@apache.org> wrote: >>>>>>> On Wednesday, March 21, 2012 02:58:21 PM Jason Pell wrote: >>>>>>>> Not quite, I was talking about the ?wsdl that is generated by cxf >>>>>>> >>>>>>> There currently isn't a way to do it. All the code is there (the - >>>>>>> createxsdimports flag on the tools uses it) but no way to specify a >>>>>>> property >>>>>>> or anything to trigger it. >>>>>>> >>>>>>> It's likely not hard to do. On line 174 of WSDLGetUtils, the >>>>>>> ServiceWSDLBuilder is created. You may just be able to call: >>>>>>> >>>>>>> builder.setUseSchemaImports( >>>>>>> MessageUtils >>>>>>> .getContextualBoolean(message, >>>>>>> "org.apache.cxf.wsdl.create.imports", false)); >>>>>>> >>>>>>> or similar. Definitely give that some tests to check. >>>>>>> >>>>>>> >>>>>>> A patch would be welcome. :-) >>>>>>> >>>>>>> Dan >>>>>>> >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> On Mar 21, 2012 2:24 PM, "Mark Streit" <mcs...@gmail.com> wrote: >>>>>>>> > I have used the following Ant target definition in our build.xml >>>>>>>> > files >>>>>>>> > and we get the XSDs imported into the WSDL that is created... the key >>>>>>>> > argument would be this one: <arg value="-createxsdimports" /> shown >>>>>>>> > down below...> >>>>>>>> > <!-- JAX-WS task definitions for CXF --> >>>>>>>> > <target name="cxfJavaToWS" depends="compile-server"> >>>>>>>> > >>>>>>>> > <java classname="org.apache.cxf.tools.java2ws.JavaToWS" >>>>>>>> > fork="true"> >>>>>>>> > >>>>>>>> > <arg value="-wsdl" /> >>>>>>>> > <arg value="-o" /> >>>>>>>> > <arg value="${wsdl.filename}" /> >>>>>>>> > <arg value="-d" /> >>>>>>>> > <arg value="${webinf.wsdl.dir}" /> >>>>>>>> > >>>>>>>> > <arg value="-wrapperbean" /> >>>>>>>> > <arg value="-verbose" /> >>>>>>>> > <arg value="-s" /> >>>>>>>> > <arg value="${src}" /> >>>>>>>> > >>>>>>>> > <arg value="-beans" /> >>>>>>>> > <arg value="${webinf.dir}/cxf-beans.xml" /> >>>>>>>> > >>>>>>>> > <arg value="-portname"/> >>>>>>>> > <arg value="${ws.portName}" /> >>>>>>>> > >>>>>>>> > * >>>>>>>> > >>>>>>>> > <arg value="-createxsdimports" />* >>>>>>>> > <arg value="${ws.pkg}.${ws.sib}" /> >>>>>>>> > <classpath> >>>>>>>> > >>>>>>>> > <path refid="cxf.classpath" /> >>>>>>>> > <path refid="project.classpath" /> >>>>>>>> > >>>>>>>> > </classpath> >>>>>>>> > >>>>>>>> > </java> >>>>>>>> > >>>>>>>> > </target> >>>>>>>> > >>>>>>>> > If you are using command line tools, it's also covered here: >>>>>>>> > http://cxf.apache.org/docs/java-to-ws.html >>>>>>>> > >>>>>>>> > Not sure if this is what you're looking for... >>>>>>>> > >>>>>>>> > Mark >>>>>>>> > >>>>>>>> > On Tue, Mar 20, 2012 at 10:53 PM, Jason Pell <ja...@pellcorp.com> >>>>>>>> > wrote: >>>>>>>> > > I thought this used to work that way, now it looks as if all XSD's >>>>>>>> > > are >>>>>>>> > > inlined. It creates an interesting situation for me when I have >>>>>>>> > > multiple namespaces. I get <xsd:import without a schemaLocation >>>>>>>> > > which >>>>>>>> > > causes problems for some older clients trying to import the wsdl. >>>>>>>> > > >>>>>>>> > > Are there configuration parameters I can use? >>>>>>>> > >>>>>>>> > * ** >>>>>>>> > * >>>>>>> -- >>>>>>> Daniel Kulp >>>>>>> dk...@apache.org - http://dankulp.com/blog >>>>>>> Talend Community Coder - http://coders.talend.com >>>>>>>