You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Warwick Slade <ws...@earthling.net> on 2001/07/27 05:44:41 UTC

SOAPHTTPConnection and session cookies

The code within SOAPHTTPConnection stores the header values in a hashtable.

To find the Set-Cookie header a get() is performed on the hashtable and hence performs a case sensitive search.

If the Web Server returns the header Set-cookie it will be ignored, currently iPlanet Web Server does this.

>From the HTTP rfc 2068

Section 4.2

HTTP header fields, which include general-header (section 4.5), request-header (section 5.3), response-header (section 6.2), and entity-header (section 7.1) fields, follow the same generic format as that given in Section 3.1 of RFC 822 [9]. Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive.

How do we go about rectifying the SOAPHTTPConnection class to be case insensitive?

Warwick Slade


RE: Its urgent.....

Posted by "Matthew J. Duftler" <du...@watson.ibm.com>.
Hi Susheel,

Make sure that your MailInfo class is public, and has a no-args public
constructor.

Thanks,
-Matt

> -----Original Message-----
> From: Susheel Chauhan [mailto:schauhan@ggn.aithent.com]
> Sent: Monday, July 30, 2001 1:48 AM
> To: soap-dev@xml.apache.org
> Subject: Its urgent.....
>
>
> Hi all,
> i have my server class that accept java Object class as a parameter..The
> signature of this class is
> public String log(Object a_oActionInfoStruct)
>
> Now from my client i would like to send any user defined java
> class to this
> server ...
> I have tried to send my MailInfo class .I deployed my service using
> deployment descriptor successfully as attached with this mail..
> The code for
> my java client is also mention below. But when i run my program it get
> exception
> [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate
> 'MailInfo': MailInfo] at SoapTestLogger.main(SoapTestLogger.java:59)
> Exception in thread "main" Process Exit...
>
> Please help me  to resolve this condition as how to send Object class from
> client.
> public class SoapTestLogger
> {
>
> public static void main( String[] args) throws Exception
>  {
>     Call call = new Call();
>      URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter/");
>      String SOAPActionURI = "";
>
>       SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
>
>
>       call.setTargetObjectURI("urn:loggerservice");
>
> call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
>
>       BeanSerializer ser_0 = new BeanSerializer();
>       smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/", new QName(
> "urn:classtypes","MailInfo"), MailInfo.class, ser_0, ser_0);
>
>   System.out.println ("Calling Log method");
>   MailInfo mlInfo = new
> MailInfo("schauhan@ggn.aithent.com","schauhan@ggn.aithent.com","TE
> ST","TEST"
> );
>
>   call.setMethodName("log");
>
>   Vector params = new Vector();
>    params.addElement(new Parameter("obj",mlInfo.getClass(),mlInfo,null));
>
>   call.setParams(params);
>   Response resp = call.invoke(url, SOAPActionURI);
>
>   // Check the response.
>   if (resp.generatedFault())
>   {
>    Fault fault = resp.getFault();
>
>    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
>   }
>
>   else
>   {
>    Parameter retValue = resp.getReturnValue();
>    String str= (String) retValue.getValue();
>
>    System.out.println ("Result is" + str);
>   }
>
>
>  }
>
>
> }
>
>
>
> Thanx in adnvance
>
>


Its urgent.....

Posted by Susheel Chauhan <sc...@ggn.aithent.com>.
Hi all,
i have my server class that accept java Object class as a parameter..The
signature of this class is
public String log(Object a_oActionInfoStruct)

Now from my client i would like to send any user defined java class to this
server ...
I have tried to send my MailInfo class .I deployed my service using
deployment descriptor successfully as attached with this mail.. The code for
my java client is also mention below. But when i run my program it get
exception
[SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate
'MailInfo': MailInfo] at SoapTestLogger.main(SoapTestLogger.java:59)
Exception in thread "main" Process Exit...

