cancel
Showing results for 
Search instead for 
Did you mean: 

problem while using WDDeployable objects in web service

former_member190313
Active Participant
0 Kudos

hi all

i am trying to create web service which will fetch all the web dynpro objects deployeed on a particular WAS.

i have created Web Service using plain java class

my java class is :

package sap.com;

import com.sap.tc.webdynpro.services.sal.deployment.api.IWDDeployableObject;

import com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObject;

import com.sap.tc.webdynpro.services.sal.deployment.api.WDSharingAccessException;

public class DeployableClass {

public static String getDeplyoableObjects(String args) {

String str= "";

final IWDDeployableObject root = WDDeployableObject.getDeployableObject("sap.com/tcwddispwda");

try{

final IWDDeployableObject[] all = root.isReferencedByObjects();

str = String.valueOf(all.length);

}catch(WDSharingAccessException e){

str = e.toString();

}

return str;

}

}

but when i create web service out of this java class and after deployment run that web service it gives me the foll. error : <b>com/sap/tc/webdynpro/services/sal/deployment/api/WDSharingAccessException</b>

the same code runs perfectly when wrriten in web dynpro application but not in java class..

can any one suggest solution for this problem

thanks n regards

sheetal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sheetal,

It is impossible use WebDynpro classes outside WebDynpro container (like WS or EJB container).

For web service you have to re-write your code and use non-WD API, like Deployer API.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

former_member190313
Active Participant
0 Kudos

thanks Valery

if possible can you elaborate more on Deployer APIs?

thanks n regards

Sheetal

Former Member
0 Kudos

Sheetal,

Frankly, I'm not familiar with this service.

But here is my quick findings:

1. Documentation located at: http://help.sap.com/saphelp_srm40/helpdata/de/79/ec633e0084e946e10000000a114084/content.htm

2. The necessary DC is "deploy" in SAP-J2EE compartment.

3. DeployService has method DeployService.listApplications(params) -- looks promising

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Answers (0)