By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,559 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,559 IT Pros & Developers. It's quick & easy.

How to remove HTTP Header [Expect: 100-continue]

P: n/a
Hy there

I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included in
Tomcat) i can observer the following sequence:

********************************************
CLIENT:: Request
********************************************

POST /axis/services/AgencyGatewayPort HTTP/1.1
User-Agent: Axis/1.1
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 639
Expect: 100-continue
Connection: Keep-Alive
Host: localhost

<?xml version="1.0" encoding="utf-8"?>
....
********************************************
SERVER:: Response
********************************************
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8E01AF57B2FF5BBFB22BF6E4BEA65FBB; Path=/axis
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 08 Apr 2005 14:07:59 GMT
Server: Apache-Coyote/1.1

2000
<?xml version="1.0" encoding="UTF-8"?>
....
After the WS-call i don't have access to my object. All object are set to
null.
I have tried to manipulate the HTTP-Header (remove Expect: 100-continue).
But it's not possible to remove this header. In the documentation i've found,
that some header-elements could not be changed.

In my oppinion the response from Tomcat look a little bit strange. My
question is: Is it possible to change my HTTP-Header? I have another sample
written in Java and this sample does work. The Java Client Header look like
this:

********************************************
Java CLIENT:: Request
********************************************
POST /axis/services/AgencyGatewayPort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 926
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx

Thakns in advance!


Nov 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Is the response coming in on one trip or 2?

Normally (in other cases such as redirects) you see the client getting a
RESPONSE to redirect, then client makes another requests and gets a 200 Ok.
Is it possible these 2 are separate responses? You get 100, then send
request again and get 200? What else was in the body of the 100 response?

Alex

"Christian Lutz" <Christian Lu**@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Hy there

I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included
in
Tomcat) i can observer the following sequence:

********************************************
CLIENT:: Request
********************************************

POST /axis/services/AgencyGatewayPort HTTP/1.1
User-Agent: Axis/1.1
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 639
Expect: 100-continue
Connection: Keep-Alive
Host: localhost

<?xml version="1.0" encoding="utf-8"?>
...
********************************************
SERVER:: Response
********************************************
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8E01AF57B2FF5BBFB22BF6E4BEA65FBB; Path=/axis
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 08 Apr 2005 14:07:59 GMT
Server: Apache-Coyote/1.1

2000
<?xml version="1.0" encoding="UTF-8"?>
...
After the WS-call i don't have access to my object. All object are set to
null.
I have tried to manipulate the HTTP-Header (remove Expect: 100-continue).
But it's not possible to remove this header. In the documentation i've
found,
that some header-elements could not be changed.

In my oppinion the response from Tomcat look a little bit strange. My
question is: Is it possible to change my HTTP-Header? I have another
sample
written in Java and this sample does work. The Java Client Header look
like
this:

********************************************
Java CLIENT:: Request
********************************************
POST /axis/services/AgencyGatewayPort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 926
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx

Thakns in advance!

Nov 23 '05 #2

P: n/a
The Response is coming in one trip. The answer from the server you see is one
response. The server sends 100 and the 200 response at once.

cu luc


"Alex Passos" wrote:
Is the response coming in on one trip or 2?

Normally (in other cases such as redirects) you see the client getting a
RESPONSE to redirect, then client makes another requests and gets a 200 Ok.
Is it possible these 2 are separate responses? You get 100, then send
request again and get 200? What else was in the body of the 100 response?

Alex

"Christian Lutz" <Christian Lu**@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Hy there

I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included
in
Tomcat) i can observer the following sequence:

********************************************
CLIENT:: Request
********************************************

POST /axis/services/AgencyGatewayPort HTTP/1.1
User-Agent: Axis/1.1
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 639
Expect: 100-continue
Connection: Keep-Alive
Host: localhost

<?xml version="1.0" encoding="utf-8"?>
...
********************************************
SERVER:: Response
********************************************
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8E01AF57B2FF5BBFB22BF6E4BEA65FBB; Path=/axis
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 08 Apr 2005 14:07:59 GMT
Server: Apache-Coyote/1.1

2000
<?xml version="1.0" encoding="UTF-8"?>
...
After the WS-call i don't have access to my object. All object are set to
null.
I have tried to manipulate the HTTP-Header (remove Expect: 100-continue).
But it's not possible to remove this header. In the documentation i've
found,
that some header-elements could not be changed.

In my oppinion the response from Tomcat look a little bit strange. My
question is: Is it possible to change my HTTP-Header? I have another
sample
written in Java and this sample does work. The Java Client Header look
like
this:

********************************************
Java CLIENT:: Request
********************************************
POST /axis/services/AgencyGatewayPort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 926
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx

Thakns in advance!


Nov 23 '05 #3

P: n/a
Christian Lutz wrote:
The Response is coming in one trip. The answer from the server you see is one
response. The server sends 100 and the 200 response at once.

cu luc


"Alex Passos" wrote:

Is the response coming in on one trip or 2?

Normally (in other cases such as redirects) you see the client getting a
RESPONSE to redirect, then client makes another requests and gets a 200 Ok.
Is it possible these 2 are separate responses? You get 100, then send
request again and get 200? What else was in the body of the 100 response?

Alex

"Christian Lutz" <Christian Lu**@discussions.microsoft.com> wrote in message
news:D0**********************************@micros oft.com...
Hy there

I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included
in
Tomcat) i can observer the following sequence:

********************************************
CLIENT:: Request
********************************************

POST /axis/services/AgencyGatewayPort HTTP/1.1
User-Agent: Axis/1.1
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 639
Expect: 100-continue
Connection: Keep-Alive
Host: localhost

<?xml version="1.0" encoding="utf-8"?>
...
********************************************
SERVER:: Response
********************************************
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8E01AF57B2FF5BBFB22BF6E4BEA65FBB; Path=/axis
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 08 Apr 2005 14:07:59 GMT
Server: Apache-Coyote/1.1

2000
<?xml version="1.0" encoding="UTF-8"?>
...
After the WS-call i don't have access to my object. All object are set to
null.
I have tried to manipulate the HTTP-Header (remove Expect: 100-continue).
But it's not possible to remove this header. In the documentation i've
found,
that some header-elements could not be changed.

In my oppinion the response from Tomcat look a little bit strange. My
question is: Is it possible to change my HTTP-Header? I have another
sample
written in Java and this sample does work. The Java Client Header look
like
this:

********************************************
Java CLIENT:: Request
********************************************
POST /axis/services/AgencyGatewayPort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://net.guardean.wsdl/AgPerformRequest"
Content-Length: 926
Authorization: Basic bW1hX3VzZXIxOm1tYV9wd2Qx

Thakns in advance!



You could try using HTTP 1.0 instead of 1.1. I don't know how to achieve
this, haven't programmed in Java/Tomcat for quite a long now. Probably
there is some client side API for choosing HTTP version, or you can
reconfigure the server to use only HTTP 1.0.

Best regards
Rafal Gwizdala
Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.