Connecting to SOAP API using C# RRS feed

  • Question

  • User-1423083070 posted

    I am trying to implement a client to access an api at https://vendor-ctrip.fws.ctripqa.com/Hotel/OTAReceive/HotelStaticInfoService.asmx.

    However I do not know how to pass credentials and other parameters to the webservice.

    I have managed to setup a console application using c# and have added the service as a connected service.

    // endpoint
    HotelStaticInfoServiceSoapClient.EndpointConfiguration endpoint = new HotelStaticInfoServiceSoapClient.EndpointConfiguration();
    // client
    HotelStaticInfoServiceSoapClient client = new HotelStaticInfoServiceSoapClient(endpoint);
    // request
    OTA_HotelDescriptiveContentNotifRQ dreq = new OTA_HotelDescriptiveContentNotifRQ();
    HotelDescriptiveContentNotifResponse dres = await client.HotelDescriptiveContentNotifAsync(dreq);

    Could anyone please direct me in the right direction.
    Saturday, May 4, 2019 6:41 PM

All replies