You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Simon Guest <sg...@microsoft.com> on 2005/07/15 19:31:34 UTC

[Axis2] NullPointerException

I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0
CTP.  When I try to run WSDL2Java in the Axis 2 installation, I get the
following exception:

 

C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl

Exception in thread "main" java.lang.NullPointerException

        at
org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf

iguration.java:79)

        at
org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf

iguration.java:72)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:61)

        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)

        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)

 

This problem doesn't seem related to the WSDL (I tried with one in the
Axis 2 samples directory).  I've also tried this on both JDK 1.4.2 and
1.5 - same issue.

 

Any ideas?

 

Thanks,

-Simon


Re: Acess C# web service from Java client and Vise versa.

Posted by Mahen Perera <ma...@gmail.com>.
Hi Kumara,,
 well these are the steps....
 Say u want a java client and C# service...
 1) get a Sample WSDL from somewhere... 
2) use the wsdl.exe tool by Microsoft to generate the server side interface 
which is in C#
3) deploy the Web Service in IIS
4) use the WSDL2Java tool by AXIS to generate the client stubs... 
5) now invoke the stubs by writing some code..
 PS : make sure to change the service location in the generated client side 
code to map to the location where the service is actually deplyed in the IIS 
Server..
 if its a C# client and Java Service,... then also prety much the same 
thing.. as in u will have to use the same tools if ur starting from the WSDL 
:) ... u have to set the correct options to the wsdl.exe tool to generate 
the client side code this time...
 Cheers
Mahen

 On 7/18/05, md kumara lal <ar...@yahoo.com> wrote: 
> 
> Hi,
> 
> I am developing a Bench mark Tool for my final year Undergraduate 
> project.While I doing it is required to acess C# web service from Java 
> client and Vise versa.So If you have any idea let me know howto do that.It<http://that.it/>is better you can explain me that with necessary examples.
> 
> Kind Regards
> 
> Madushan Thilina.
> 
>  __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>

Re: [Axis2] NullPointerException

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
I have a doubt on the way how content type's were handled in WSE3.0 CTP. 
I did it for Axis 2 according to the following RFC........
http://www.ietf.org/rfc/rfc2111.txt 
 It says how to convert a URL to a content-id...
Pls have a look on it..
 Thanks & Regards,
~Thilina
 PS: I've put more info in http://www.bloglines.com/blog/Thilina?id=11
   On 7/17/05, Thilina Gunarathne <cs...@gmail.com> wrote: 
> 
> Hi Dims,
> I got a update on Friday and it seeemed MTOM is not working. So I did some 
> fixes. I doubt whether we both will overlap the things.
> SVN is down :(. No way of checking the things u did.
> Can u pls specify the things u did....
>  Regards,
> ~Thilina
>  
>  On 7/16/05, Davanum Srinivas <da...@gmail.com> wrote: 
> > 
> > Simon,
> > 
> > I got this working just yesterday. You will need to compile Axis2 from
> > latest SVN.
> > 
> > Have u set up the hands on lab sample?
> > http://www.microsoft.com/downloads/details.aspx?familyid=0E5491C1-8BDE-4FFF-88C4-8E3DC102FAD6&displaylang=en 
> > 
> > 
> > If you did, i have an example that works with Part3\after sample.
> > 
> > Step #1: Basically start with adding another method in
> > CS\Part3\after\StockServiceLibrary\StockService.cs
> > 
> > [WebMethod]
> > public byte[] echoAttachment(byte[] bytes) {
> > return bytes;
> > }
> > 
> > Step #2: Run .NET's wsdl.exe (NOT wsewsdl3.exe) against the dynamic
> > wsdl, add a main and test the method.
> > 
> > public static void Main(string[] args) {
> > StockService service = new StockService();
> > byte[] bytes = null;
> > service.RequireMtom = true;
> > using (FileStream fs = new FileStream(" gears.gif",
> > FileMode.Open, FileAccess.Read, FileShare.Read))
> > {
> > byte[] buffer = new byte[fs.Length];
> > fs.Read(buffer, 0, (int)fs.Length);
> > bytes = service.echoAttachment (buffer);
> > }
> > }
> > 
> > Step #3: compile the attached java code and run it.
> > 
> > Thanks,
> > dims
> > 
> > PS: check my blogs for 2 lists of bugs in WSE 3.0 CTP
> > (http://blogs.cocoondev.org/dims/ )
> > 
> > On 7/15/05, Simon Guest <sg...@microsoft.com> wrote:
> > >
> > >
> > >
> > > I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0CTP.
> > > When I try to run WSDL2Java in the Axis 2 installation, I get the 
> > following
> > > exception:
> > >
> > >
> > >
> > > C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl
> > >
> > > Exception in thread "main" java.lang.NullPointerException
> > >
> > > at
> > > org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> > >
> > > iguration.java:79)
> > >
> > > at
> > > org.apache.axis2.wsdl.codegen.CodeGenConfiguration .<init>(CodeGenConf
> > >
> > > iguration.java:72)
> > >
> > > at
> > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> > >
> > > ionEngine.java:61)
> > >
> > > at 
> > > org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
> > >
> > > at
> > > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
> > >
> > >
> > >
> > > This problem doesn't seem related to the WSDL (I tried with one in the 
> > Axis 
> > > 2 samples directory). I've also tried this on both JDK 1.4.2 and 1.5 – 
> > same
> > > issue.
> > >
> > >
> > >
> > > Any ideas?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > -Simon
> > 
> > 
> > --
> > Davanum Srinivas -http://blogs.cocoondev.org/dims/
> > 
> > 
> 
> 
> -- 
> "May the SourcE be with u" 
> http://www.bloglines.com/blog/thilina 




