Oh.. that was a silly mistake. Got it working though!!

 Siddhartha Mehta <[EMAIL PROTECTED]> wrote:

Yes, that was an error with the SOAPAction. I use MimeHeaders to set the header with SOAPAction and its working for me. Now when I send the login name and password, I get the string in return with the session key. But I am not able to just retrieve the session key from the response. I've pasted below the response and the code I am using to retrieve. The iterator does not have any value in it.

***********************************************************************************************

SOAP Request

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Header/><soap-env:Body><Login xmlns="http://storagepoint.net/soap/">

<LoginName>q</LoginName>

<Password>q</Password></Login>

</soap-env:Body>

</soap-env:Envelope>

*************************************************************************************************

*************************************************************************************************
SOAP Response

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi
"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/X
LSchema"><soap:Body><LoginResponse xmlns="http://storagepoint.net/soap/"><Login
esult>402CE00E-DBAC-4BDD-9EB3-FEE3A6575CAD</LoginResult></LoginResponse></soap:
ody></soap:Envelope>


*************************************************************************************************

My function...

SOAPPart soapPartResponse = reply.getSOAPPart();
SOAPEnvelope soapEnvelopeResponse = soapPartResponse.getEnvelope();
SOAPBody soapBodyResponse = soapEnvelopeResponse.getBody();
        
Name bodyName1 = soapEnvelope.createName("LoginResult");
Iterator iterator = soapBodyResponse.getChildElements(bodyName1);
SOAPElement soapBodyElement = (SOAPElement)iterator.next();

*************************************************************************************************

I checked iterator.hasNext() and it returns false. Please let me know how do I get the value from the response.

Thanks,

Siddhartha

 Scott Nichol <[EMAIL PROTECTED]> wrote:

Microsoft web services use SOAPAction to determine the method to
execute. Your call.invoke is specifying an empty string. The WSDL for
the service will show you the SOAPAction.

Also, have you written the .NET web service to use rpc/encoded? Apache
SOAP always sends rpc/encoded messages. You do this with the
SoapRpcService attribute, e.g.

[SoapRpcService, WebService(Namespace="urn:echo-test-1")]
public class EchoTest1Service : System.Web.Services.WebService {
...

Scott Nichol



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Reply via email to