I just already used that way dozen times with different web services. This one ( https://pttws.ptt.gov.tr/PttVeriYuklemeTest/services/Sorgu?wsdl ) doesn’t works like that. After Add service Reference, have to press “Advanced”, “Add Web Reference” they said.
When using there is no clientType = CLRInterop::getType("… and service = AifUtil::createServiceClient(… lines. Actually I don’t know what means all of these but with this service seem it works different. They just said that “This’s not a service reference, web reference” .
Now I’m just getting empty respond at last line. I don’t know:
CLRObject clientType;
PTT.tr.gov.ptt.pttws.InputDongu2[] dngList = new PTT.tr.gov.ptt.pttws.InputDongu21;
PTT.tr.gov.ptt.pttws.InputDongu2 dng = new PTT.tr.gov.ptt.pttws.InputDongu2();
PTT.tr.gov.ptt.pttws.Sorgu service = new PTT.tr.gov.ptt.pttws.Sorgu();
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;
PTT.tr.gov.ptt.pttws.kabulEkle2CompletedEventArgs a;
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.Object1;
CLRObject nullableValue;
try
{
new InteropPermission(InteropKind::ClrInterop).assert();
input.set_kullanici(“PttWs”);
input.set_gonderiTip(“NORMAL”);
input.set_gonderiTur(“KARGO”);
input.set_musteriIdSpecified(true);
if (this.DeliveryType == ETGCustRequestDeliveryType::Consumer)
{
decimalValue = System.Convert::ToInt32(smmParametersTable.SNBPTTinUserPers);
paramValues.SetValue(decimalValue, 0);
nullableValue = System.Activator::CreateInstance(nullableType, paramValues);
input.set_musteriId(nullableValue);
input.set_sifre(smmParametersTable.SNBPTTinUserPasswordPers);
}
else
{
decimalValue = System.Convert::ToInt32(smmParametersTable.SNBPTTinUserComm);
paramValues.SetValue(decimalValue, 0);
nullableValue = System.Activator::CreateInstance(nullableType, paramValues);
input.set_kullanici(nullableValue);
input.set_sifre(smmParametersTable.SNBPTTinUserPasswordComm);
}
dng.set_aAdres(CompanyInfo::findDataArea(curext()).addressing().Street);
dng.set_aliciAdi(CompanyInfo::findDataArea(curext()).Name);
dng.set_aliciIlAdi(CompanyInfo::findDataArea(curext()).addressing().State);
dng.set_aliciIlceAdi(CompanyInfo::findDataArea(curext()).addressing().City);
dng.set_barkodNo(this.CargoShipmentId);
gnd.set_gonderici_adi(this.DirPartyTable().Name);
gnd.set_gonderici_adresi(this.smmLeadTable().ETGAddress);
gnd.set_gonderici_il_ad(this.smmLeadTable().ETGPartyState);
gnd.set_gonderici_ilce_ad(this.smmLeadTable().ETGPartyCounty);
gnd.set_gonderici_telefonu(this.smmLeadTable().ETGPhoneNumber);
gnd.set_gonderici_email(this.smmLeadTable().ETGEmail);
dng.set_gondericibilgi(gnd);
dngList.SetValue(dng,0);
input.set_dongu(dngList);
output = service.kabulEkle2(input);