Dynamic wsdl

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic wsdl

Andrea Cappelli
Hi list,
I'm newbie of Axis

I started managing an old app using Axis2 1.5.3 that runs on jetty 9.1.3
which listen http on a specific port furthermore; the app is proxied on
port 443 by apache2.2 using a proxypass directive for "public" use and
on port 80 on a local (private) address

My problem is that I would have the wsdl dymamic generated (with correct
endpoint) based on the "intermediate" source the request come from
(direct from jetty, apache on 443, apache on 80)

Let me explain with an example

1) I have a server with 2 interfaces, one public (IP 1.1.1.1) and one
private (IP 192.168.1.1)
2) jetty runs on port 8090 on the private IP
3) apache runs port 443 on public interface (ServerName
publicdomain.com) and 80 on private interface (with ServerName domain.local)
4) the app is called myapp and exposes a service myservice
5) In apache vhost I set ProxyPreserveHost and a ProxyPass like /myapp
http://192.168.1.1:8090/myapp
6) apach

What I want is that
1) when someone hit https://domain.com/myapp/services/myservice?wsdl the
endpoint in wsdl contains https://domain.com:443/myapp/services/myservice
2) when someone hit http://domain.local/myapp/services/myservice?wsdl 
the endpoint in wsdl contains
http://domain.local:80/myapp/services/myservice
3) when someone hit
http://domain.local:8090/myapp/services/myservice?wsdl the endpoint in
wsdl contains http://domain.local:8090/myapp/services/myservice

How can accomplish this?

Thank you

--
Andrea Cappelli


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Dynamic wsdl

Martin Gainty
 
> Date: Thu, 17 Apr 2014 08:35:39 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: Dynamic wsdl
>
> Hi list,
> I'm newbie of Axis
>
> I started managing an old app using Axis2 1.5.3 that runs on jetty 9.1.3
> which listen http on a specific port furthermore; the app is proxied on
> port 443 by apache2.2 using a proxypass directive for "public" use and
> on port 80 on a local (private) address
>
> My problem is that I would have the wsdl dymamic generated (with correct
> endpoint) based on the "intermediate" source the request come from
> (direct from jetty, apache on 443, apache on 80)
>
> Let me explain with an example
>
> 1) I have a server with 2 interfaces, one public (IP 1.1.1.1) and one
> private (IP 192.168.1.1)
> 2) jetty runs on port 8090 on the private IP
> 3) apache runs port 443 on public interface (ServerName
> publicdomain.com) and 80 on private interface (with ServerName domain.local)
> 4) the app is called myapp and exposes a service myservice
> 5) In apache vhost I set ProxyPreserveHost and a ProxyPass like /myapp
> http://192.168.1.1:8090/myapp
> 6) apach
>
> What I want is that
> 1) when someone hit https://domain.com/myapp/services/myservice?wsdl the
> endpoint in wsdl contains https://domain.com:443/myapp/services/myservice
> 2) when someone hit http://domain.local/myapp/services/myservice?wsdl
> the endpoint in wsdl contains
> http://domain.local:80/myapp/services/myservice
> 3) when someone hit
> http://domain.local:8090/myapp/services/myservice?wsdl the endpoint in
> wsdl contains http://domain.local:8090/myapp/services/myservice

MG>Port Address translation or PAT is explained at
MG>http://www.dslreports.com/faq/13449

MG>Cisco has ASA-5500 ADSM Product which will configure NAT/PAT for IP access outside of your DMZ
MG>http://www.cisco.com/c/en/us/td/docs/security/asa/asa83/asdm63/configuration_guide/config/public_servers.html
 

> How can accomplish this?
>
> Thank you
>
> --
> Andrea Cappelli
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic wsdl

Andrea Cappelli
Il 17/04/2014 15:28, Martin Gainty ha scritto:
 
MG>Port Address translation or PAT is explained at
MG>http://www.dslreports.com/faq/13449

I know what PAT is, but seems to me that it ha nothing to do with the matter of this thread

MG>Cisco has ASA-5500 ADSM Product which will configure NAT/PAT for IP access outside of your DMZ
 

Except that I don't have any Cisco product (only Linux VM), I don't understand how this is related to my question.

I only need to now if there are some configurations that let me change protocol and port used inside WSDL in a dynamic way

Best regards

-- 
Andrea Cappelli
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic wsdl

Jeff Greif
This is a speculation, not a definitive answer.  The ?wsdl URL is handled by the Axis servlet, so if no other way was found, you could introduce a servlet filter that used an XSLT, or some other technique to transform whatever normally comes out of the ?wsdl URL.


On Thu, Apr 17, 2014 at 7:18 AM, Andrea Cappelli <[hidden email]> wrote:
Il 17/04/2014 15:28, Martin Gainty ha scritto:
 
MG>Port Address translation or PAT is explained at
MG>http://www.dslreports.com/faq/13449

I know what PAT is, but seems to me that it ha nothing to do with the matter of this thread


MG>Cisco has ASA-5500 ADSM Product which will configure NAT/PAT for IP access outside of your DMZ
 

Except that I don't have any Cisco product (only Linux VM), I don't understand how this is related to my question.

I only need to now if there are some configurations that let me change protocol and port used inside WSDL in a dynamic way

Best regards

-- 
Andrea Cappelli

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic wsdl

Andrea Cappelli
Il 17/04/2014 18:05, Jeff Greif ha scritto:
> This is a speculation, not a definitive answer.  The ?wsdl URL is
> handled by the Axis servlet, so if no other way was found, you could
> introduce a servlet filter that used an XSLT, or some other technique
> to transform whatever normally comes out of the ?wsdl URL.
>

Uhm,
can you give more info on this matter?

I can perform the trasformation reading an http header? Can you point me
to some documentation?

--
Andrea Cappelli


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic wsdl

Jeff Greif-2
Your servlet filter (javax.servlet.Filter) has access to the
HttpServletRequest, which contains the necessary information about the
source of the request.

The code of your filter's doFilter method would look at the URL (and
invoke the rest of the filter chain unless it had the parameter ?wsdl).
 Then it could look at the source IP address from the headers.  When it
invokes the rest of the filter chain (the Axis servlet) and gets back
the response, based on the source IP it can either transform the result
or not.  To transform the source, it can use a filter stream that does a
regex replacement as the response is sent, or an XSLT.

Jeff

On 4/17/2014 10:18 AM, Andrea Cappelli wrote:

> Il 17/04/2014 18:05, Jeff Greif ha scritto:
>> This is a speculation, not a definitive answer.  The ?wsdl URL is
>> handled by the Axis servlet, so if no other way was found, you could
>> introduce a servlet filter that used an XSLT, or some other technique
>> to transform whatever normally comes out of the ?wsdl URL.
>>
>
> Uhm,
> can you give more info on this matter?
>
> I can perform the trasformation reading an http header? Can you point me
> to some documentation?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]