-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina

Re: [Axis2] NullPointerException

Posted by Davanum Srinivas <da...@gmail.com>.
i have comments on all my svn check-ins. if am missed any of them,
please let me know which one and i will be happy to oblige. hold off
on your check-in for a day more. please let me finish one more thing
(fix geronimo activation/javamail) for our test cases.

thanks,
dims


On 7/17/05, Thilina Gunarathne <cs...@gmail.com> wrote:
> Hi Dims, 
> I got a update on Friday and it seeemed MTOM is not working. So I did some
> fixes. I doubt whether we both will overlap the things. 
> SVN is down :(.  No way of checking the things u did. 
> Can u pls specify the things u did....
>   
> Regards, 
> ~Thilina
>  
> 
>   
> On 7/16/05, Davanum Srinivas <da...@gmail.com> wrote: 
> > Simon,
> > 
> > I got this working just yesterday. You will need to compile Axis2 from
> > latest SVN.
> > 
> > Have u set up the hands on lab sample?
> >
> http://www.microsoft.com/downloads/details.aspx?familyid=0E5491C1-8BDE-4FFF-88C4-8E3DC102FAD6&displaylang=en
> > 
> > If you did, i have an example that works with Part3\after sample.
> > 
> > Step #1: Basically start with adding another method in
> > CS\Part3\after\StockServiceLibrary\StockService.cs
> > 
> >        [WebMethod]
> >        public byte[] echoAttachment(byte[] bytes) {
> >                        return bytes;
> >        }
> > 
> > Step #2: Run .NET's wsdl.exe (NOT wsewsdl3.exe) against the dynamic
> > wsdl, add a main and test the method.
> > 
> >    public static void Main(string[] args) {
> >                StockService service = new StockService();
> >                byte[] bytes = null;
> >                service.RequireMtom = true;
> >        using (FileStream fs = new FileStream(" gears.gif",
> > FileMode.Open, FileAccess.Read, FileShare.Read))
> >        {
> >            byte[] buffer = new byte[fs.Length];
> >            fs.Read(buffer, 0, (int)fs.Length);
> >            bytes = service.echoAttachment (buffer);
> >        }
> >    }
> > 
> > Step #3: compile the attached java code and run it.
> > 
> > Thanks,
> > dims
> > 
> > PS: check my blogs for 2 lists of bugs in WSE 3.0 CTP
> > (http://blogs.cocoondev.org/dims/ )
> > 
> > On 7/15/05, Simon Guest <sg...@microsoft.com> wrote:
> > >
> > >
> > >
> > > I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0
> CTP.
> > > When I try to run WSDL2Java in the Axis 2 installation, I get the
> following
> > > exception:
> > >
> > >
> > >
> > > C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl
> > >
> > > Exception in thread "main" java.lang.NullPointerException
> > >
> > >         at
> > >
> org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> > >
> > > iguration.java:79)
> > >
> > >         at
> > > org.apache.axis2.wsdl.codegen.CodeGenConfiguration
> .<init>(CodeGenConf
> > >
> > > iguration.java:72)
> > >
> > >         at
> > >
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> > >
> > > ionEngine.java:61)
> > >
> > >         at 
> > > org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
> > >
> > >         at
> > > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
> > >
> > >
> > >
> > > This problem doesn't seem related to the WSDL (I tried with one in the
> Axis 
> > > 2 samples directory).  I've also tried this on both JDK 1.4.2 and 1.5 –
> same
> > > issue.
> > >
> > >
> > >
> > > Any ideas?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > -Simon
> > 
> > 
> > --
> > Davanum Srinivas -http://blogs.cocoondev.org/dims/
> > 
> > 
> 
> 
> 
> -- 
> "May the SourcE be with u" 
>  http://www.bloglines.com/blog/thilina 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/

Acess C# web service from Java client and Vise versa.

Posted by md kumara lal <ar...@yahoo.com>.
Hi,

I am developing a Bench mark Tool for my final year Undergraduate project.While I doing it is required to acess C# web service from Java client and Vise versa.So If you have any idea let me know howto do that.It is better you can explain me that with necessary examples.

Kind Regards

