You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by zmelnick <za...@nitorgroup.com> on 2013/05/30 18:55:01 UTC

wsdlRoot and relative claspath

Hi!

I'm trying to get cxf's codegen plugin to build wsdls from a root wsdl
directory. This works great! However, I'd like the client code to reference
a relative classpath rather than an absolute one.

It appears that this can be done when using something like
<wsdlLocation>classpath:wsdl/foo.wsdl</wsdlLocation>. However, using the
classpath reference in wsdlRoot does not seem to work.

This is my configuration:

 <configuration>
    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
    <wsdlRoot>classpath:wsdl/</wsdlRoot>
    <includes>
     <include>**/*.wsdl</include>
    </includes>
</configuration>


Replacing ${basedir}/src/main/resources in the wsdlRoot works fine, as does
just removing that field. Is there a way to get a relative path when using
the wsdlRoot options?



--
View this message in context: http://cxf.547215.n5.nabble.com/wsdlRoot-and-relative-claspath-tp5728544.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: wsdlRoot and relative claspath

Posted by zmelnick <za...@nitorgroup.com>.
Thanks for the reply Daniel. So the only way to get a relative path for the
client is to use the wsdlLocation method instead of the wsdlRoot?

Is there anything I should do to make this feature request a formal one?
The current behavior prohibits me from building on one machine, and
deploying on another while taking advantage of the wsdlRoot batch
processing.


On Thu, May 30, 2013 at 7:06 PM, Daniel Kulp [via CXF] <
ml-node+s547215n5728559h16@n5.nabble.com> wrote:

>
> On May 30, 2013, at 12:55 PM, zmelnick <[hidden email]<http://user/SendEmail.jtp?type=node&node=5728559&i=0>>
> wrote:
>
> > Hi!
> >
> > I'm trying to get cxf's codegen plugin to build wsdls from a root wsdl
> > directory. This works great! However, I'd like the client code to
> reference
> > a relative classpath rather than an absolute one.
> >
> > It appears that this can be done when using something like
> > <wsdlLocation>classpath:wsdl/foo.wsdl</wsdlLocation>. However, using the
> > classpath reference in wsdlRoot does not seem to work.
> >
> > This is my configuration:
> >
> > <configuration>
> >    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
> >    <wsdlRoot>classpath:wsdl/</wsdlRoot>
> >    <includes>
> >     <include>**/*.wsdl</include>
> >    </includes>
> > </configuration>
> >
> >
> > Replacing ${basedir}/src/main/resources in the wsdlRoot works fine, as
> does
> > just removing that field. Is there a way to get a relative path when
> using
> > the wsdlRoot options?
>
> Not at this time, no.   Good suggestion though.
>
> If you add a file next to each wsdl called:
> foo.wsdl-options
>
> that would have a single line like
> -wsdlLocation classpath:wsdl/foo.wsdl
>
> you could get "close", but that's still a bit of extra work.
>
>
> --
> Daniel Kulp
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5728559&i=1> -
> http://dankulp.com/blog
>
> Talend Community Coder - http://coders.talend.com
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/wsdlRoot-and-relative-claspath-tp5728544p5728559.html
>  To unsubscribe from wsdlRoot and relative claspath, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5728544&code=emFjaGFyeS5tZWxuaWNrQG5pdG9yZ3JvdXAuY29tfDU3Mjg1NDR8OTM2MzU0ODkx>
> .
> NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Zach Melnick




--
View this message in context: http://cxf.547215.n5.nabble.com/wsdlRoot-and-relative-claspath-tp5728544p5728561.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: wsdlRoot and relative claspath

Posted by Daniel Kulp <dk...@apache.org>.
On May 30, 2013, at 12:55 PM, zmelnick <za...@nitorgroup.com> wrote:

> Hi!
> 
> I'm trying to get cxf's codegen plugin to build wsdls from a root wsdl
> directory. This works great! However, I'd like the client code to reference
> a relative classpath rather than an absolute one.
> 
> It appears that this can be done when using something like
> <wsdlLocation>classpath:wsdl/foo.wsdl</wsdlLocation>. However, using the
> classpath reference in wsdlRoot does not seem to work.
> 
> This is my configuration:
> 
> <configuration>
>    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
>    <wsdlRoot>classpath:wsdl/</wsdlRoot>
>    <includes>
>     <include>**/*.wsdl</include>
>    </includes>
> </configuration>
> 
> 
> Replacing ${basedir}/src/main/resources in the wsdlRoot works fine, as does
> just removing that field. Is there a way to get a relative path when using
> the wsdlRoot options?

Not at this time, no.   Good suggestion though. 

If you add a file next to each wsdl called:
foo.wsdl-options

that would have a single line like 
-wsdlLocation classpath:wsdl/foo.wsdl

you could get "close", but that's still a bit of extra work.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com