Skip to Content
h2. Import an Enhancement Package Service (EhP) into Enterprise Services Repository (ESR) and create a Web Service Client The purpose of this blog is to describe how to import an EhP Service into the ESR and create a Web Service Client. This procedure is divided into the following five steps:   * Download the corresponding Design Content File (XI Content) from SAP Service Marketplace and import it into the Enterprise Services Repository * Search for a generated and implemented Service Provider in an ABAP Backend * Create a standalone Java Application with a simple Consumer Proxy, generated out of the WSDL in the ESR * Run the Java Application  Download the {code:html}Import_EhP_Service_into_ESR_and_create_Web_Service_Client.exe{code} and have a look at the whole procedure.  h3.   h3. Search for an Enhancement Package Service in Enterprise Services Workplace For this scenario, only a simple service provider is needed, but it should be part of an ERP EhP. The provider that was selected for this is named “EmployeeNameByEmployeeQueryResponse_In”. It returns some information about an employee based on an EmployeeID or WorkAgreementID.    To find this service, go to the Enterprise Services Workplace  (https://www.sdn.sap.com/irj/sdn/esworkplace), and click on “Enterprise Services Index -> Process Components”. image Another page opens. Enter “*EmployeeNameByEmployee*” in the search field. image The result should show an entry “EmployeeNameByEmployeeQueryResponse_In”.  Click on this entry and some useful information about the service is displayed.   image h3.   h3. Download the corresponding Design Content File (XI Content) from SAP Service Marketplace and import it into the Enterprise Services Repository In order to have this service available in the Enterprise Services Repository, we have to find a corresponding EhP XI Content File in the SAP Software Distribution Center. In the SAP Software Distribution Center, click on “Downloads” –> “Search for Software”.  image   Annother page opens. Enter “ECC-SE 602” in the search field and click on “Search”.  image Some results should be displayed, the one you need is titled “XI CONTENT ESA ECC-SE 602”. This XI Content File contains the  EmployeeNameByEmployeeQueryResponse_In service description. Download this file to any location. image After the file has been downloaded successfully, you have to unzip it. Now start the ESR by opening its start page (http://[SERVER]:[PORT]/rep). Click on “Enterprise Services Builder”.  The Builder starts. Click on “Tools” -> “Import Design Objects” (from client). image Select the TPZ-File and import it.  image The tree on the left of the Builder should display a new SWC named “ESA ECC-SE”.  Expand this node and also the node underneath named “ESA ECC-SE 602”. The available namespaces are displayed. The service we are looking for is located under “http://sap.com/xi/EA-HR/SE/Global“.   image Open this namespace and search for the service “EmployeeNameByEmployeeQueryResponse_In”.  image Open it and quickly skip through the model. If this is working fine, the import of the TPZ-File was successful.    h3.  *Search for a generated and implemented Service Provider in an ABAP Backend*In this step you will look for an ABAP service provider based on the model “EmployeeNameByEmployeeQueryResponse_In”. Log on to an ABAP System (SAP ECC 6.0, e.g. ES Workplace System “HU2”). Start transaction “SPROXY” and navigate to the above mentioned SWCV/Namespace. You should find the service interface “EmployeeNameByEmployeeQueryResponse_In”. The icon displayed in the tree to the left should be a green square, indicating that the proxy is up-to-date.  image   Doubleclick on the service interface and have a look at the “Properties-Tab”. image Under “Interface”, you should find an entry “WebService Definition”. Navigate to the +”Web Service Definition”+. Then go back to the service interface. To check the implementation of the proxy, navigate to the +”Provider Class”+.  The Methods-Tab of the Class-builder is displayed. To check if this Method is implemented, doubleclick on the  (…)~EXECUTE_SYNCHRONOUS-Method. Now the business logic of this service is shown. Now you should check, if test data is available in the system. To do this, click on the “Test-Button”image (or F8) while the service interface is displayed. Leave the displayed popup as it is and click on the “Execute-Button”image. The Request XML is displayed. Click the “XML-Editor”-Button and enter a value inside the WorkAgreement_ID-Tags (e.g. “80010” ) and delete the value inside employeeID like this:     image  After this, execute the call by clicking the +”Test-Button”+image(or F8). The Response should be similar to this one:       image This indicates that test data is available in the system and that the provider has been implemented correctly. If you get back different test data, this is ok, just make sure you get a proper response at all. Now also check in transaction “WSADMIN” and “WSCONFIG” whether the service has been configured properly for runtime. To do this, get the name of the service definition from “SPROXY”,”Properties-Tab”, “Web Service Definition”. Open transaction WSCONFIG and put in the name on both fields (Service Definition and Variants). If no entry shows up, create a new one. Also open WSADMIN and look for a service node with the name of the service definition.    image  After you have found the right node, click on the “WSDL-Button”image. Logon with your user and you should see the WSDL. Scroll down right to the end of the WSDL and search for an entry for “soap: address location”. The value of this tag is the URL for the Binding-WSDL we later need in our Java Application to call the service provider. h3.   h3.  *Create a standalone Java Application with a simple Consumer Proxy, generated out of the WSDL in the ESR*In this step you will generate a Java Consumer Proxy (skeleton) based on the WSDL for “EmployeeNameByEmployeeQueryResponse_In” of the ESR.   Open your SAP NetWeaver Developer Studio (SAP NetWeaver CE 7.1 SR3). In the Project Explorer click on “File” –> “New “–> “Java Project”.   image  Next you have to set the connection to the ESR where you have imported the TPZ-File. To do this go to “Window” –> “Preferences” and under the “Web Services” node, select the “Enterprise Services Browser” entry and maintain the needed Values ( ESR System: “http://[HOST]:[PORT]/rep/start/index.jsp“, ESR Host:  (HOST), ESR Http Port:  (PORT)). Click apply and leave the dialog. On the generated project on the package explorer, right click and choose “Import”. Choose “WSDL” under the “Web Service” node.   image  Choose the “Enterprise Services Repository” as WSDL source.   image  After clicking “Next”, authenticate yourself with an ESR User. In the tree that is displayed afterwards, navigate to the SWCV/Namespace mentioned above and select the Service Interface “EmployeeNameByEmployeeQueryResponse_In”. This should result in the import of the WSDL, which should be shown under your project. On the imported WSDL, right-click and select “Generate Client”. The “Web Service Client”-Wizard is displayed. Drag the slider on the left at the bottom, so that is says “Develop Client”.     image  Make sure that as Server: “SAP Server”, as Web service runtime: “SAP NetWeaver“ and as Client project the name of your project is selected.   image  Follow the steps of the wizard. After the client has been created successfully, create a new package inside your project and name it “Test” for example. Inside this, create a new class and give it a name.  *Add the following Import Statements:*   import java.net.MalformedURLException; import java.util.Map; import javax.xml.ws.BindingProvider; import com.sap.xi.ea_hr.se.global.EmployeeNameByEmployeeQueryMessage; import com.sap.xi.ea_hr.se.global.EmployeeNameByEmployeeQueryResponseIn; import com.sap.xi.ea_hr.se.global.EmployeeNameByEmployeeQueryResponseInService; import com.sap.xi.ea_hr.se.global.EmployeeNameByEmployeeResponseMessage; import com.sap.xi.ea_hr.se.global.PersonName; import com.sap.xi.ea_hr.se.global.StandardMessageFault; import com.sap.xi.ea_hr.se.global.WorkAgreementID; import com.sap.xi.ea_hr.se.global.EmployeeNameByEmployeeQueryMessage.EmployeeNameSelectionByEmployee;   *In the main method of this class, enter the following code:* Please note:  (BINDING_WSDL_URL) should be replaced with the proper URL found in the WSDL mentioned above. Same with  (USER) and  (PASSWORD). h3.   h3.  *Run the Java Application*After you have completed the implementation, save the project, right-click on it and choose “Run as Java Application”. Now you should get a response similar to this one:    image
To report this post you need to login first.

30 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member
    Nice Blog and it becomes clear how it will work. As you developed this scenario did you include any monitoring functionalities of the PI NWA and configured maybe a “NEW” direct connection? That would be a nice addOn ๐Ÿ™‚

    Let me know about your next researches.

    Kind regards,
    Dries

    (0) 
    1. Matthias Kretschmer Post author
      Hello Dries,

      unfortunately PI monitoring and configuration was not in focus here. But it would be a nice add on or a good topic for the next blog…

      Kind regards,
      Matthias

      (0) 
  2. Former Member
    Hi,
    While I was downloading I have been informed with “Error Message – No download authorization”. I hvae access to sap service market place.Could you please let me know how can I download the ES?
    Thank you!
    (0) 
  3. Hi,
    This is a very helpful blog, but when I try to search a content file in the SAP Marketplace I can’t find any EhP XI Content File.
    Please, could you help me?

    Thanks in advance,
    Jennie

    (0) 
    1. Matthias Kretschmer Post author
      Hi Jennie,

      you should use the following search term: XI CONTENT ESA ECC-SE.
      Then in the search results list you should select a corresponding entry which has a comment as follows: Maintenance Software Component.

      Regards,
      Matthias

      (0) 
      1. Hi Matthias,
        Thanks for your response.

        The problem is when I search “XI CONTENT ESA ECC-SE” or “XI CONTENT ESA” in the SAP Software Distribution Center I get the message “No Results Found”.
        I tried to search using the search term “XI CONTENT” but I just see the third-party content like CIDX, ELSTER, OAGIS, PIDX, ROSETTANET and SATAR. Do I need a special permission in my s-user?

        Regards,
        Jennie

        (0) 
        1. Matthias Kretschmer Post author
          Hi Jennie,

          I don’t think that you need some special permissions. I’m logged on with my D-User.

          Do you search with quotation marks?

          Regards,
          Matthias

          (0) 
          1. Hi Matthias,

            No, I didn’t use the quotation marks. I’ve followed each step from your blog and the content file doesn’t appear in the result list.

            Regards,
            Jennie

            (0) 
            1. Matthias Kretschmer Post author
              Hi Jennie,

              if the search does not work you could als try to navigate directly to this file. One possible path could be:
              Browse the Navigation Area -> Entry by Application Group -> Support Packages and Patches -> SAP Application Components -> SAP ERP  -> SAP ERP ENHANCE PACKAGE -> SAP ENH PACK 3 FOR SAP ERP 6.0 -> XI CONTENT ESA ECC-SE 603

              Regards,
              Matthias

              (0) 
  4. Former Member
    Hi Mathias, very good Blog. I have a quick question on the part of SPROXY in your BLOG.  I have input the XI content you mentioned in to PI 71 successfully. Do I need to install Ehp at backend system, in order to find the methods implemented for the Service Interface you mentioned in your BLOG? Does one need to generate a PROXY based on an interface inside the ECC system as what we did with PI 70, or the proxy class and its methods will be automatically implemented after we imported XI Content (Ehp) into ESR?  Many thanks, Jing
    (0) 
    1. Matthias Kretschmer Post author
      Hi Jing,

      thank you! The import of the design content is needed for the analysis of the service interface and later on for the generation of the Java Consumer Proxy. If you use an ERP backend (SAP ECC 6.0) with the correct Enhancement Package installed like the ES Workplace System “HU2” you should find all service implementations. So there is no need to generate anything in the SPROXY transaction. Furthermore you should know that after the import no automatic service implementation takes place.

      Best regards,
      Matthias

      (0) 
  5. Former Member
    Hi Matthias,

    thanks for your great blog. When I tried it out, i have received the following error when creating the client for the consuming webservice in NWDS.
    “IWAB0014E Unexpected exception occurred.”

    Do you know a reason, why this could have failed? Do we need for the generation of the consuming webservice the configuration steps in the ECC?

    Thanks in advance and best regards
    Florian

    (0) 
    1. Matthias Kretschmer Post author
      Hi Florian,

      thank you! Unfortunately I have never seen this exception code. Have you checked before the generation that as Server: “SAP Server”, as Web service runtime: “SAP NetWeaver“ and as Client project the name of your project is selected? Are you using a SAP NetWeaver Developer Studio (SAP NetWeaver CE 7.1 SR3)? The backend steps are just executed to make sure that the service provider is working.

      Best regards,
      Matthias

      (0) 
      1. Former Member
        Hi Matthias,

        i checked all the things you mentioned. I installed SAP NetWeaver CE 7.1 SR3, but just the developer studio. Ist that sufficent?

        I have got another question regarding the service provider in the ECC. The service interface we want to use is “green” but when I double click on it, the “test” button is faded out and it is set to “inactive (subobjects)”. Unfortunately the “activate” button for that interface is also faded out. Is it possible that I have made a mistake when setting up the conncetion between the ECC and the ESR? Is it sufficient to maintain the SLD entry for the ECC system or do i have to maintain additional properties in ABAP?

        Thanks in advance and best regards
        Florian

        (0) 
      2. Former Member
        Hi Matthias,

        i checked all the things you mentioned. I installed SAP NetWeaver CE 7.1 SR3, but just the developer studio. Ist that sufficent?

        I have got another question regarding the service provider in the ECC. The service interface we want to use is “green” but when I double click on it, the “test” button is faded out and it is set to “inactive (subobjects)”. Unfortunately the “activate” button for that interface is also faded out. Is it possible that I have made a mistake when setting up the conncetion between the ECC and the ESR? Is it sufficient to maintain the SLD entry for the ECC system or do i have to maintain additional properties in ABAP?

        Thanks in advance and best regards
        Florian

        (0) 
    2. Former Member
      Hi Matthias,

      i checked all the things you mentioned. I installed SAP NetWeaver CE 7.1 SR3, but just the developer studio. Ist that sufficent?

      I have got another question regarding the service provider in the ECC. The service interface we want to use is “green” but when I double click on it, the “test” button is faded out and it is set to “inactive (subobjects)”. Unfortunately the “activate” button for that interface is also faded out. Is it possible that I have made a mistake when setting up the conncetion between the ECC and the ESR? Is it sufficient to maintain the SLD entry for the ECC system or do i have to maintain additional properties in ABAP?

      Thanks in advance and best regards
      Florian

      (0) 
      1. Matthias Kretschmer Post author
        Hi Florian,

        I think you also need to install the SAP NetWeaver Application Server Java. Then you should be able to select as Server: “SAP Server” and as Web service runtime: “SAP NetWeaver“ before the generation.
        Regarding the second question you could call the transaction “SM59” and check whether an external destination called “IFR_HTTP_DEST_xxx” is working or not. This one points to the ESR. But it could also be a user problem (e.g. rights missing). I mean you could also use the ES Workplace System “HU2” as a reference. There the service provider is testable.

        Best regards,
        Matthias

        (0) 
  6. Former Member
    Hi,

    Please help me iam getting a exception
    “The sap netweaver web service runtime does not support the client project ‘projet name'”.

    when i selected

    server : sap server

    webservice runtime ;SAP netweaver

    Client project :’Project name’

    in configuration for generate client

    Thanks in advance

    Naveen

    (0) 
      1. Former Member
        Hello,

        I got same problem with SP06
        while I could choose java project with SP05.

        With SP06, I could choose it if I select
        “Apache Axis” web service runtime.
        But it does not make sense.

        How can I select java project with
        “SAP NetWeaver” Web service runtime?

        (0) 
  7. Former Member
    This is an excellent Blog.

    I have few questions which are not very clear. Please let me know whether these points are correct.

    1. When we import the enhancement packs from XI content, for example the XI content from Enahncement pack 3 for ECC, this will install the Service Interfaces and related definitions in PI7.1, but doesn’t implement/create proxies at that time in the back end for those interfaces. Am I right?

    2. If we want the business logic for the corresponding Service definitions that were imported using XI content in ESR, we need the ECC enhancement packs 3.0 contents to be implemented seperately.

    3. In the Jave consumer application, why do we mention the Web service URL that corresponds to the back end system, instead of pointing to the service definition in PI7.1.

    Thanks

    (0) 
    1. Matthias Kretschmer Post author
      Hello Suresh,

      thank you and sorry for the late response!

      Here are my answers:

      1. yes, it is just an import into the ESR
      2. for that you need to install the corresponding
         ECC package in the backend system
      3. because we need to specify the endpoint of
         this service, that means where the service is
         actually running

      Regards,
      Matthias

      (0) 
  8. Former Member
    I am not able to see ESA ECC-SE 603 SWCV when I run the SPROXY transaction. But when I do a search for say object name SalesOrderCreateRequestConfirmation_In

    I can see it in the search results but when I click F5 or position, it does not.
    There is one issue SWCV is empty.

    What could be the problem

    (0) 
    1. Matthias Kretschmer Post author
      Hello Shekar,

      there are several reasons for that problem:

      – ESA ECC-SE 603 SWCV was not imported into your ESR
      – the SPROXY transaction points to the wrong ESR
      – your user has not the needed roles for accessing ESR content in transaction SPROXY

      Regards,
      Matthias

      (0) 

Leave a Reply