Madushan Thilina.

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [Axis2] NullPointerException

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi Dims,
I got a update on Friday and it seeemed MTOM is not working. So I did some 
fixes. I doubt whether we both will overlap the things.
SVN is down :(. No way of checking the things u did.
Can u pls specify the things u did....
 Regards,
~Thilina

 On 7/16/05, Davanum Srinivas <da...@gmail.com> wrote: 
> 
> Simon,
> 
> I got this working just yesterday. You will need to compile Axis2 from
> latest SVN.
> 
> Have u set up the hands on lab sample?
> 
> http://www.microsoft.com/downloads/details.aspx?familyid=0E5491C1-8BDE-4FFF-88C4-8E3DC102FAD6&displaylang=en
> 
> If you did, i have an example that works with Part3\after sample.
> 
> Step #1: Basically start with adding another method in
> CS\Part3\after\StockServiceLibrary\StockService.cs
> 
> [WebMethod]
> public byte[] echoAttachment(byte[] bytes) {
> return bytes;
> }
> 
> Step #2: Run .NET's wsdl.exe (NOT wsewsdl3.exe) against the dynamic
> wsdl, add a main and test the method.
> 
> public static void Main(string[] args) {
> StockService service = new StockService();
> byte[] bytes = null;
> service.RequireMtom = true;
> using (FileStream fs = new FileStream("gears.gif",
> FileMode.Open, FileAccess.Read, FileShare.Read))
> {
> byte[] buffer = new byte[fs.Length];
> fs.Read(buffer, 0, (int)fs.Length);
> bytes = service.echoAttachment(buffer);
> }
> }
> 
> Step #3: compile the attached java code and run it.
> 
> Thanks,
> dims
> 
> PS: check my blogs for 2 lists of bugs in WSE 3.0 CTP
> (http://blogs.cocoondev.org/dims/)
> 
> On 7/15/05, Simon Guest <sg...@microsoft.com> wrote:
> >
> >
> >
> > I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0CTP.
> > When I try to run WSDL2Java in the Axis 2 installation, I get the 
> following
> > exception:
> >
> >
> >
> > C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl
> >
> > Exception in thread "main" java.lang.NullPointerException
> >
> > at
> > org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> >
> > iguration.java:79)
> >
> > at
> > org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> >
> > iguration.java:72)
> >
> > at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> >
> > ionEngine.java:61)
> >
> > at
> > org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
> >
> > at
> > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
> >
> >
> >
> > This problem doesn't seem related to the WSDL (I tried with one in the 
> Axis
> > 2 samples directory). I've also tried this on both JDK 1.4.2 and 1.5 – 
> same
> > issue.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > Thanks,
> >
> > -Simon
> 
> 
> --
> Davanum Srinivas -http://blogs.cocoondev.org/dims/
> 
> 


-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina

Re: [Axis2] NullPointerException

Posted by Davanum Srinivas <da...@gmail.com>.
Simon,

I got this working just yesterday. You will need to compile Axis2 from
latest SVN.

Have u set up the hands on lab sample? 
http://www.microsoft.com/downloads/details.aspx?familyid=0E5491C1-8BDE-4FFF-88C4-8E3DC102FAD6&displaylang=en

If you did, i have an example that works with Part3\after sample. 

Step #1: Basically start with adding another method in
CS\Part3\after\StockServiceLibrary\StockService.cs

        [WebMethod]
        public byte[] echoAttachment(byte[] bytes) {
			return bytes;
        }

Step #2: Run .NET's wsdl.exe (NOT wsewsdl3.exe) against the dynamic
wsdl, add a main and test the method.

    public static void Main(string[] args) {
		StockService service = new StockService();
		byte[] bytes = null;
		service.RequireMtom = true;
        using (FileStream fs = new FileStream("gears.gif",
FileMode.Open, FileAccess.Read, FileShare.Read))
        {
            byte[] buffer = new byte[fs.Length];
            fs.Read(buffer, 0, (int)fs.Length);
            bytes = service.echoAttachment(buffer);
        }
    }

Step #3: compile the attached java code and run it.

Thanks,
dims

PS: check my blogs for 2 lists of bugs in WSE 3.0 CTP
(http://blogs.cocoondev.org/dims/)

On 7/15/05, Simon Guest <sg...@microsoft.com> wrote:
>  
>  
> 
> I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0 CTP. 
> When I try to run WSDL2Java in the Axis 2 installation, I get the following
> exception: 
> 
>   
> 
> C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl 
> 
> Exception in thread "main" java.lang.NullPointerException 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> 
> iguration.java:79) 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> 
> iguration.java:72) 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> 
> ionEngine.java:61) 
> 
>         at
> org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) 
> 
>         at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22) 
> 
>   
> 
> This problem doesn't seem related to the WSDL (I tried with one in the Axis
> 2 samples directory).  I've also tried this on both JDK 1.4.2 and 1.5 – same
> issue. 
> 
>   
> 
> Any ideas? 
> 
>   
> 
> Thanks, 
> 
> -Simon 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/