So Close!!

For those following the saga, it’s nearly at an end :stuck_out_tongue: After they checked the IIS log files they found my communication were coming over port 80, not 443. Simple fix right? Just add “:443” to the end of the address. Well, not really as this partial address shows from their logs:

It looks like it’s determined to send it on port 80 and automatically tacks it onto the end. I’m using a straight WebRequest now, and just need to know how to get rid of that trailing " 80" that it wants to add for some odd reason. I’ve yet to find any mention in any of the documentation about this behavior. Thanks in advance.

Setting the port in HttpWebRequest.Create() doesn’t work?

Using a straight WebRequest, not the HTTP version as shown below:

Is soap.SoapUrl a string? Maybe try backdooring a URI instead of a string?

This code is super ugly:

Uri u = new Uri(soap.SoapUrl);
UriBuilder ub = new UriBuilder(u);
ub.Port = 443;
u = ub.Uri;

WebRequest request = new WebRequest(u);

Yes, it’s a string. I’ll try your suggestion and post the results in a moment.

Results are odd:

If I duplicate the previous call and try to use .Create, it says there’s no such method in the class. Weirdness %)

I was just thinking, could it be something to do with running 3.3 on a Mac? They want it done in 3.3 and I’ve seen a number of discussions about using HTTPWebRequest, but it doesn’t seem to be supported in 3.3, at least not in System.Net where it’s expected.

For that matter if anyone can determine where the " 80" is coming from that would be a huge help. As it is, I can’t determine where that’s being added. As I see it, there are two end results that could work

  1. Kill the " 80"
  2. Substitute " 443" for the " 80" and remove the “:443”

The example of a properly formed request I was sent (The key part anyway)

What the server is showing I’m sending

Using this code:

WebRequest typically shouldn’t be instantiated via a constructor, hence the Create() method. Perhaps Mono is missing the Create overload that takes a Uri object? What is the value of soap.SoapUrl?

http://protectpaytest.propay.com/API/SPS.svc:443 stored as a string. That trailing 80 is just odd to me. Could it be that there’s an issue in the parsing causing it to miss the port number entirely so it simply adds the default 80 to it?

Shouldn’t it be “http://protectpaytest.propay.com:443/API/SPS.svc” ?

Heh. True that :stuck_out_tongue: Oddly, correcting it results in it timing out with nothing showing in HTTPScoop as being sent out.

Interesting. If I drop that address (http://protectpaytest.propay.com:443/API/SPS.svc) into a web browser, it also doesn’t register anything in HTTPScoop.

I’m an idiot…443 is the default https port.

Perhaps “SPS Service” would work better.

We WILL figure this out, because I’m just annoyed at it now.

Ditto here. On a Mac so couldn’t use scvutil to just generate their functions, so had to do the soap envelope manually. That works flawlessly, it’s just getting it to play nice with their server.

Well that change gives:

Changing the type yields

Sounds like it’s time to call them again :stuck_out_tongue: Just odd it would work that way since the address they provided is the http, not https. Go fig :stuck_out_tongue:

Wow. On further experimentation, changing it to https results in nothing showing up on HTTPScoop as having been sent out.

HTTPScoop needs some fiddling to capture SSL packets.

http://www.tuffcode.com/support.html#support7

Ah. So the requests are probably going out, but it’s not spotting them. That’s good news at least, although it does mean that I’m going to have to wait for them to call back to find out what’s happening on their end in terms of the data. I really hate not having direct access to the data I need :confused:

If you’re getting error 500 back then it’s definitely going out to their server. It could be an SSL certificate issue, in which case a workaround such as this might be your ticket.

After adding above code, I’m still getting the 500 error. Shame too since I was really hoping that would solve it. Getting tired of this section of code >.<

According to the tech, the important part of the call is still coming in as

So let’s try a different approach. Here’s the code as it now stands in all its troublesome glory :stuck_out_tongue:

If there’s no way to get rid of that trailing 80 it wants to keep adding under the Unitron editor with Unity 3.3 and WebRequest, what’s an alternative that will work? I’ve already attempted to use an HTTPWebRequest, but even with System.Net included, Unity declares it to be unknown.

Solved :slight_smile: It just needed a key/value pair in the header for the “SOAP Action” :stuck_out_tongue: