Hi,
That's because your auto-generated code has something like
@WebServiceClient(name = "...",
wsdlLocation = "http://...",
targetNamespace = "…")
so that CXF runtime will try to build service model from the
wsdlLocation="http://", that's why need access remote wsdl.
You can
1. replace all wsdlLocation with local file, or just remove wsdlLocation
or
2. when you originally generate the code from wsdl, download remote wsdl to
local and use local wsdl directly, then your auto-generated wsdlLocation is
local file
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋
On 2012-12-11, at 下午6:22, Pampolini Matteo wrote:
> Hello there,
>
> my name is Matteo and I'm writing from Italy.
>
> I'm new to Apache CXF, so please excuse me if this first question can appear
> silly, I searched the Web
> for an answer without success.
>
> I'm testing CXF with ONVIF web services, so I simply invoked wsdl2java with
> the main ONVIF WSDL file,
> say http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl and I was
> able to generate all
> java classes.
>
> Now I'm trying to use the service, starting from java_first_spring_support I
> modified what's needed
> and I was able to compile. However, when I start the service I get an
> IOException just after
>
> INFO: Creating Service {$service.Namespace}$service.ServiceName from WSDL:
> http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
>
> and that's OK because I'm behind a proxy.
>
> What I don't understand is why CXF needs to retrieve the remote WSDL, if all
> the code was already generated. Please
> also note that the above file refer to many others, so even if I decide to
> download it and include it into the WAR
> file, I should manually download all the dependencies... or am I missing
> anything?
>
> Just as a comparison, the same done natively with gSOAP does not show this
> issue, once the code was generated
> everything is auto-consistent.
>
> Any help is very appreciated, many thanks in advance,
>
> Matteo
>
> --
> Write once, compile everywhere
> Compile once, run somewhere...
>