Akana API gateway is not working for secured SOAP services - api

In Akana API Gateway, I am trying to setup a Proxy API for invoking SOAP service which is Secured(BASIC Authentication). When I tried to invoke the Proxy API from Test Client, it is not invoking the Target service.
It is showing the 503 service unavailable Error. However, It is working fine when I invoke the target service from SOAP UI.(I passed BASIC Authentication credential in SOAP UI)
I even tried, invoking the Proxy API from SOAP UI and passed the BASIC Authentication credential. Still I get the same error. ie., 503 service unavailable Error
Here is the error details
Cause: Binding component error encountered. HTTP Error [503:Service Unavailable] when accessing the URI [http://url]
Could any one please help.

I managed to resolve this issue.
It was due to the incorrect Protocol. The WSDL URL is HTTPS. After importing the WSDL, the auto generated operation endpoint has HTTP.
After modifying the endpoint URL manually from HTTP to HTTPs, it worked.

Related

WCF CORS issue - WPF application successfully connects but Angular App throws 405

I have a question about enabling cross-domain calls.
I have a WCF Rest service that is hosted in xyz domain. I am able to test these REST APIs from Advanced Rest Client, Postman and Fiddler. I also have a WPF application that actively calls these API which is hosted in a different domain (say abc domain) which works fine in getting responses.
However, when I created a new Angular web application and a Windows Service (deployed on abc domain), and tried calling the APIs from these two components, I am getting a 405 error.
Can someone explain:
How REST clients always are able to successfully establish a connection?
How does my WPF successfully connects to the WCF service even though
its on a different domain?
Why is my Windows Service/Web App not able to talk to WCF?
I assume that the issue here is caused by the preflight request. The browser issues this OPTIONS verb request to ask the server if the origin is allowed to call the API in a non-safe manner.
If your WCF REST service does not deal with this request, the WCF runtime will try to dispatch the request to your service implementation.
However, if the runtime does not find a method to call for this verb, it will return a 405 Method Not Allowed response.
I've dealt with this in the past by using an IOperationInvoker implementation, installed via an IOperationBehavior. This article describes a slightly different way of doing basically the same.

An error occurred while receiving the HTTP response to ''. This could be due to the service endpoint binding not using the HTTP protocol

I am getting the below error while trying to call an external service from my service which was hosted in IIS .
Error : An error occurred while receiving the HTTP response to ''. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
And I am not getting any error while trying to call the same external service from a console application.
Any suggestions will help. Thanks in advance.
Issue is with the firewall. When i try to call the external service from console application, the service call going through without any errors, as there was no IIS involved in calling the service. But when i call the external service from another service hosted in IIS, firewall comes to the picture.

WCF Test client and authentication

I'm trying to call a webservice with WCF Test Client but the webservice requires authentication.
How do I log on and call it by WCF Test Client (I tried to get it from browsers and then to call but does not work). I could use SOAP UI, but I'd like to do it with WCF Test Client if is possible. Maybe changing WCF config?
Error: Cannot obtain Metadata from If this is a Windows (R)
Communication Foundation service to which you have access, please
check that you have enabled metadata publishing at the specified
address. For help enabling metadata publishing, please refer to the
MSDN documentation at
http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange
Error URI: Metadata contains a reference that cannot be
resolved: ''. The HTTP request is unauthorized with client
authentication scheme 'Anonymous'. The authentication header received
from the server was 'Basic realm=""'. The remote server
returned an error: (401) Unauthorized.HTTP GET Error URI:
There was an error downloading ''. The request failed with
HTTP status 401: Unauthorized.
Do you have a mex endpoint specified in your config?
If you're having setup issues I'd suggest reading through the Codeplex applications scenarios to ensure you have setup your service and WCF Test Client properly.
Please post configs and some sample code if you require any further help.
EDIT:
These links may provide some insight in to the issue:
WCF - Cannot obtain Metadata, but works when the XML Endpoint is removed?
Cannot obtain Metadata from WCF service when using Microsoft WCF Test Client.

HTTP Errors while consuming non-WCF Web Service using a WCF Client

I am trying to consume a third party web service, which is developed not in .NET but in some other langauge (may be in Java). I am trying to consume the service from WCF Client. But while adding Service reference it is throwing a error:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'basic realm="EXTRACT-CREDENTIAL"'.
Also when I am hitting the service URL in a browser it's throwing an error as follows:
HTTP GET Requests are not supported by the broker. Please use HTTP POST instead
What could be the way to consume the service from WCF client?

Silverlight WCF Service to Service calls

Question:
Are there known issues making calls to a service that calls another service from Silverlight?
Scenario:
I have the following 3 projects:
SilverlightClient - Silverlight project with a Button
SilverlightClient.Web - A web application that hosts the SilverlightClient.xap.
BackEnd - A different web application that hosts the FOO Service which does some special backend processing.
I have created a Silverlight WCF-Enabled web service in both SilverlightClient.Web and Backend. These are respectively SilverlightClientService and BackEndService.
From SilverlightClient.Web I add a service reference to BackEndService. I have a test ASPX page that I've written code that calls BackEndService successfully.
From SilverlightClient I add a service reference to SilverlightClient.Web's SilverlightClientService. If my SilverlightClientService returns plain data, such as a string, it works quite well.
The moment, however, that I change SilverlightClientService to call BackEndService, I get the following exception:
HTTP 415 - "The request failed with HTTP status 415: Unsupported Media Type."
I had an issue with 2 services not communicating. We finally figured out that using Cassini (the built in Visual Studio IIS) to host the ListenerService 'BackEnd' was causing the problem. Switching the project to start in a virtual directory of IIS allowed the two to communicate.
I was seeing : An error occurred while receiving the HTTP response to http://localhost:1484/MainListenerService.cs. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. and this error:
The HTTP request was forbidden with client authentication scheme 'Anonymous'.
Are you using basicHttpBinding? Silverlight only supports basicHttpBinding but the default when you create a WCF service is wsHttpBinding. You should change that on your web.config before adding the reference on your Silverlight project. Check out this video from Tim Heuer: http://silverlight.net/learn/videos/all/how-to-consume-wcf-and-aspnet-web-services-in-silverlight/