Note that there are some explanatory texts on larger screens.

plurals
  1. POWebService behind reverse proxy
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/DIq1s.jpg" alt="enter image description here"></p> <p>I have a web service which is behind a reverse proxy. Now what is happening is when I try to add a web reference to test the web service then it says that it is unable to download the wsdl file. That is because when the request is sent it it is <a href="https://uat.mywebservice.com/Service/Service.asmx" rel="nofollow noreferrer">https://uat.mywebservice.com/Service/Service.asmx</a> but when it hits the reverse proxy and then tires to download the wsdl and disco files it changes the link to <a href="http://myservice.comp.com/Service/Service.asmx?wsdl" rel="nofollow noreferrer">http://myservice.comp.com/Service/Service.asmx?wsdl</a> and it this is not the right link as myservice.comp.com is just a name space on reverse proxy. What is happening is headers in the soap file are getting updated to this namespace instead of the actual host name which is uat.mywebservice.com , I was able to see this using fiddler disco file has incorrect address. I had a worked out by creating a proxy class using wsdl.exe tool and then updated all the incorrect links in that class to right host name. </p> <p>Is there any way that I can make sure the address remains correct when hitting the reverse proxy.</p> <p><strong>Incorrect:</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; - &lt;discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"&gt; &lt;contractRef ref="http://mvwebservice.comp.com/Service/Service.asmx?wsdl" docRef="http://mvwebservice.comp.com/Service/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /&gt; &lt;soap address="http://mywebservice.comp.com/Service/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;soap address="http://mywebservice.comp.com/Service/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;/discovery&gt; </code></pre> <p><strong>Correct</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; - &lt;discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"&gt; &lt;contractRef ref="https://uat.mvwebservice.com/Service/Service.asmx?wsdl" docRef="https://uat.mvwebservice.com/Service/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /&gt; &lt;soap address="https://uat.mywebservice.com/Service/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;soap address="https://uat.mywebservice.com/Service/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;/discovery&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload