Create a Proxy by Command Prompt (SSL Certificate) - web-services

I have a web service(asmx) and it has a certificate for SSL. I can access this web service and see whole methods. I want to create a proxy by command prompt and I am using below code.
wsdl MyServiceAdres?wsdl
and this is the error message:
There was an error downloading 'MyServiceAdres?wsdl'.
The request was aborted: Could not create SSL/TLS secure channel.

I solved this problem. You have to save wsdl file to your local and use below code.
wsdl.exe myWebService.wsdl myXsd1.xsd myType1.xsd myXsd2.xsd ...

Related

Use SignalR-Client-Cpp with client certificate from windows cert store

I am trying to communicate via SignalR with a server which requires client authentication with a certificate. Hence, i receive the following error when trying to start the connection:
"connection could not be started due to: WinHttpSendRequest: 12044: A certificate is required to complete client authentication".
My program is in cpp, so i use the SignalR-Client-Cpp which is integrate to my project via vcpkg.
My implementation is similar to the example in readme.md, you can use it as a base for a sample code.
My client-certificate is stored in Windows certificate store. How can I establish the connection with this certificate?

SSRS Server Web Service using 2-Way SSL - Error : HTTP Error 403.7 – Forbidden

I have tried various configuration settings but still no luck
I’m getting the below error when I tried to run a report from SSRS server.
HTTP Error 403.7 - Forbidden
The page you are attempting to access requires your browser to have a Secure Sockets Layer (SSL) client certificate that the Web server recognizes.
processing!ReportServer_0-2!1084!03/26/2015-13:21:18:: e ERROR: An exception has occurred in data set 'DistributionComponents'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'xComponents'. ---> Microsoft.ReportingServices.DataExtensions.XmlDP.XmlDPException: Failed to execute web request for the specified URL.
Forbidden: The remote server returned an error: (403) Forbidden. ---> System.Exception: The remote server returned an error: (403) Forbidden.
Setup:
Configuration:
WCF Service:
In the WCF Service I have bindings configured as Transport, and the pretty much like described in the below article
http://www.codeproject.com/Articles/348595/Use-Mutual-SSL-Authentication-in-WCF
I can browse to the service and view WSDL without no issues. I have also checked the WCF trace and no errors.
SSRS Web Service Configuration:
SSRS Web Service Data Source has been configured to execute the HTTPs WCF Web Service URL.
SSRS also configured to use a valid SSL Certificate.
I can access the ReportsManager URL and View reports successfully using HTTPs URLs.
I have tried many configuration settings, including disabling the firewall and virus scans still no luck. I have also search on the Web but there is no much direction on this particular issue.
Can some please point me to the right direction?
To be more precise I would have said the SSRS installed in the Native mode. Nevertheless I figured it out that this is not supported. In other words 2-Way SSL between SSRS (acting as a Client) and the WCF (Service) is not supported.

cfhttp unable to read data from https sites even after importing the certificate

I have ColdFusion 9 installed on my system.
I need to read data from an SSL encrypted site (https). I have followed all the steps described in CF documentation.
That is:
Go to a page on the SSL server in question.
Double-click the lock icon.
Click the Details tab.
Click Copy To File.
Select the base64 option and save the file.
Copy the CER file into C:\ColdFusion8\runtime\jre\lib\security (or whichever JRE ColdFusion is using).
Run the following command in the same directory (keytool.exe is located in C:\CFusionMX7\runtime\jre\bin):
keytool -import -keystore cacerts -alias giveUniqueName -file filename.cer
In CMD, it showed "certificate was added successfully"
But it is still showing the same error peer not authenticated.
Is there anything more required?
If you are trying to call web services in CF 11 (and maybe 10 but check that yourself), CF expects the web service or any CFHTTP call to use the WebSocket Service and port 8577 in a standard setup. This is because the WebSocket Services have been optimized for web services and CFHTTP also uses WebService Sockets.
I run CF 11 on my IIS server and port 8577 is blocked by a firewall. When I tried to connect, it sends back this error for CFHTTP and web services:
"I/O Exception: sun.security.validator.ValidatorException: PKIX path
building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target"
It would seem like it requires adding custom certificates to the CACERT for JRE, but that is not the solution for me.
There is a simple fix to get this running with IIS (at least IIS) if you do not want to unblock the WebSocket Service and you don't need that performance to run natively. All you have to do is go in to the CF Admin dashboard and change the WebSocket Service to "Use Proxy". This will send all calls to the CF WebSocket Service or CFHTTP through IIS as a proxy. Restart the CF Application Server service and it should work just fine. If these directions are not perfect I apologize but it will lead you to get it working. See also Using WebSocket with ColdFusion 11.
Although the documentation doesn't specifically mention it, restarting the ColdFusion service is required. If you haven't already, that should be the first thing you try.

Secure Webservice Client on Glassfish

I have an secure external webservice at URL https://my-webservice-path?wsdl, and i want to connect to use this. This is a 2-way ssl.
I create a webservice client in following:
Create an java application Application1
at Project window, click Application1 icon -> new -> Web service client
paste my URL at WSDL URL, client type is JAX-WS, package: com.mypackage
finish
But an error appears: Error: An I/O error occured. Received fatal alert: handshake_failure
And i can not create Web Service References. I use Glassfish 3.0.1 server.
I tried to replace the alias s1as in keystore.jks and cacerts.jks of the Glassfish by my keypair and certificate, but it still fails.
I also tried to use wsimport parsing wsdl file but fail:(
I posted this question in Oracle Forum at http://forums.oracle.com/forums/thread.jspa?threadID=2214292&tstart=0 but get no answer.
i've tried to solve this for 2 days :(
What can i do now to solve this problem?
Plz help me, thank you!
please check out the answer from Catchwa in Mutual-authentication with web services. The steps to implement a glassfish based mutual authentication are described in detail.

what is the use of creating proxy for an webservice

i have an webserivce written where i do an insertion opertion to DB.
path :http://localhost:1838/Ajax/WebService.asmx?wsdl.name of the webservice is localhost
i have added webservice for the project
now on button click event i try to call this webserice like this
localhost obj= new localhost();
obj.insert();
now i am able to do the insertion operation fine.
but i wanted to create an proxy for the webservice so wat is the use of it doing like tat?
when i run this command in my command prompt in vs
wsdl /out:myProxyClass.cs http://localhost:1838/Ajax/WebService.asmx?WSDL
i get an error
unable to connect the remote server.
no connection would be made because
the target machine actively refused
it
looking forward for an solution any help would great
thank you
It looks like you are using the built in develoment webserver (Cassini). Are you sure it was running when you issued the wsdl command ? The tool needs to connect to the service and download metadata, in order to generate your proxy.