# Proxing webservices (Webservices, WSDL, SOAP)

**URL:** <https://www.ruby-forum.com/t/proxing-webservices-webservices-wsdl-soap/225797>\
**Category:** NGINX\
**Created:** [January 30, 2013, 12:57pm UTC](https://www.ruby-forum.com/t/proxing-webservices-webservices-wsdl-soap/225797 "2013-01-30T12:57:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSkonishi\_takurou\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSkonishi\_takurou\_S](https://www.ruby-forum.com/u/SSkonishi_takurou_S)\
**Post date:** [January 30, 2013, 12:57pm UTC](https://www.ruby-forum.com/t/proxing-webservices-webservices-wsdl-soap/225797/1 "2013-01-30T12:57:14Z")

</div>

What is the correct way to proxing to any remote webservice? How to use  
nginx in front of IIS or other web server, who serves webservices?

As an example we have any remote SOAP webservice at  
[http://B:8089/getClientService/getClientService?wsdl](http://B:8089/getClientService/getClientService?wsdl). In SOAP document  
of  
these webservice we have endpoint location:  
…  
  
  
\<soap:address  
location=“[http://B:8089/getClientService/getClientService](http://B:8089/getClientService/getClientService)”/\>  
  
  
…

If we use proxy\_pass:

server {  
listen 80;  
server\_name A;  
location /{  
proxy\_pass [http://B:8089/](http://B:8089/);  
}

nginx won’t rewrite(or change) SOAP’s endpoint address to itself, so any  
futher SOAP requests will fail, because requesting side makes request to  
direct host described at SOAP endpoint location ☹

Thanks

Posted at Nginx Forum:

> **[Proxing webservices (Webservices, WSDL, SOAP)](https://forum.nginx.org/read.php?2,235730,235730#msg-235730)**
>
> What is the correct way to proxing to any remote webservice? How to use nginx in front of IIS or other web server, who serves webservices? As an example we have any remote SOAP webservice at http://B:8089/getClientService/getClientService?wsdl. In...

---

<div class="post-metadata">

**Author:** ![pricne5](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecc23a/32.png) [@pricne5](https://www.ruby-forum.com/u/pricne5)\
**Post date:** [February 11, 2013, 3:57pm UTC](https://www.ruby-forum.com/t/proxing-webservices-webservices-wsdl-soap/225797/2 "2013-02-11T15:57:44Z")

</div>

On Jan 30, 2013, at 3:57 PM, pricne5 wrote:

> ```
> <soap:address
> location /{
> proxy_pass http://B:8089/;
> 
> ```
> 
> }
> 
> nginx won’t rewrite(or change) SOAP’s endpoint address to itself, so any  
> futher SOAP requests will fail, because requesting side makes request to  
> direct host described at SOAP endpoint location ☹

You want to change “soap:address” URL on-the-fly to point next SOAP  
request(s) to [http://A:80/getClientService/getClientService](http://A:80/getClientService/getClientService), right?

Did you try sub\_module?

> **[Module ngx\_http\_sub\_module](http://nginx.org/en/docs/http/ngx_http_sub_module.html)**
