Optional: Using Web Services - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Optional: Using Web Services

Description:

Optional: Using Web Services. Demo: FedEx Tracking Status. Xmethods.net. Saving WSDL ... Step 3. Test the Client. Tracking Number: 496054180486 ... – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 8
Provided by: conest
Category:

less

Transcript and Presenter's Notes

Title: Optional: Using Web Services


1
Optional Using Web Services
  • Demo FedEx Tracking Status
  • Xmethods.net
  • Saving WSDL
  • Using WSDL Import Wizard
  • Writing Client Code

2
Step 1. Download FedEx WSDL file from Xmethods.net
3
Step 2. Start BCB and Import WSDL
  • File New Other, Web Services tab, WSDL
    Importer

4
Generated FedExTrackerService.h File Contains
  • Interface defined as
  • __interface INTERFACE_UUID("FA22832C-B912-8C69-A1
    0B-CFFF4CC9B6D3") FedExTrackerPortType public
    IInvokable
  • Function declared as
  • virtual AnsiString getStatus(const AnsiString
    trackingNumber) 0
  • Function to get an interface declared as
  • _di_FedExTrackerPortType GetFedExTrackerPortType(b
    ool useWSDLfalse, AnsiString addr"")

5
Step 3 Design the Form
6
Step 4 Write Event Handler
  • File Include Unit Hdr
  • FedExTrackerService
  • On Button Click
  • void __fastcall TForm1cmdStatusClick(TObject
    Sender)
  • Memo1-gtText GetFedExTrackerPortType()-gtgetStat
    us(Edit1-gtText)

7
Step 3. Test the Client
  • Tracking Number 496054180486
Write a Comment
User Comments (0)
About PowerShow.com