Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

my webservice supports Axis1.x but not Axis2.x ,so is it the compatibility issue?

 
bhushan pawar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one web service and i want to test whether it supports Axis1.x and Axis2.x or not?

I tried to create the stubs classes using Axis 2-1.2 , the stubs classes are generated successfully. But when I used this
stubs classes in my client side code and sent the soap request to one service method ,
I

It returned me an error

"run rg.apache.axis2.AxisFault: Transport: Unable to parse XML
input

document
no element found at line 1, column 0, byte -1 at
/postini/e4_0_0c0/lib/perl5/site_perl/5.8.8/i686-linux/XML/Parser.pm
line 187"

So i used lower version of Axis 1.3.0 and generated stubs from wsdl file and used that stubs in my client side code.when i sent the request to one of the service method i get the correct response from web service.

so could you guys please let me know whether this is the versioning issue.please share your knowledge on the same.
But i am just wondering if my web service supports Axis1 it should be compatible with Axis2.

I also observed that the stubs classes created using Axis2 and Axis1 are totally different ,i guess it would be different ways creating stubs for Axis 1 and Axis2,please share your thoughts if anyone knows more on it

Following ar 2 client side code(for stubs generated using Axis1 and Axis 2) that i used to call the service method.
********************************************************

Using stubs classes generated by Axis 1.3.0: which runs successfully
Note :returned output is of String type

try{
UserSyncService userSyncService=new UserSyncServiceLocator();
output=userSyncService.getUserSyncPort().test(true));
System.out.println(output);

}
catch(Exception ex)
{
ex.printStackTrace();
}


********************************************************
Using stubs classes created using Axis 2-1.2:

try{
UserSyncServiceStub stubClass=new UserSyncServiceStub();

UserSyncServiceStub.Test test=new UserSyncServiceStub.Test();
test.setShould_work(true);

UserSyncServiceStub.Test0 testo=new UserSyncServiceStub.Test0();
testo.setTest(test);

output=stubClass.test(testo);
System.out.println(output);

}
catch(Exception ex)
{
ex.printStackTrace();
}

It returned me an error

Your valuable suggestions will really help me.
Thanks In advance
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic