Skip to Content

Creating a WEB Service for SAP enterprise connector


I am using the SAP enterprise connector plugin for Netweaver 04.

It generated me all the classes that I need for the BAPI.

It also generated me a Proxy class.

I want to create a service.

This is what I've done :

1) create a portal service.

2) create a methode in the service :

public Bapi_Companycode_Getdetail_Output execute_BAPI_COMPANYCODE_GETDETAIL(

Bapi_Companycode_Getdetail_Input arg1)


try {

return new MyProxy_PortType().bapi_Companycode_Getdetail (arg1);

} catch (Exception e) {


return null;


3) after I created a web service from the portal service.

Is it the right way ?

Thanks a lot.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2005 at 12:22 PM


    This is the simplest path to create a WebService based on a portal service (based on RFC). After these steps, you have to generate a .par file from the NWDS and upload it into the portal (System Administration -> Support -> Portal Runtime -> Administration Console) and you're set.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2005 at 12:24 PM

    There is also a simpler way - you can create webService directly from an RFC if you have ABAP WAS version 6.40.

    - there are many tutorials on SND.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Marcin and everyone,

      Thanks for the precious explanations.

      I created a client and I have an exception.

      1) I made a portal service from wsdl - client side.

      2) I created a DynPage.

      3) Here is the code :

      IMyBAPI4Service client = (IMyBAPI4Service) PortalRuntime.getRuntimeResources().getService(


      IMyBAPI4Service securedClient = (IMyBAPI4Service) client.getSecurisedServiceConnection( request.getUser());

      //this is null.

      if (securedClient.getURLEndPoint().getURL() == null) {

      securedClient.setURLEndPoint(new URLEndpoint("http://<server>:<port>/irj/servlet/prt/soap/"));


      Bapi_Companycode_Getdetail_Input importParams = new Bapi_Companycode_Getdetail_Input();


      Bapi_Companycode_Getdetail_Output exportParams = null;


      Do I have to use a secured client ? What is it ?

      The exception is :

      Problem at execution: SOAP Fault Error (java.lang.NoClassDefFoundError) : java.lang.NoClassDefFoundError

      Thanks Marcin....

      Message was edited by: David Fryda

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.