Webservice error

  

I've developed an Extension to access a remote webservice.  I've used EnhancedWebReferences to SetWebReferenceURL and SetWebReferenceCredentials using the same WebReferenceName as in the Extension.  (Also, this URL and these credentials worked just fine when I was accessing a small subset of the service which I could achieve just using native OutSystems functionality "Consume SOAP Web Service...)

I'm now getting these two errors on the stack:

[1] Unable to connect to the remote server
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

[2] No connection could be made because the target machine actively refused it [::1]:4000
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

Any thoughts on how to proceed?

Thanks

Stuart

Hi Stuart,

With the Extension you developed, are you able to successfully consume any of the webservice methods directly?


Cheers,

Tiago

Tiago Neves wrote:

Hi Stuart,

With the Extension you developed, are you able to successfully consume any of the webservice methods directly?


Cheers,

Tiago

Hi Tiago thanks for getting back to me.

No, not a thing.  I can get no further than the error message: 

No connection could be made because the target machine actively refused it [::1]:4000

Any idea what "[::1]:4000 " means and where it comes from?

How did you create the Extension?

Did you follow these tips here: Import Web Services from a .NET Assembly?

"[::1]:4000" is the address and port that it's trying to connect to.

No.  I followed this approach:

https://success.outsystems.com/Documentation/Development_FAQs/How_to_consume_a_Web_Service_in_Integration_Studio

If that is the full address and port then it appears that the error message text "target machine actively refused" is twaddle since that is not a server name.

Thanks again

Tiago Neves wrote:

How did you create the Extension?

Did you follow these tips here: Import Web Services from a .NET Assembly?

"[::1]:4000" is the address and port that it's trying to connect to.

Hi Tiago

I've now tried the .NET Assembly route.  I like what it gives me - and I'm still unable to work out what is the WebReferenceName required by EnhancedWebReferences under this scenario.  Any ideas?

Thanks


Hi Stuart,

It should just be the name you see on Service Studio for that Web Service. This information is also available from Service Center, on the Integrations tab of the module/eSpace screen.

Is that what you're using?

Hi Tiago

I'm trying to follow your advice and getting nowhere fast.

I have created a new module.

I have followed the instructions you recommended in "Import Web Services from a .NET Assembly" to add the extension as a dependency.  I have dozens of methods and structures but no Web Service.  Under this scenario, how, when, and where is it created and managed so that I can set url and authentication at run time?

In an earlier version I imported the Web Service as its wsdl directly into a module as a SOAP integration and could access it with the help of EnhancedWebReferences.  As soon as I attempted anything complex I got the "cannot be reflected error" which nobody inside OutSystems has ever got back to me about.

It seems like a quite straight forward thing to want to do.

Thanks for your help thus far


Hey Stuart,

Did you submit a ticket with this "cannot be reflected error"?

It's hard for me to say with just the above information. I'll nudge someone at OutSystems to help.


Tiago Neves wrote:

Hey Stuart,

Did you submit a ticket with this "cannot be reflected error"?

It's hard for me to say with just the above information. I'll nudge someone at OutSystems to help.


Yes I did and that's an entirely different issue.  Why would I need to do both things? The .net assembly and the SOAP service?


Not sure if it's your problem or actual network problem.


1. can you trace the network to see if the call is actually sent out? (wireshark for example)

2. can you check the server which you are targeting to see why it's refusing your webservice-call?


Tiago Neves wrote:

Hey Stuart,

Did you submit a ticket with this "cannot be reflected error"?

It's hard for me to say with just the above information. I'll nudge someone at OutSystems to help.


Here's my original post on the "can not be reflected" issue.  

https://www.outsystems.com/forums/discussion/19917/method-wrefevaluationservice-evaluate-can-not-be-reflected/ 

Kilian Hekhuis tried to help then but nobody from OS ever got back to me.  


J. wrote:

Not sure if it's your problem or actual network problem.


1. can you trace the network to see if the call is actually sent out? (wireshark for example)

2. can you check the server which you are targeting to see why it's refusing your webservice-call?


Hi J. and thanks for chipping in

1. No. I'm using OS environment in the cloud so I have no access to install wireshark there and trace anything.

2.  Yes.  There is no evidence in any log on that server of it receiving any request from the OS environment ip address let alone actively refusing it.  Besides which it's hard to believe that "[::1]:4000" constitutes a valid server id.  I seriously doubt the integrity of that error message.


Hey Stuart,

That was like a couple of years ago   Maybe that's why someone at OutSystems was telling me they couldn't find any ticket. Was it just a forum post then?


Anyways, I'm a bit lost now... Were you just trying to test how to use EnhancedWebReferences or was there a reason to take that route?

OFFS!

I have done what you recommended I do: vis import a web service from a .net assembly.

How do I call it using url and authentication determined at run time?



Whenever you use a method from the extension you created you'll have to do something like the image below, using in this case a WebReferenceName called "GoogleSearchService" (you have to use the OutSystems name, not the original one).

Just for illustration purposes, in this simple example I'm not assigning any results...


Tiago Neves wrote:

Whenever you use a method from the extension you created you'll have to do something like the image below, using in this case a WebReferenceName called "GoogleSearchService" (you have to use the OutSystems name, not the original one).

Just for illustration purposes, in this simple example I'm not assigning any results...

Thanks... I'll give it a go


Tiago Neves wrote:

Whenever you use a method from the extension you created you'll have to do something like the image below, using in this case a WebReferenceName called "GoogleSearchService" (you have to use the OutSystems name, not the original one).

Just for illustration purposes, in this simple example I'm not assigning any results...

Clearly I'm still missing a trick here.

I have imported identical wsdl both via a .NET Assembly as an Extension and as a SOAP integration exactly as you show in the image.

The SOAP service action rejects any parameter created via an action in the Extension.  

The SetWebReference actions will only refer to the SOAP service.

Using the action in the extension completely ignores the SetWebReferences.

So what's the trick?

If, from your image, you used the Extension Action GoogleSearchDoGoogleSearch, and passed it DirectoryCategory_New result (if that's the right combination) would you expect it to execute?

I must be missing something.