on 02-26-2012 5:13 AM
Hi
I am trying to use a webservice proxy in a portal application. I am getting a classcast exception where i try to convert the obs received from context.lookup to the service class.
here is th code i am using in the doContent:
try{
InitialContext context = new InitialContext();
Object obj = context.lookup("/wsclients/proxies/<namespace>/<proxy>");
if(obj !=null)
response.write("obj not null");
response.write(obj.getClass().getName());
Service service = (Service) obj;
} catch(Exception ex){
response.write(ex.toString()+"<BR>");
}
this is the output i get :
obj not null
ServiceImpl
java.lang.ClassCastException
Please help sort this out.
Regards
Ramanender Singh
For benefit of anyone else facing a similar issue.
The issue was resolved by adding a PrivateSharingReference of the deployable proxy DC in portalapp.xml of the PAR
Example
SAPJ2EE::vendorName.com/test_proxy
where test_proxy is the name of the deployable proxy DC
Regards
Ramanender Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.