Please help me  to resolve this condition as how to send Object class from
client.
public class SoapTestLogger
{

public static void main( String[] args) throws Exception
 {
    Call call = new Call();
     URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter/");
     String SOAPActionURI = "";

      SOAPMappingRegistry smr = call.getSOAPMappingRegistry();


      call.setTargetObjectURI("urn:loggerservice");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");

      BeanSerializer ser_0 = new BeanSerializer();
      smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/", new QName(
"urn:classtypes","MailInfo"), MailInfo.class, ser_0, ser_0);

  System.out.println ("Calling Log method");
  MailInfo mlInfo = new
MailInfo("schauhan@ggn.aithent.com","schauhan@ggn.aithent.com","TEST","TEST"
);

  call.setMethodName("log");

  Vector params = new Vector();
   params.addElement(new Parameter("obj",mlInfo.getClass(),mlInfo,null));

  call.setParams(params);
  Response resp = call.invoke(url, SOAPActionURI);

  // Check the response.
  if (resp.generatedFault())
  {
   Fault fault = resp.getFault();

   throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
  }

  else
  {
   Parameter retValue = resp.getReturnValue();
   String str= (String) retValue.getValue();

   System.out.println ("Result is" + str);
  }


 }


}



Thanx in adnvance



Re: SOAPHTTPConnection and session cookies

Posted by Warwick Slade <ws...@earthling.net>.
OK I read the page,

but still I am not sure how to submit the change, from my reading I send the
diff file of my changes so this group so I will do that.
----- Original Message -----
From: "Scott Nichol" <sn...@computer.org>
To: <so...@xml.apache.org>
Sent: Friday, July 27, 2001 10:28 PM
Subject: Re: SOAPHTTPConnection and session cookies


> Warwick,
>
> One option is for you to submit a patch.  Brief instructions for doing so
> are at the bottom of http://xml.apache.org/source.html
>
> Scott
>
> ----- Original Message -----
> From: "Warwick Slade" <ws...@earthling.net>
> To: <so...@xml.apache.org>
> Sent: Thursday, July 26, 2001 11:44 PM
> Subject: SOAPHTTPConnection and session cookies
>
>
> The code within SOAPHTTPConnection stores the header values in a
hashtable.
>
> To find the Set-Cookie header a get() is performed on the hashtable and
> hence performs a case sensitive search.
>
> If the Web Server returns the header Set-cookie it will be ignored,
> currently iPlanet Web Server does this.
>
> From the HTTP rfc 2068
>
> Section 4.2
>
> HTTP header fields, which include general-header (section 4.5),
> request-header (section 5.3), response-header (section 6.2), and
> entity-header (section 7.1) fields, follow the same generic format as that
> given in Section 3.1 of RFC 822 [9]. Each header field consists of a name
> followed by a colon (":") and the field value. Field names are
> case-insensitive.
>
> How do we go about rectifying the SOAPHTTPConnection class to be case
> insensitive?
>
> Warwick Slade
>
>
>
>


Re: SOAPHTTPConnection and session cookies

Posted by Scott Nichol <sn...@computer.org>.
Warwick,

One option is for you to submit a patch.  Brief instructions for doing so
are at the bottom of http://xml.apache.org/source.html

Scott

----- Original Message -----
From: "Warwick Slade" <ws...@earthling.net>
To: <so...@xml.apache.org>
Sent: Thursday, July 26, 2001 11:44 PM
Subject: SOAPHTTPConnection and session cookies


The code within SOAPHTTPConnection stores the header values in a hashtable.

To find the Set-Cookie header a get() is performed on the hashtable and
hence performs a case sensitive search.

If the Web Server returns the header Set-cookie it will be ignored,
currently iPlanet Web Server does this.

>From the HTTP rfc 2068

Section 4.2

HTTP header fields, which include general-header (section 4.5),
request-header (section 5.3), response-header (section 6.2), and
entity-header (section 7.1) fields, follow the same generic format as that
given in Section 3.1 of RFC 822 [9]. Each header field consists of a name
followed by a colon (":") and the field value. Field names are
case-insensitive.

How do we go about rectifying the SOAPHTTPConnection class to be case
insensitive?

Warwick Slade