C# client cannot connect to Java Web Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • WatchoutMac
    New Member
    • Apr 2007
    • 1

    #1

    C# client cannot connect to Java Web Service

    I have a C# .NET client (2.0 Framework) that needs to connect to a java web service (built with Axis) and send some data for processing. The java web service is hosted on a secured Apache server ( I am not in control of this server or web service).

    I can create a web reference using VS2005 with the https URL of the WSDL file. When I try sending the data I receive the below error:

    "Unable to connect to the remote server"

    I added the below function to allow all server certificates.

    public static bool ValidateServerC ertificate(obje ct sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors )
    {
    return true;
    }

    I then make the below call before sending my values to the web service.

    ServicePointMan ager.ServerCert ificateValidati onCallback = new RemoteCertifica teValidationCal lback(ValidateS erverCertificat e);

    I'm not sure if I missed something else or if the problem is not on my end at all.

    Any help will be greatly appreciated.
Working...