cancel
Showing results for 
Search instead for 
Did you mean: 

How to call Asynchronous SOAP Web service from ABAP class in S4 HANA public cloud

munipkumar
Explorer
0 Kudos
271

Hi Experts,

We have a business requirement to create Main assets in S4 HANA public cloud system(2402), from a custom RAP implementation class.

we have created  the required Communication arrangements in S4 public cloud ( Communication user/system/arrangements) for communication scenario SAP_COM_0563.Outbound service also active in the comm arrangement.

We have tested this SOAP service using SOAP UI tool and its working fine and Assets documents are also getting created in the system.

But We are trying to use the same SOAP API from custom class from eclipse after we creating the service consumption model. and we are getting an error stating "Logical Port does not belong to consumer proxy".

Followed the steps mentioned in this tutorial: https://developers.sap.com/tutorials/abap-environment-soap-web-services..html

SOAP API - used : https://api.sap.com/api/FIXEDASSETCREATEMAIN/overview

Could some one please suggest us how to resolve this, or please suggest the correct approach to be followed to consume the SOAP Web service from custom ABAP class.

 

View Entire Topic
peterpersiel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello munipkumar,

your source system is SAP S/4HANA Cloud as well as your target system or are you calling from SAP S/4HANA (on-premise) system?

Thanks and best regards,
Peter

munipkumar
Explorer
0 Kudos

Hi peterpersiel,

We are trying to call the SOAP WEB service within SAP. Source and Target both are S4 HANA public cloud system.

Please suggest us on this.

peterpersiel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello munipkumar,

the error "Logical Port does not belong to consumer proxy" typically occurs when there is a mismatch between the logical port and the consumer proxy.

I would recommend following these steps for consumption of SAP_COM_0563 - FixedAssetChangeBulkRequest_In to not run into this issue:

  • Create instance of SAP_COM_0563 and expose the inbound Webservice, e.g. using Username and Password for testing.
  • Download WSDL file
  • Create service consumption model of type Web Service based on WSDL file, as described in https://help.sap.com/docs/abap-cloud/abap-development-tools-user-guide/generating-proxies-for-remote...
  • Make sure the service consumption model is activated and copy the code sample from the service operation details
  • Create a custom communication scenario
  • Create a custom outbound service of type SOAP and choose the Service Interface created with the service consumption model
  • For the implementation of the outbound call, you may use the code sample copied earlier from the service consumption model, please follow the steps as described in https://help.sap.com/docs/btp/sap-business-technology-platform/soap-communication-via-communication-...
  • Publish the communication scenario locally and create a communication arrangement based on the communication scenario, in the communication system maintain the credentials for outbound communication that have been maintained when creating communication arrangement SAP_COM_0563 for the inbound service
  • You might perform a connection check in the communication arrangement instance with the oubound service
  • Run the outbound call

Best regards,
Peter