You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jason Pell <ja...@pellcorp.com> on 2012/03/21 03:53:45 UTC

Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

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?

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Daniel Kulp <dk...@apache.org>.
On Friday, March 23, 2012 12:57:07 PM Jason Pell 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.

LOL....  
    public Definition build() throws WSDLException {
        useSchemaImports = false;
        return build(null);
    }
    

yea.  You'd have to call the other build method with the map and likely 
process the map contents after word.

Dan


> 
> 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" <mc...@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
> >> dkulp@apache.org - http://dankulp.com/blog
> >> Talend Community Coder - http://coders.talend.com
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by stagirus <ma...@stagirus.com>.
This could be a solution to my problem, below.

We are using "Java first" approach with Spring and CXF. We use Aegis Data
Binding with Simple Front-end configured in Spring. We have several services
in our application. Each service WSDL generated at runtime has inlined
schema (data types) definitions. Each WSDL duplicates the schema
definitions. This is causing problems with ESB/BPEL tools.

We want CXF to generate a single shared schema file for all our services. I
am concerned the Jav2WSDL or Java2WS tools may not get the job done. These
tools need to be invoked for each service at a time. And the the WSDLs or
schema generated with these tools may not match with the dynamically
produced WSDLs.

This issue has been troubling for a long, long time. Could you please point
me in the right direction?   




--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-generated-WSDL-Can-I-force-XSD-s-to-be-imported-rather-than-Inlined-tp5581799p5721493.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by stagirus <ma...@stagirus.com>.
Dan:

Does this solution generate a combined/merged schema files across several
services? In my case, I am trying to generate schema files per java package
(namespace) that can be shared across various services. I just attempted
(wrote Java Code) to transform the inlined WSDLs into sharable schema
imports. Ran into problems with the namespaces and DOM API limitations to
manipulate namespaces.

Could you please advise if the latest CXF supports this feature?

Thanks
Mohan



--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-generated-WSDL-Can-I-force-XSD-s-to-be-imported-rather-than-Inlined-tp5581799p5722533.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, April 24, 2012 12:17:21 PM John Jones wrote:
> Was this issue addressed in 2.5.3?  I can see that a patch was submitted,
> but did it make the cut?  If it did, can you please describe how to force
> the import of schemas in a Code First service?  Is it annotation based,
> property based, etc?  Any information you could provide would be greatly
> appreciated.

Yep, it's in 2.5.3.     It's property based:

"org.apache.cxf.wsdl.create.imports", true

although that can be set via an annotation:

@EndpointProperty(
    key = "org.apache.cxf.wsdl.create.imports",
    value="true"),




Dan


> 
> Thanks,
> JJ
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Java-First-generated-WSDL-Can-I-force-XSD
> -s-to-be-imported-rather-than-Inlined-tp5581799p5663049.html Sent from the
> cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by John Jones <ja...@gmail.com>.
Was this issue addressed in 2.5.3?  I can see that a patch was submitted, but
did it make the cut?  If it did, can you please describe how to force the
import of schemas in a Code First service?  Is it annotation based, property
based, etc?  Any information you could provide would be greatly appreciated.

Thanks,
JJ

--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-generated-WSDL-Can-I-force-XSD-s-to-be-imported-rather-than-Inlined-tp5581799p5663049.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
I made a copy of the document before calling writeNode and all is well :-) ?????

I added code to the buildTypesWithSchemaImports method in
ServiceWSDLBuilder and this certainly resolves the issue.  I have
added a FIXME as I am still not sure why it fixes the issue.

Works well now, but I am not sure of the consequences of this action.
Anyway I will add this to the patch in jira as it does solve the
problem.  Perhaps a developer can suggest a better idea.

