Add Web Reference

Hi All,

There is a web service ( http://pttws.ptt.gov.tr/GonderiHareketV2Test/services/Sorgu?wsdl ) they ask me that web service should be described with "Add Web Reference" from VS and it uses HTTPS instead of HTTP. Is that possible with AX and if yes how?

Parents Reply
  • I could create service with "Add Web Reference", but (BTW WSDL address not at upper here, this; https://pttws.ptt.gov.tr/PttVeriYuklemeTest/services/Sorgu?wsdl ). 

    There were SorguPortTypeClient and I was using that:

    clientType = CLRInterop::getType("PTT.PTTservice.SorguPortTypeClient");

    but it isn't show anymore and I tried to use like:

    clientType = CLRInterop::getType("PTT.tr.gov.ptt.pttws.SorguPortTypeClient");

    and gives error:

    System.InvalidOperationException: Type PTT.tr.gov.ptt.pttws.Sorgu is not a service client. It does not implement a service contract.

    I supposed using this type of web services should be different but how?

    My code:

    CLRObject clientType;

    PTT.tr.gov.ptt.pttws.InputDongu2[] dngList = new PTT.tr.gov.ptt.pttws.InputDongu2[1]();
    PTT.tr.gov.ptt.pttws.InputDongu2 dng = new PTT.tr.gov.ptt.pttws.InputDongu2();
    PTT.tr.gov.ptt.pttws.Sorgu service;
    PTT.tr.gov.ptt.pttws.Input2 input = new PTT.tr.gov.ptt.pttws.Input2();
    PTT.tr.gov.ptt.pttws.GondericiBilgi gnd = new PTT.tr.gov.ptt.pttws.GondericiBilgi();
    PTT.tr.gov.ptt.pttws.Output2 output;
    str st;
    #OCCRetryCount
    System.Exception ex;


    str outResult;
    String10 outflag,errorNum;
    smmParametersTable smmParametersTable = smmParametersTable::find();
    System.Int64 i;

    System.Type nullableType = System.Type::GetType('System.Nullable`1[System.Int32]');
    System.Object decimalValue;
    System.Object[] paramValues = new System.Object[1]();
    CLRObject nullableValue;


    try
    {
    new InteropPermission(InteropKind::ClrInterop).assert();

    // clientType = CLRInterop::getType("PTT.tr.gov.ptt.pttws.SorguPortTypeClient");
    clientType = CLRInterop::getType("PTT.tr.gov.ptt.pttws.Sorgu");

    service = AifUtil::createServiceClient(clientType);

Children
No Data
Related
Recommended