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]

Reply via email to