You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Doug Davis <du...@us.ibm.com> on 2001/06/06 11:26:51 UTC

Re: How can I get the the IP of client from A Soap Service program?

Don't have time to go into it right now, but try adding a SOAPContext
parameter to the start of your parameters on your method - look
at the template provider to see what you can pull out of the properties.
You can get things like the ServletContext, HTTPRequest object...
-Dug


"oh" <wa...@sm.sony.co.jp> on 06/06/2001 09:35:56 AM

Please respond to soap-user@xml.apache.org

To:   <so...@xml.apache.org>
cc:
Subject:  Re: How can I get the the IP of  client from A Soap Service
      program?




I checked the archive of this mailing list, and I found nothing.

I think it' neccessary for a service bean to get the information
in the request. Is there any solution to solve it ?
Maybe I have to give up trying with Apache Soap......

Any help will be appreciate.

Huimin Wang,
Globus,Inc



----- Original Message -----
From: "oh" <wa...@sm.sony.co.jp>
To: <so...@xml.apache.org>
Sent: Wednesday, June 06, 2001 1:04 PM
Subject: Re: How can I get the the IP of client from A Soap Service
program?


>
> ----- Original Message -----
> From: "Pae Choi" <pa...@earthlink.net>
> To: <so...@xml.apache.org>
> Sent: Wednesday, June 06, 2001 11:55 AM
> Subject: Re: How can I get the the IP of client from A Soap Service
program?
>
>
> > See getRemoteAddr() of javax.servlet.ServletRequest. And its subclass,
> > javax.servlet.http.HttpServletRequest. :-)
>
> I know this method. But How can I get the instance of HttpServletRequest
in
> my
> program? My program is not a Servlet.
>
> Thanks,
>
> Huimin Wang
> Globus,Japan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How can I get the the IP of client from A Soap Service program?

Posted by oh <wa...@sm.sony.co.jp>.
Thank you for your response.

----- Original Message -----
From: "Doug Davis" <du...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Wednesday, June 06, 2001 6:26 PM
Subject: Re: How can I get the the IP of client from A Soap Service program?


> Don't have time to go into it right now, but try adding a SOAPContext
> parameter to the start of your parameters on your method - look
> at the template provider to see what you can pull out of the properties.
> You can get things like the ServletContext, HTTPRequest object...

Did you mean I should add a parameter to the method that registed as a soap
action?
In the case, how can I write the client code to match the singatue of the
method?

I just added to the Soap service program without changing the message of the
request
which sended by Perl program, but I got the following Soap Error:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>com.xxx.xmlapi.Asset.getAsset(com.xxx.xmlapi.SessionInfo,java.l
ang.String) -- no signature match</faultstring>
<faultactor>/oh-is2/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


