sap servislerine .net ile bağlanmak

85 views
Skip to first unread message

Emre Aydemir

unread,
Nov 22, 2018, 9:10:59 AM11/22/18
to altdotne...@googlegroups.com
Arkadaşlar selam,

Sabahtan beri googleladım fakat bulamadım, bir entegrasyon için SAP den açılmış servislere bağlanıyorum,  aşağıdaki app.config ile sorunsuz data çekiyorum, fakat bunu dll haline getirip farklı yerlerde kullanmamız lazım, app.config den kurtulmamız gerekiyor, ama bir türlü kod kısmı çalışmıyor, ilk resim config içi, ikinci kod kısmı, atladığım yer nedir? (Bu arada hata sadece Server Error)

image.png

image.png

Muharrem CETINKAYA

unread,
Nov 22, 2018, 10:45:41 AM11/22/18
to altdotne...@googlegroups.com
Selam,

Kod içinde endpoint oluştururken contract ismi vermemişsin onunla alakalı olabilir mi? 

22 Kas 2018 Per 17:10 tarihinde Emre Aydemir <emra...@gmail.com> şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturki...@googlegroups.com.
To post to this group, send email to altdotne...@googlegroups.com.
Visit this group at https://groups.google.com/group/altdotnetturkiye.
For more options, visit https://groups.google.com/d/optout.

yasin şahan

unread,
Nov 23, 2018, 1:31:32 AM11/23/18
to altdotne...@googlegroups.com

selam ,

elimde aşağıdaki gibi bir örnek var     


"fonksiyon adı ve parametreleri set edilmesi

"fonksiyon

service.Zhrptf00112 productParameter = new service.Zhrptf00112();

            productParameter.Username = "PDKS";

            productParameter.Password = "12345678";

 

 "parametre

            service.Zhrpt004 data = new service.Zhrpt004();

            data.Sapid = "7562";

            data.Tarih = "2015-07-01";

            data.Saat = "08:00:00";

        "parametre

            productParameter.Pdks = new service.Zhrpt004[1];

            productParameter.Pdks[0] = data;

 

            productParameter.Hata = new service.Zhrpt005[0];

 

“servis wsl adı

            service.ZHRPT_PDKS_02 wsl = new service.ZHRPT_PDKS_02();

            wsl.UseDefaultCredentials = false;

            wsl.Credentials = new System.Net.NetworkCredential("webservis", "*");

 

            String url = wsl.Url;

            ////response işlemi

            service.Zhrptf00112Response responce = new service.Zhrptf00112Response();

            “fonksiyonun servise responce edilmesi

responce = wsl.Zhrptf00112(productParameter);

 

//////////////////////////////////////////////

Başka bir örnek

 

 

 

            service.ZPP_HAT_OUT_WEB productParameter = new service.ZPP_HAT_OUT_WEB();

            int count = 0;

 

            productParameter.CE_DESC = new service.ZPP_ENT_CE_DESC_DAT_S[count];

            productParameter.COATING_CODE = new service.ZPP_ENT_CCODE_DAT_S[count];

            productParameter.COLOUR_CODE = new service.ZPP_ENT_COLCODE_DAT_S[count];

            productParameter.INTER_CODE = new service.ZPP_ENT_INTLVNTCOD_DAT_S[count];

            productParameter.MATERIAL_CODE = new service.ZPP_ENT_MATCODE_DAT_S[count];

            productParameter.PACKAGE_TYPE = new service.ZPP_ENT_PCKTYPE_DAT_S[count];

            productParameter.PARAMETER_PRINT = new service.ZPP_ENT_CE_PAR_DAT_S[count];

            productParameter.PRODUCT_CODE = new service.ZPP_ENT_PARTDESC_DAT_S[count];

            productParameter.SIZE_CODE = new service.ZPP_ENT_SIZE_CODE_DAT_S[count];

 

 

            //enterprise service

            service.Z_HAT_ENTWSDL2 wsl = new service.Z_HAT_ENTWSDL2();

            wsl.UseDefaultCredentials = false;

            try

            {

 

                ////soa managerdan kullanıcı adı -şifre girildiyse

                wsl.Credentials = new System.Net.NetworkCredential("username", "pass");

 

                String url = wsl.Url;

                ////response işlemi

                service.ZPP_HAT_OUT_WEBResponse responce = new service.ZPP_HAT_OUT_WEBResponse();

 

                responce = wsl.ZPP_HAT_OUT_WEB(productParameter);

 

            }

            catch (Exception e)

            {

 

 

            }


Muharrem CETINKAYA <muharrem....@gmail.com>, 22 Kas 2018 Per, 18:45 tarihinde şunu yazdı:

Ahmet Arslan

unread,
Jan 16, 2019, 10:04:00 AM1/16/19
to altdotnetturkiye
Merhaba;
Kodda endpoint ve binding bilgisini atamışsın ama contract eksik görünüyor, bir de onu atayıp servisi çağırmayı dener misin?

22 Kasım 2018 Perşembe 17:10:59 UTC+3 tarihinde Emre Aydemir yazdı:
Reply all
Reply to author
Forward
0 new messages