On Thu, Mar 29, 2012 at 6:50 PM, Jason Pell <ja...@pellcorp.com> wrote:
> Something strange is happening when outputting an XSD with a namespace
> embedded in
> an element.
>
> For example:
>
> <xsd:element xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
>                                                name="content" xmime:expectedContentTypes="application/octet-stream"
>                                                type="xsd:base64Binary" />
>
> When its output by using StaxUtils.writeNode(doc, writer, true);
>
> the xmlns:xmime="http://www.w3.org/2005/05/xmlmime" is omitted.  I can
> confirm this in test cases.
>
> What is interesting is that if I use StaxUtils.copy(doc, writer), the
> namespace remains.
>
> I can only reproduce this from the ServiceWSDLBuilder, if I save a XSD
> and read in directly I cannot see the problem.  So there must be
> something different about the Document I produce from the
> ServiceWSDLBuilder and that read from file system, I can't for the
> life of me work it out.  When I print the contents of the one built
> from ServiceWSDLBuilder using XMLUtils.generateXMLFile it looks
> exactly the same.
>
> Any ideas at all, or perhaps I need to provide more info.
>
> On Thu, Mar 29, 2012 at 1:14 PM, Jason Pell <ja...@pellcorp.com> wrote:
>> I have submitted a complete patch for review
>> (https://issues.apache.org/jira/browse/CXF-4196).
>>
>> Please take a look at it and let me know if I need to add anything /
>> change anything.
>>
>> I am hoping that can be included in 2.5.3
>>
>> Thanks
>> Jason

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
Something strange is happening when outputting an XSD with a namespace
embedded in
an element.

For example:

<xsd:element xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
						name="content" xmime:expectedContentTypes="application/octet-stream"
						type="xsd:base64Binary" />

When its output by using StaxUtils.writeNode(doc, writer, true);

the xmlns:xmime="http://www.w3.org/2005/05/xmlmime" is omitted.  I can
confirm this in test cases.

What is interesting is that if I use StaxUtils.copy(doc, writer), the
namespace remains.

I can only reproduce this from the ServiceWSDLBuilder, if I save a XSD
and read in directly I cannot see the problem.  So there must be
something different about the Document I produce from the
ServiceWSDLBuilder and that read from file system, I can't for the
life of me work it out.  When I print the contents of the one built
from ServiceWSDLBuilder using XMLUtils.generateXMLFile it looks
exactly the same.

Any ideas at all, or perhaps I need to provide more info.

On Thu, Mar 29, 2012 at 1:14 PM, Jason Pell <ja...@pellcorp.com> wrote:
> I have submitted a complete patch for review
> (https://issues.apache.org/jira/browse/CXF-4196).
>
> Please take a look at it and let me know if I need to add anything /
> change anything.
>
> I am hoping that can be included in 2.5.3
>
> Thanks
> Jason

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
I have submitted a complete patch for review
(https://issues.apache.org/jira/browse/CXF-4196).

Please take a look at it and let me know if I need to add anything /
change anything.

I am hoping that can be included in 2.5.3

Thanks
Jason

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>>>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>>>> Talend Community Coder - http://coders.talend.com
>>>>>>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>>> Talend Community Coder - http://coders.talend.com
>>>>>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>> Talend Community Coder - http://coders.talend.com
>>>>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>>>> dkulp@apache.org - http://dankulp.com/blog
>>>> Talend Community Coder - http://coders.talend.com
>>>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>>> dkulp@apache.org - http://dankulp.com/blog
>>> Talend Community Coder - http://coders.talend.com
>>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
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" <mc...@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
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Daniel Kulp <dk...@apache.org>.
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" <mc...@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
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Jason Pell <ja...@pellcorp.com>.
Not quite, I was talking about the ?wsdl that is generated by cxf
On Mar 21, 2012 2:24 PM, "Mark Streit" <mc...@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?
> >
>
>
> * **
> *
>

Re: Java First generated WSDL - Can I force XSD's to be imported rather than Inlined?

Posted by Mark Streit <mc...@gmail.com>.
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?
>


* **
*