I have been trying to add <client> element to the existing servicegen's
service ant task to generate client jar, so clients can access it
through default weblogic URL. In the service elmenent, the serviceURI
attributed is set to "". What I discovered, I cannot access <my
service>_client.jar file (OR any other file) through a browser because
weblogic instead of browsing/dowloding a filer, interprets the call as
web service call. If I set serviceURI to a non-blank name, everything
works fine.
How can I tweak Weblogic configuration to let me download files from a
URL or this form:
http://machinename:port/samplecontext_uri/mysample_client.jar
where serviceURI was set to "" ?
Thanks in advance,
Mike
Sir,
I apologize for saying this, but I don't really think you you want to
do that... Setting serviceURI to blank (or *) means that all url
requests will get sucked into the service (servlet)... jar-download
requests / service calls alike... But these things are best left
seperated.
Solutions:
1) as you've already figured out - choose a distinct serviceURI
(non-blank) for your service... Thumbs up from me!
2) put the jar-files under a different serviceURI context (entirely
different war-file deployment). Nja...
3) don't tweak weblogic - tweak the application! Your service must be
able to handle download requests of jar files... But then you'll find
yourself manually programming things which is normally serviced by the
server. And then there is the error handling... :) Fx. you need to set
"Contents-type" fields in the http header when returning the request...
I did this and a lot more once... It's OK.... when you have the time
and want something fancy.
I'm sure there are other skillfull people who can come up with more
brilliant ideas - but basicly I think you'll be better off in the long
run just using a non-blank serviceURI
I agree with your comments. The reason I did not set serviceURI was
because the services had been used in production by several clients; I
did not want the clients to use different URL end point.