cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service....error

david_fryda2
Participant
0 Kudos

Hi,

I created a service that should expose a methode that will execute a BAPI.

Here is the interface:

public interface IMyBAPIService extends IService

{

public static final String KEY = "bapi1service";

public JCO.Function executeBAPI(IPortalComponentRequest request, String ministry) ;

}

When I try to create a Portal Web Service from Portal Service, I get an error :

"Cannot follow operations if a method contening IPortalComponentRequest is selected".

I thought I should pass the request object to the getJCOClientPoolEntry(sapSystem, request).

Any help will be great.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

FredericOzon
Employee
Employee
0 Kudos

Hi David,

WS is based on serialization/unserialization of attributes. Object like IPortalComponentRequest are too "much" complex to be serialized. It could implies that you could have to serialiaze half of the Portal Runtime Objects.

Best Regards,

Frederic

david_fryda2
Participant
0 Kudos

Hi Frederic,

So, if I want to create a methode that should execute a BAPI using

getJCOClientPoolEntry(sapSystem, request) to request a pool.

How can I do it in the service without passing the request object from the consumer service ?

NB : I code myself the JCo connection for the BAPI call since we do not have the se37 option to create a wsdl file for the BAPI.

Thanks

Message was edited by: David Fryda

FredericOzon
Employee
Employee
0 Kudos

Hi,

If your portal service is WS. And the call you sent, is authentified by the Portal WS framework. You could use

com.sapportals.portal.prt.service.sopa.SOAPRuntimeContext.getCurrent User(). This will return you the current IUserContext.

Best Regards,

Frederif

david_fryda2
Participant
0 Kudos

Hi,

My portal service is a WS.

How can the IUserContext acn help me to create the pool.

the method getJCOClientPoolEntry wants an SAP alias and a IPortalComponentRequest object ?

Thanks.