and the here is a part of my changed program:
============================================
    public AssetInfo getAsset( SOAPContext reqContext,
                    SessionInfo sessionInfo,
                    String asset_id)
    {
        System.out.println("Asset#getAsset start:");
        System.out.println("reqContext = " + reqContext);

        String memberId = sessionInfo.getMemberid();
        String sessionId = sessionInfo.getTicket();
        String userName = sessionInfo.getUsername();

        HttpServlet servlet = (HttpServlet) reqContext.getProperty(
Constants.BAG_HTTPSERVLET );
        HttpSession session = (HttpSession) reqContext.getProperty(
Constants.BAG_HTTPSESSION );

       Enumeration keys = reqContext.getPropertyNames();
        while ( keys.hasMoreElements() ) {
            String  key   = (String) keys.nextElement();
            System.out.println( "Key: " + key);
        }
...................................................
============================================


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


HTTPS with proxy server not working

Posted by David Wall <dw...@Yozons.com>.
I've been having a lot of trouble doing HTTPS with a proxy server using
Apache SOAP 2.2.

I read an article about Apache SOAP 2.0 and its problems and it pointed to a
URL http://www.innovation.ch/java/HTTPClient/ .  However, since 2.0, Apache
SOAP has added support for SSL and proxy servers.  However, I believe there
may still be a bug that I'm trying to research.  I can only get Apache SOAP
2.2 to work with a proxy server via HTTP.  When I try over HTTPS, it does
not work (my soap client code works fine over HTTPS when there's no proxy
server, only when I set the proxy server does it fail -- and it works with a
proxy if via http).

Because I'm using JSSE, I'm looking at the patch at the URL above that was
associated with JSSE to see how to make Apache SOAP clients work using HTTPS
with a proxy server.  Does anybody understand how proxying over HTTPS "ought
to work"?  That is, is the client supposed to open a connection the proxy
server over HTTP first, give it some info, and then send the SSL-encrypted
data?  Is Apache SOAP supposed to handle this already?

Best regards,
David



HTTPS with proxy server not working

Posted by David Wall <dw...@Yozons.com>.
I've been having a lot of trouble doing HTTPS with a proxy server using
Apache SOAP 2.2.

I read an article about Apache SOAP 2.0 and its problems and it pointed to a
URL http://www.innovation.ch/java/HTTPClient/ .  However, since 2.0, Apache
SOAP has added support for SSL and proxy servers.  However, I believe there
may still be a bug that I'm trying to research.  I can only get Apache SOAP
2.2 to work with a proxy server via HTTP.  When I try over HTTPS, it does
not work (my soap client code works fine over HTTPS when there's no proxy
server, only when I set the proxy server does it fail -- and it works with a
proxy if via http).

Because I'm using JSSE, I'm looking at the patch at the URL above that was
associated with JSSE to see how to make Apache SOAP clients work using HTTPS
with a proxy server.  Does anybody understand how proxying over HTTPS "ought
to work"?  That is, is the client supposed to open a connection the proxy
server over HTTP first, give it some info, and then send the SSL-encrypted
data?  Is Apache SOAP supposed to handle this already?

Best regards,
David



Re: How can I get the the IP of client from A Soap Service program?

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
This feature is document in the 2.2 docs. See in the User's Guide
under the "Interoperability" section and look for 'Getting at
"environmental" information for RPC style services'.

Sanjiva.

----- Original Message -----
From: "Doug Davis" <du...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Wednesday, June 06, 2001 5:26 AM
Subject: Re: How can I get the the IP of client from A Soap Service program?


> Don't have time to go into it right now, but try adding a SOAPContext
> parameter to the start of your parameters on your method - look
> at the template provider to see what you can pull out of the properties.
> You can get things like the ServletContext, HTTPRequest object...
> -Dug
>
>
> "oh" <wa...@sm.sony.co.jp> on 06/06/2001 09:35:56 AM
>
> Please respond to soap-user@xml.apache.org
>
> To:   <so...@xml.apache.org>
> cc:
> Subject:  Re: How can I get the the IP of  client from A Soap Service
>       program?
>
>
>
>
> I checked the archive of this mailing list, and I found nothing.
>
> I think it' neccessary for a service bean to get the information
> in the request. Is there any solution to solve it ?
> Maybe I have to give up trying with Apache Soap......
>
> Any help will be appreciate.
>
> Huimin Wang,
> Globus,Inc
>
>
>
> ----- Original Message -----
> From: "oh" <wa...@sm.sony.co.jp>
> To: <so...@xml.apache.org>
> Sent: Wednesday, June 06, 2001 1:04 PM
> Subject: Re: How can I get the the IP of client from A Soap Service
> program?
>
>
> >
> > ----- Original Message -----
> > From: "Pae Choi" <pa...@earthlink.net>
> > To: <so...@xml.apache.org>
> > Sent: Wednesday, June 06, 2001 11:55 AM
> > Subject: Re: How can I get the the IP of client from A Soap Service
> program?
> >
> >
> > > See getRemoteAddr() of javax.servlet.ServletRequest. And its subclass,
> > > javax.servlet.http.HttpServletRequest. :-)
> >
> > I know this method. But How can I get the instance of HttpServletRequest
> in
> > my
> > program? My program is not a Servlet.
> >
> > Thanks,
> >
> > Huimin Wang
> > Globus,Japan
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How can I get the the IP of client from A Soap Service program?

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
This feature is document in the 2.2 docs. See in the User's Guide
under the "Interoperability" section and look for 'Getting at
"environmental" information for RPC style services'.

