Forum: NGINX Proxing webservices (Webservices, WSDL, SOAP)

Posted by pricne5 (Guest)
on 2013-01-30 12:57
(Received via mailing list)
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 SOAP document 
of
these webservice we have endpoint location:
  .....
      <service name="getClientService">
                      <port name="getClientService"
binding="tns:getClientServiceBinding">
                                <soap:address
location="http://B:8089/getClientService/getClientService"/>
                     </port>
      </service>
  .....

If we use proxy_pass:

server {
         listen 80;
         server_name A;
         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 :(

Thanks

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,235730,235730#msg-235730
Posted by Andrew Alexeev (Guest)
on 2013-02-11 15:57
(Received via mailing list)
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, right?

Did you try sub_module?
http://nginx.org/en/docs/http/ngx_http_sub_module.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.