I found instructions on how to do this in the "Migration" section here:
http://xml.apache.org/soap/docs/guide/migration.html
(see the sub-section entitled 'Getting at "environmental" information for 
RPC style services').

The docs point out that "Using this feature makes your service 
implementation class bound to Apache SOAP", i.e. I don't think that this 
technique will work if your client is not also using Apache-SOAP.

Jonathan.

>From: "oh" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: How can I get the the IP of client from A Soap Service 
>program?
>Date: Wed, 6 Jun 2001 20:59:30 +0900
>
>Thank you for your response.
>
>----- Original Message -----
>From: "Doug Davis" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>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: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

Reply via email to