Unable to connect to the remote server

Unable to connect to the remote server

  

Hi Guys,


I'm trying to consume a very basic SOAP web service that I created to return "hello world" message a works fine in the browser and WSDL file as well, but consuming it in my Service Studio app is giving me "Unable to connect to the remote server" error, any reason why?



Thanks

   

Hi john,

What do you mean by "a works fine in the browser and WSDL file as well"?

Do you have any kind of internet problem? Are you behind firewall or proxy? Are youe environment accessible? The service you create is located where? How did you created it?

Cheers

Eduardo Jauch


I've created and exposed the webservice with ASP.Net and when I run it, it populate in the browser with no issues.

Not sure what you mean where is located, but given that is developed in .Net, the project would be in mydociument/VS2010/projects or do you mean that I have to publish it in IIS!?

I also create another SOAP WS using another technology called Cache Intersystems and service looks good, but get the same error when consuming it in Service Studio?



thanks Eduardo




Hi, 

You say you test it on browser. How do you do it if it is not in a web server?

For OutSystems to consume a web service, it must be in a web server, under IIS, in the case the web service is built using dot net.

Cheers

Eduardo Jauch

"You say you test it on browser. How do you do it if it is not in a web server?"

When I created the WS I ran the project (F5) and the result was of course in a browser "http://localhost:51251/Calculate.asmx" showing my WS method that what I meant. 


For OutSystems to consume a web service, it must be in a web server, under IIS, in the case the web service is built using dot net.

I've published my WS in IIS, but since my web service project only have .asmx file not sure how I could test it in a browser because (http://civdev2/WebServiceTest/WebServiceTest/WebService.asmx) didn't show me my method or anything, so I tried to consume the WS with this URL and came up an error "Could not access resource WSDL" so how can I add the WSDL description to my project in IIS?

So I'll google around and see how to publish WS in IIS.


thanks


Thank you very much Eduardo, I'm getting closer now, I've Deployed my WS into IIS and working fine through it using "http://civdev2/WSTest/Calculate.asmx" where civdev2 is my machine and show me WS method & WSDL file, than changed the URL in my Service Studio project for my consumed WS but now I'm getting this error: The remote name could not be resolved: 'civdev2'.

any ideas?

by the way the top attribute in my webservice is :[WebService(Namespace = "http://civicview.com/badis")]

should that be changed to my WS URL in IIS?


Thanks

 


By the way this is step by step on how i consumed the WS in SS:

  • In integration : consume SOAP WS, and URL : http://civdev2/WSTest/Calculate.asmx?wsdl that generated my WS, "HellowWorld" method and output 
  • Interface: created a Web screen, Preparation added (Run Server Action) and added "HellowWorld" method from my SOAP WS.
  • Interface: added a label and selected Value as HellowWorld.HellowWorldResult output (also tried Expression instead of Label)  
  • Publish and run and get "The remote name could not be resolved: 'civdev2'" error.

Thanks

Hi john,

When you are first creating the integration, it is Service Studio on your local machine that is connecting to the URL, and fetching the WSDL, and as you ended up with a new WS method action it seems to have worked.

When you are running your OutSystems applications that call the WS method, it is IIS on your server that is connecting to the URL, and is failing because the machine where IIS is running cannot map the 'civdev2' name to a server machine where the WS is running.

Given the error message clearly states it cannot resolve the 'civdev2' remote name, you will have to provide it with a hostname that the server where IIS is running can resolve. I see two options, and typically would use the first:

  1. Change the URL you used to setup the SOAP integration in Service Studio so it uses a hostname that can be resolved by both your server and your local machine;
  2. Go to the ServiceCenter, and on your module's page open the Integrations tab and change the Effective URL for your consumed SOAP WS to use a hostname that can be resolved by your IIS server.

Hope this helps!

"When you are running your OutSystems applications that call the WS method, it is IIS on your server that is connecting to the URL, and is failing because the machine where IIS is running cannot map the 'civdev2' name to a server machine where the WS is running."


The hostname and server name in IIS is actually civdev2, and if IIS is failing why calling through "http://civdev2/WSTest/Calculate.asmx" is working!? and actually I was able to access the ws from another machine in our network using the same URL through a browser?




Thanks

Hi john,

Just a question.

Is the IIS and your web service in your LOCAL machine?
And your application is being developed in a Personal Environment, a Cloud Environment or an Enterprise Environment in ANOTHER machine?

When I try to reach the web service address, I get the following response:

This tells me that civdev2 is a "local" name to your machine, it isn't a "public domain". You are resolving it locally. It is not reachable from the internet.

This would explain why the Service Studio (in your local machine) can consume the web service, but the application (on a different machine), can't reach it, as the call to the web service methods, when you are running the application, are done in the application server, not locally in the browser.

Cheers,
Eduardo Jauch

Yes you are right, the application is being developed in Service studio personal environment and with the WS in my local machine, at this stage I'm still development and testing to see if we could get a Service Studio app to work with Web services and "http://civdev2/WSTest/Calculate.asmx" accessible in our Intranet network. 

We currently have a software that we provide for our Councils developed with ASP.net with a DBMS called Cache Intersystems, and given that Cache connection is not supported in SS and Integration SDK is not the best solution for us, the decision has been made to use Web services instead.

Cache Intersystems as Powerful and Complex DBMS has the ability to create, consume and expose web services so we are creating web services with our back end functions and method and exposing them to be consumed in Service studio.

So can we access a web service using a local URL, as in many case both Database and the application will be hosted in the same network? Or how can we publish the web service to accessible with SS app?


Thanks 

 

Solution

Hello John,

Service Studio is just a development tool. It does not have the ability to run the application.

The application will run only in an OutSystems server with an IIS if you're working on a dot net stack. 

As you are running the application in a personal, the web service must be reachable by internet, as you do not have access to the server where the app is.

You have two options.

1. Expose your web services publicly so the application can reach them.

2. Get a on premises license and install the platform in the same server/network where your web service is, as the application itself can reach local web services.

Another option would be to detach the application from OutSystems. You would end up with an application that would run directly in an IIS server. But I think this option is not available to personal environments.

Cheers,

Eduardo Jauch

Solution

I recommend this reading to understand better how the platform works.

https://success.outsystems.com/Evaluation/Architecture

Cheers

Eduardo Jauch

Thanks Eduardo.


Cheers