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 Wouter Cloetens <wc...@raleigh.ibm.com> on 2001/01/13 17:50:45 UTC
Today's changes: transport hook fix + content length no longer required
Ok, this should fix the transport hook problem. Ryo, you might want to
change your test case server from:
public SOAPContext hello(Envelope env, SOAPContext ctx)
{
return ctx ;
}
to:
public SOAPContext hello(Envelope env, SOAPContext ctx) {
SOAPContext respCtx = new SOAPContext();
respCtx.setRootPart(ctx.getRootPart());
return respCtx ;
}
It wasn't really the idea that you'd reuse the request SOAPContext for
anything. You'll see why if you run your sample through the tunnel - it
generates a multipart response with two identical envelopes. I don't
really understand why that happens - I'll check to see if your case
doesn't expose a bug in a scenario I hadn't thought of yet.
Someone recently complained about exceptions being thrown when the
response didn't have a content-length header. As it turns out, the way
I wrote it, I don't really need that header, and I must've forgotten
that somewhere along the line.
So, you now no longer get either the old XML parsing exceptions on
server error responses, nor do you get a "content-length required"
exception, but I've fixed it up so you get a pretty:
Unsupported response content type "text/html", must be "text/xml".
Response was:
followed by the response content. If (the root part of) the response is
not text in nature, e.g. it's a "image/gif" Messaging response, it
won't show the response.
Hopefully this change will fix once and forever the typical new user
confusion, as it should now be blatantly obvious what the problem was.
I've also put some debug printStackTrace()s in HTTPUtils. I hope that
users who report any more of the "connection reset by peer" HTTP
problems, or NullPointerExceptions when using HTTPS, will be able to
give us more details. This stuff should be taken out before we release
2.1.
bfn, Wouter
--
http://www.workspot.net/~zombie/soap/
My opinions are irrelevant. They will be assimilated by my employer.
Re: Today's changes: transport hook fix + content length no longer
required
Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
From: Ryo Neyama <ne...@trl.ibm.co.jp>
Subject: Re: Today's changes: transport hook fix + content length no longer required
Date: Mon, 15 Jan 2001 10:32:43 +0900
> Wouter,
>
> From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> Subject: Today's changes: transport hook fix + content length no longer required
> Date: Sat, 13 Jan 2001 16:50:45 +0000
>
> > Ok, this should fix the transport hook problem. Ryo, you might want to
> > change your test case server from:
> > public SOAPContext hello(Envelope env, SOAPContext ctx)
> > {
> > return ctx ;
> > }
> > to:
> > public SOAPContext hello(Envelope env, SOAPContext ctx) {
> > SOAPContext respCtx = new SOAPContext();
> > respCtx.setRootPart(ctx.getRootPart());
> > return respCtx ;
> > }
>
> Ok. I'll check the hook after changing the test case.
> Thank you very much.
It worked well. Thank you very much!
Actually, the API was changed as follows:
public SOAPContext hello(Envelope env, SOAPContext ctx1, SOAPContext ctx2) {
...
}
I'm wondering I should use "ctx2" as the context for the response...
Dug, is it right? (I found you changed the API)
Regards,
Ryo Neyama @ IBM Research, Tokyo Research Laboratory
Internet Technology
neyama@trl.ibm.co.jp
Re: Today's changes: transport hook fix + content length no longer
required
Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
Wouter,
From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
Subject: Today's changes: transport hook fix + content length no longer required
Date: Sat, 13 Jan 2001 16:50:45 +0000
> Ok, this should fix the transport hook problem. Ryo, you might want to
> change your test case server from:
> public SOAPContext hello(Envelope env, SOAPContext ctx)
> {
> return ctx ;
> }
> to:
> public SOAPContext hello(Envelope env, SOAPContext ctx) {
> SOAPContext respCtx = new SOAPContext();
> respCtx.setRootPart(ctx.getRootPart());
> return respCtx ;
> }
Ok. I'll check the hook after changing the test case.
Thank you very much.
Regards,
Ryo Neyama @ IBM Research, Tokyo Research Laboratory
Internet Technology
neyama@trl.ibm.co.jp