ws2019 xamarin Web Service WCF

Ismail ÇAKMAK 46 Reputation points
2021-10-28T20:43:48.29+00:00

Merhaba.

ws 2019 kullanıyorum, tüm kurulum ve güncelleştirmelerimi yaptım, her şey yolunda mükemmel çalışıyor.
bir de küçük bir android uygulama yaptım oda harika çalışıyor.

web servisi mi kurdum.

https://www.bogazici-gayrimenkul.com/wservis/webservis.asmx

buda harika oldu

sonra
144752-1.png

projemde de service referance oluşturdum,

MainPage.xaml de bir buton oluşturup HelloWord u çağırıyorum

    private void Button_Clicked(object sender, EventArgs e)  

    {  

        ServiceReference1.webservisSoapClient client = new ServiceReference1.webservisSoapClient(  

         ServiceReference1.webservisSoapClient.EndpointConfiguration.webservisSoap12);  

        var result = client.HelloWorld();   

        veya  

        lblsonuc.Text = client.HelloWorld();   

    }  

ancak Referance.cs dosyasında aşağıdaki gibi sürekli hata alıyorum..

144678-a.png

Tıkandım kaldım,
yardımlarınızı bekliyorum.
Saygılarımla.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,292 questions
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,146 Reputation points Microsoft Vendor
    2021-11-05T06:09:43.587+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    About the first error message, EndpointNotFoundException means that the remote endpoint could not be found or reached, make sure the server is up and running and your WCF service is available.
    About the second one, you need an example. This sample demonstrates a Todo list application where the data is stored and accessed from a WCF web service, this doc shows how to consume an WCF Simple Object Access Protocol (SOAP) service from a Xamarin.Forms application, hovever I'm afraid you need a server demo, you could check https://learn.microsoft.com/en-us/dotnet/framework/wcf/samples/
    For WCF programming, you could create a new thread .
    About the latest error message, It means that you should deserialize it as a list by list<T>, try to use JsonConvert.DeserializeObject<List<klasiki>>(json);

    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ismail ÇAKMAK 46 Reputation points
    2021-11-08T14:16:49.57+00:00
     Hi,  
     I think you wanted to see the code below.  
    

    // GET api/values
    public DataSet Getir()
    {
    benimklas cdb = new benimklas();
    DataSet Ds = cdb.sqlSelect("Select eposta,sifre FROM uyeler");
    return Ds;
    }

    OUTPUT
    147409-screenshot-1.png

    0 comments No comments