On Dec 11, 2012, at 4:26 PM, Ted <[email protected]> wrote:

> I noticed it does that too, namely my issue is with https and it's
> significantly harder to get the initial contact point for the wsdl's
> over https so I end up openning both http and https and using http for
> the initial wsdl and https for the actual calls.
> 
> As far as I can tell there is a use for it though, it seems to
> re-validate the java stubs v.s. the wsdl and prints a warning if they
> are different. This can be useful so you know if your stubs and wsdl's
> are out of sync. I don't know if there's any other additional use for
> it or not though.


You can use the generated clients with CXF without the WSDL for many uses 
cases.  If you pass null into the Service constructor for the WSDL URL, it will 
kind of work.   You will need to specify the endpoint address you are trying to 
hit as a request parameter, but that's not a big deal.    The endpoint URL is 
not burned into the generated code at all. 

HOWEVER, there are several use cases that may require the WSDL.   The primary 
one is anything that uses WS-Policy statements in the WSDL (such as 
WS-SecurityPolicy).   Nothing related to any of the policies is generated into 
the code.   Thus, you need the WSDL (or other source of the policies).   
Additionally, some of the more complex transports (like JMS and CORBA) maybe a 
little more difficult without the WSDL.

If you are using an RPC/Literal endpoint that does strange things with 
namespaces and soapActions (don't remember the details), they may also not work 
properly without the WSDL.


Dan



> 
> On 12/11/12, Pampolini Matteo <[email protected]> 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...
>> 
>> 
> 
> 
> -- 
> Ted.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to