Calling SOAP Web Services

edwardkchedwardkch MYMember ✭✭

Hi, I have add a web reference and tried to call to the web services but i am getting the following error message
Could not establish trust relationship for the SSL/TLS" error

What does this mean and how should i resolve this.

Thanks

Tagged:

Answers

  • N_BauaN_Baua INMember ✭✭✭✭✭

    @edwardkch said:

    I assume you've read through the Xamarin API for SOAP and followed the instructions. If not please check your workings.

    Hope it helps.
    Regards,
    N Baua

  • edwardkchedwardkch MYMember ✭✭

    Hi Baua,

    Yeap, i am trying to consume a WSDL not ASMX. I am new to this

  • N_BauaN_Baua INMember ✭✭✭✭✭

    @edwardkch said:
    Hi Baua,

    Yeap, i am trying to consume a WSDL not ASMX. I am new to this

    What not a big difference is,
    Check the sample with WSDL

    Regards,
    N Baua

  • edwardkchedwardkch MYMember ✭✭

    Thanks for the guide.

    Found out that it doesnt have a signed cert. Any idea where should i put this code?

    System.Net.ServicePointManager.ServerCertificateValidationCallback +=
    (se, cert, chain, sslerror) => { return true; };

    i tried on the onlick but didnt work

  • NMackayNMackay GBInsider, University mod
    edited August 2017

    @edwardkch

    You have to pop it in your platforms specific projects, I wouldn't use it in a production scenario though.

     public override bool FinishedLaunching(UIApplication app, NSDictionary options)
            {
    
                Forms.Init();
    
                    ServicePointManager.ServerCertificateValidationCallback +=
                            (sender, cert, chain, sslPolicyErrors) => true;
                }
    

    In Android stick it in MainActivity OnCreate.

Sign In or Register to comment.