You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by rjack2 <rj...@gmail.com> on 2008/08/25 23:51:17 UTC
File Name wiht NLS Special Characters
Folks,
I'm trying to run the Jax-ws APT ant task on file with a NLS name:
S_BASIC_ÃÑÑÖÏÑG_Bean.java
Apt seems to have difficulty processing this file. Has anyone encountered
this problem? It didn't seem to have any problem compiling it.
I tried it though ANT and via command line.
Here is the ant task:
<ws_apt
destdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P306"
verbose="false"
sourcedestdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P306"
sourcepath="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\"
debug="true" target="1.5">
<classpath>
<path path="......"/>
</classpath>
<source
dir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\">
<include name="c2s\S_BASIC_ÃÑÑÖÏÑG_Bean.java"/>
</source>
</ws_apt>
Here is the error I'm getting:
C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\c2s\S_BASIC_├╤╤╓╧╤G_Bean.java:21:
Classes annotated with @javax.jws.WebService must have a public default
constructor. Class: c2s.S_BASIC_├â├
[ws_apt] public class S_BASIC_├â├æ├æ├û├?├æG_Bean
Regards,
Robert Jackson
--
View this message in context: http://www.nabble.com/File-Name-wiht--NLS-Special-Characters-tp19152318p19152318.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by rjack2 <rj...@gmail.com>.
Folks,
I didn't realize Ant had an apt task. I will try to use it.
If anyone has any examples of using the Ant apt task for web services, that
would be great.
Robert Jackson
Steve Loughran wrote:
>
> Stefan Bodewig wrote:
>> On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
>>
>>> Folks,
>>>
>>> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>>>
>>> S_BASIC_ÃÑÑÖÏÑG_Bean.java
>>
>> I don't think you are asking on the correct list. There may be people
>> on the user list who use the same task (I don't even know it) and can
>> help.
>>
>> Since I don't know how the task is implemented, I can only guess. If
>> you run Ant in verbose mode, does it give you any hint on how it
>> invokes apt? Does it use a command line or does it invoke it via a
>> Java API inside the Ant process? If the former is used, does the same
>> command line work if you use it outside of Ant?
>>
>
> The apt code in Ant uses javac style infocation; I don't know what the
> jax-ws APT task is, what it does, or who wrote it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/File-Name-wiht--NLS-Special-Characters-tp19152318p19270582.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by Steve Loughran <st...@apache.org>.
Stefan Bodewig wrote:
> On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
>
>> Folks,
>>
>> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>>
>> S_BASIC_ÃÑÑÖÏÑG_Bean.java
>
> I don't think you are asking on the correct list. There may be people
> on the user list who use the same task (I don't even know it) and can
> help.
>
> Since I don't know how the task is implemented, I can only guess. If
> you run Ant in verbose mode, does it give you any hint on how it
> invokes apt? Does it use a command line or does it invoke it via a
> Java API inside the Ant process? If the former is used, does the same
> command line work if you use it outside of Ant?
>
The apt code in Ant uses javac style infocation; I don't know what the
jax-ws APT task is, what it does, or who wrote it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 5 Sep 2008, <rj...@gmail.com> wrote:
> Folks,
>
> After Stefan pointed out that Ant has it's own Apt task
That's been Steve Loughran, not me.
> I seem to have this working.
Great!
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by rjack2 <rj...@gmail.com>.
Folks,
After Stefan pointed out that Ant has it's own Apt task I seem to have this
working. I've created a target that includes the apt tasks below. I had to
break my "Beans" out individually because my web methods throws "Exception"
and the task can not seem to overwrite the generated Exception. Additionally
we use UTF-8 encoding for our source files.
<apt encoding="UTF-8" includes="c2s\S_VIEWS_NOIM_EX_ÃÑÑÖÏÑG_Bean.java"
target="1.5"
source="1.5"
srcdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\"
destdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P303">
<classpath>
<path refid="classpath.jaxws"></path>
<path refid="classpath.base"></path>
<pathelement
location="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\"></pathelement>
</classpath>
</apt>
<apt encoding="UTF-8" includes="c2s\S_VIEWS_IM_EX_ÃÑÑÖÏÑG_Bean.java"
target="1.5"
source="1.5"
srcdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\"
destdir="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P303">
<classpath>
<path refid="classpath.jaxws"></path>
<path refid="classpath.base"></path>
<pathelement
location="C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\"></pathelement>
</classpath>
</apt>
Thanks for your help and hopefully this may help others.
Robert Jackson
rjack2 wrote:
>
> This seems to be a problem because apt uses the command line interface to
> the OS. I wonder if there is a way to run the annotations using javac 1.6
> rather than apt.
>
> It looks like a part of the problem is the windows "codepage" apparently
> onl all of our
> machines are defaulted to 437.
>
> Wehn I run this code with the codepage changed to cp1252. It seems to
> work.
> Still now sure why I have to wrap it in a "for" loop.
>
> REM Change code page to 1252
> chcp 1252
>
> cd /d "C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\c2s"
>
>
> for /F "delims=" %%a in ('dir /b *_Bean.java') do (
> echo FileName=%%a
>
> C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P306\c2s\jaxws
> /q
> C:\jdk1.6.0.04\bin\apt.exe %%a -d .....
>
>
> rjack2 wrote:
>>
>>
>>
>> Stefan Bodewig wrote:
>>>
>>> On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
>>>
>>>> Folks,
>>>>
>>>> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>>>>
>>>> S_BASIC_ÃÑÑÖÏÑG_Bean.java
>>>
>>> I don't think you are asking on the correct list. There may be people
>>> on the user list who use the same task (I don't even know it) and can
>>> help.
>>>
>>> Since I don't know how the task is implemented, I can only guess. If
>>> you run Ant in verbose mode, does it give you any hint on how it
>>> invokes apt? Does it use a command line or does it invoke it via a
>>> Java API inside the Ant process? If the former is used, does the same
>>> command line work if you use it outside of Ant?
>>>
>>> Stefan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: dev-help@ant.apache.org
>>>
>>>
>>>
>>
>> Now that you mention it, that' probably the problem. Apt and Wsgen both
>> appear to use the command line. Dos seems to pass them back he wrong file
>> name unless I use something like S_*_Bean.java. Apt also seems to have
>> problems reading the NLS characters in the file name.
>>
>> Regards,
>>
>> Robert Jackson
>>
>>
>
>
--
View this message in context: http://www.nabble.com/File-Name-wiht--NLS-Special-Characters-tp19152318p19333329.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by rjack2 <rj...@gmail.com>.
This seems to be a problem because apt uses the command line interface to the
OS. I wonder if there is a way to run the annotations using javac 1.6
rather than apt.
It looks like a part of the problem is the windows "codepage" apparently
onl all of our
machines are defaulted to 437.
Wehn I run this code with the codepage changed to cp1252. It seems to work.
Still now sure why I have to wrap it in a "for" loop.
REM Change code page to 1252
chcp 1252
cd /d "C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\c2s"
for /F "delims=" %%a in ('dir /b *_Bean.java') do (
echo FileName=%%a
C:\downloads\data\CA\projects\gen_8_projects\COOP07ex.ief\java\classes\P306\c2s\jaxws
/q
C:\jdk1.6.0.04\bin\apt.exe %%a -d .....
rjack2 wrote:
>
>
>
> Stefan Bodewig wrote:
>>
>> On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
>>
>>> Folks,
>>>
>>> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>>>
>>> S_BASIC_ÃÑÑÖÏÑG_Bean.java
>>
>> I don't think you are asking on the correct list. There may be people
>> on the user list who use the same task (I don't even know it) and can
>> help.
>>
>> Since I don't know how the task is implemented, I can only guess. If
>> you run Ant in verbose mode, does it give you any hint on how it
>> invokes apt? Does it use a command line or does it invoke it via a
>> Java API inside the Ant process? If the former is used, does the same
>> command line work if you use it outside of Ant?
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>>
>
> Now that you mention it, that' probably the problem. Apt and Wsgen both
> appear to use the command line. Dos seems to pass them back he wrong file
> name unless I use something like S_*_Bean.java. Apt also seems to have
> problems reading the NLS characters in the file name.
>
> Regards,
>
> Robert Jackson
>
>
--
View this message in context: http://www.nabble.com/File-Name-wiht--NLS-Special-Characters-tp19152318p19202928.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by rjack2 <rj...@gmail.com>.
Stefan Bodewig wrote:
>
> On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
>
>> Folks,
>>
>> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>>
>> S_BASIC_ÃÑÑÖÏÑG_Bean.java
>
> I don't think you are asking on the correct list. There may be people
> on the user list who use the same task (I don't even know it) and can
> help.
>
> Since I don't know how the task is implemented, I can only guess. If
> you run Ant in verbose mode, does it give you any hint on how it
> invokes apt? Does it use a command line or does it invoke it via a
> Java API inside the Ant process? If the former is used, does the same
> command line work if you use it outside of Ant?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
Now that you mention it, that' probably the problem. Apt and Wsgen both
appear to use the command line. Dos seems to pass them back he wrong file
name unless I use something like S_*_Bean.java. Apt also seems to have
problems reading the NLS characters in the file name.
Regards,
Robert Jackson
--
View this message in context: http://www.nabble.com/File-Name-wiht--NLS-Special-Characters-tp19152318p19158562.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: File Name wiht NLS Special Characters
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 25 Aug 2008, <rj...@gmail.com> wrote:
> Folks,
>
> I'm trying to run the Jax-ws APT ant task on file with a NLS name:
>
> S_BASIC_ÃÑÑÖÏÑG_Bean.java
I don't think you are asking on the correct list. There may be people
on the user list who use the same task (I don't even know it) and can
help.
Since I don't know how the task is implemented, I can only guess. If
you run Ant in verbose mode, does it give you any hint on how it
invokes apt? Does it use a command line or does it invoke it via a
Java API inside the Ant process? If the former is used, does the same
command line work if you use it outside of Ant?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org