Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use ABSL code to call Web service

Shulou Source: shulou.com Published: 2022-05-31 14:50:16 10月27日 Update

This article mainly explains "how to use ABSL code to call Web service", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use ABSL code to call Web service" bar!

Requirements: create web service (maintain ticket) in C4C UI and consume it through ABSL code.

1. Create a new Communication Arrangement

Create a Communication Arrangement based on the standard Communication Scenario of Manage Tickets:

Because I am calling the Web Service provided by the current C4C system from the ABSL on the current C4C system, Communication System chooses Local:

Of course, the communication system of this Local also needs to be created in this place:

Authentication method can be maintained as "User ID and Password", and the password of communication user can be maintained for the created arrangement:

Download the WSDL of the Arrangement locally.

two。 Create a new External Web Service Integration in Cloud Studio:

Load the WSDL folder downloaded in step 1:

Click finish, and you can see that two files are automatically generated in Studio.

Double-click .csd (communication scenario definition) and change Communication Type to A2X to:

Switch to Services tab and select Custom Outbound Services- > JerryTicket2- > MaintainBundle

After activation, the communication scenario of JerryTicket2 can also be seen in the list of Communication Scenario.

3. Create a Communication arrangement based on the communication scenario JerryTicket2 created in the previous step. At this point, the C4C configuration is complete.

The ABSL code is as follows:

Import ABSL; import AP.CRM.Global; import AP.Common.GDT; var ticketReq: JerryTicket2.MaintainBundle.Request; var SerReq: JerryTicket2.MaintainBundle.Request.ServiceRequestBundleMaintainRequest2_sync.ServiceRequest; var SrvReqItem: JerryTicket2.MaintainBundle.Request.ServiceRequestBundleMaintainRequest2_sync.ServiceRequest.Item;SerReq.actionCode = "06"; SerReq.ID = this.ID; var counter = 0; while (counter < 500) {SrvReqItem.actionCode = "01"; / / Create Item SrvReqItem.Description.content = "Add item from WS"; SrvReqItem.ProductID.content = "P120100" SrvReqItem.RequestedQuantity.content = 1.0 SrvReqItem.RequestedQuantity.unitCode = "EA"; SrvReqItem.UserServiceTransactionProcessingTypeCode = "SRP0"; SerReq.Item.Add (SrvReqItem); counter = counter + 1;} ticketReq.ServiceRequestBundleMaintainRequest2_sync.ServiceRequest.Add (SerReq); var response = Library::JerryTicket2.MaintainBundle (ticketReq, "", "JerryTicket2") Thank you for reading, the above is the content of "how to use ABSL code to call Web service". After the study of this article, I believe you have a deeper understanding of how to use ABSL code to call Web service, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Code learning content files system selection two places that is ideas situations folders articles is in more standards activation knowledge knowledge points articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn Shulou Information MySQL Xiaomi