cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mao <james....@iona.com>
Subject Re: URL in Client stub
Date Tue, 27 Mar 2007 02:08:27 GMT

> If a WSDL location is always passed in, then why is there a default?

It's defined in JAX-WS spec Section 2.7

"The JAX-WS 2.0 mandates that two constructors be present on every 
generated service class"
That's why there is a default one.
>
> I disagree with a subsequent statement, to the effect that you 
> generated the code, therefore, you know where the WSDL resides.  That 
> is usually NOT the case for the kinds of applications *I* write, 
> unless I am writing a hello-world-like demo program, which of course 
> is not a realistic example.
>
> I agree with Dan, at a minimum, that a stacktrace to stderr is 
> misleading, at best, and should be removed.

I agree,  so i suggested that we print some useful info to user, instead 
of  meaningless stacktrace.

>
> I'd go one step further and say that i) hard-coded paths should not go 
> into generated code, and ii) this URL should not get a default -- 
> failing to present a value when it's expected should be treated as an 
> error condition.

I don't see any harm of generating hard-code path in the generated code, 
it's just a skeleton, a sample code, it's generated for user to modify, 
to enhance, to meet their needs in the deploy time.
You can not assume that the generated code can meet all your needs 
without any modification to deploy.
I think to change the location of your wsdl in a few places is ok.
What we can do is like DanK said, add another argument for user to 
specify the wsdlLocation, but too many arguments sometime also annoying  
to users.

James.
>
> By relying on a default like this, you may end up i) giving yourself a 
> false sense of confidence that you've dotted your i's and crossed your 
> t's, because an application works in a specific scenario, and ii) 
> making it really hard to diagnose a bug, because you don't know where 
> a WSDL contract is getting loaded from.
>
> -Fred
>
> On Mar 26, 2007, at 2:46 AM, Liu, Jervis wrote:
>
>> this exception is safely to be ignored as the real WSDL_LOCATION is 
>> always passed into Service from client code to overload the original URL
>
>


Mime
View raw message