Sanjiva.

----- Original Message -----
From: "Doug Davis" <du...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Wednesday, June 06, 2001 5:26 AM
Subject: Re: How can I get the the IP of client from A Soap Service program?


> Don't have time to go into it right now, but try adding a SOAPContext
> parameter to the start of your parameters on your method - look
> at the template provider to see what you can pull out of the properties.
> You can get things like the ServletContext, HTTPRequest object...
> -Dug
>
>
> "oh" <wa...@sm.sony.co.jp> on 06/06/2001 09:35:56 AM
>
> Please respond to soap-user@xml.apache.org
>
> To:   <so...@xml.apache.org>
> cc:
> Subject:  Re: How can I get the the IP of  client from A Soap Service
>       program?
>
>
>
>
> I checked the archive of this mailing list, and I found nothing.
>
> I think it' neccessary for a service bean to get the information
> in the request. Is there any solution to solve it ?
> Maybe I have to give up trying with Apache Soap......
>
> Any help will be appreciate.
>
> Huimin Wang,
> Globus,Inc
>
>
>
> ----- Original Message -----
> From: "oh" <wa...@sm.sony.co.jp>
> To: <so...@xml.apache.org>
> Sent: Wednesday, June 06, 2001 1:04 PM
> Subject: Re: How can I get the the IP of client from A Soap Service
> program?
>
>
> >
> > ----- Original Message -----
> > From: "Pae Choi" <pa...@earthlink.net>
> > To: <so...@xml.apache.org>
> > Sent: Wednesday, June 06, 2001 11:55 AM
> > Subject: Re: How can I get the the IP of client from A Soap Service
> program?
> >
> >
> > > See getRemoteAddr() of javax.servlet.ServletRequest. And its subclass,
> > > javax.servlet.http.HttpServletRequest. :-)
> >
> > I know this method. But How can I get the instance of HttpServletRequest
> in
> > my
> > program? My program is not a Servlet.
> >
> > Thanks,
> >
> > Huimin Wang
> > Globus,Japan
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How can I get the the IP of client from A Soap Service program?

Posted by oh <wa...@sm.sony.co.jp>.
Thank you for your response.

----- Original Message -----
From: "Doug Davis" <du...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Wednesday, June 06, 2001 6:26 PM
Subject: Re: How can I get the the IP of client from A Soap Service program?


> Don't have time to go into it right now, but try adding a SOAPContext
> parameter to the start of your parameters on your method - look
> at the template provider to see what you can pull out of the properties.
> You can get things like the ServletContext, HTTPRequest object...

Did you mean I should add a parameter to the method that registed as a soap
action?
In the case, how can I write the client code to match the singatue of the
method?

I just added to the Soap service program without changing the message of the
request
which sended by Perl program, but I got the following Soap Error:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>com.xxx.xmlapi.Asset.getAsset(com.xxx.xmlapi.SessionInfo,java.l
ang.String) -- no signature match</faultstring>
<faultactor>/oh-is2/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


and the here is a part of my changed program:
============================================
    public AssetInfo getAsset( SOAPContext reqContext,
                    SessionInfo sessionInfo,
                    String asset_id)
    {
        System.out.println("Asset#getAsset start:");
        System.out.println("reqContext = " + reqContext);

        String memberId = sessionInfo.getMemberid();
        String sessionId = sessionInfo.getTicket();
        String userName = sessionInfo.getUsername();

        HttpServlet servlet = (HttpServlet) reqContext.getProperty(
Constants.BAG_HTTPSERVLET );
        HttpSession session = (HttpSession) reqContext.getProperty(
Constants.BAG_HTTPSESSION );

       Enumeration keys = reqContext.getPropertyNames();
        while ( keys.hasMoreElements() ) {
            String  key   = (String) keys.nextElement();
            System.out.println( "Key: " + key);
        }
...................................................
============================================


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org