question

IsmailAKMAK-6268 avatar image
0 Votes"
IsmailAKMAK-6268 asked IsmailAKMAK-6268 answered

ws2019 xamarin Web Service WCF

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.

dotnet-xamarin
1.png (11.6 KiB)
a.png (31.7 KiB)
· 13
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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.
You could check if the webservice can be reached on iOS or UWP, I'm afraid this is caused by the server. And I 'm not clear about ServiceReference1.webservisSoapClient, webservisSoapClient you used, you could share more information about them.
There is also a doc about how to consume a Windows Communication Foundation (WCF) Web Service, you choud check it.
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/web-services/wcf

0 Votes 0 ·

Selamlar @WenyanZhang-MSFT,

uzak uç noktam var ve çalışıyor.
test ediyorum

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

adrese sizde bakabilirsiniz..
ayrıca

ServiceReference1.webservisSoapClient client = new ServiceReference1.webservisSoapClient(
ServiceReference1.webservisSoapClient.EndpointConfiguration.webservisSoap12);

her şey Microsoft tarafında tarif edildiği gibi.
malesef çalışmıyor, başka nasıl çözüm önerirsiniz.


0 Votes 0 ·

Form this link , I just see a page with webservis header ,may I ask is it correct? I'm afraid I need more information or a reproducible demo, would you mind sharing a demo to github? I will download and test it.

0 Votes 0 ·

Dear Wenyan,
i just started xamarine, i don't have a github account
I can only send you an email.
but it seems like I solved the problem a little bit, but I realized that it was caused by my domain service.
I also succeeded in my friend's domain.
I think when it finds out in that domain it will close its permissions, I'd better start messing with the web api.
so can you help me with web api?
Kind regards.

0 Votes 0 ·

I can't receive email due to our policy. Do you mean that you need the WCF and ASP.NET Web API? About this you could create new thread.


0 Votes 0 ·

Dear Wenyan
It's really honorable that you take care of me. Thank you so much.
Yes, I want to advance with Web Api.
like i said i am new to xamarin, but i can write good c#
I want to create a Web Api and pull data in my xamarin form.
What can we do about this issue, can you give me a small example, even if there is a small sample zip, I can make changes and examine it so I can learn.
Thank you in advance.

0 Votes 0 ·

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://docs.microsoft.com/en-us/dotnet/framework/wcf/samples/
About WCF programming, you could create a new thread .


0 Votes 0 ·

Thanks Wenyan..

0 Votes 0 ·

You are welcome.

0 Votes 0 ·
Show more comments
WenyanZhang-MSFT avatar image
0 Votes"
WenyanZhang-MSFT answered WenyanZhang-MSFT edited

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://docs.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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IsmailAKMAK-6268 avatar image
0 Votes"
IsmailAKMAK-6268 answered
  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



screenshot-1.png (55.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.