Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Transfer Encoding Chunked in glassfish/soap java webservices

I have developed a soap web services from wsdl in Netbeans and deployed to glassfish server.

The client call an endpoint and the webservices respond but in the reponse header i have:

Transfer-Encoding: chunked

I'd like ti disable this transfer encoding and set Content-Length: where i must disable this type of transfer? In glassfish? How?

like image 522
Tom Avatar asked Feb 24 '26 20:02

Tom


1 Answers

In the domain.xml in Glassfish, in this tag:

 <protocol security-enabled="true" name="http-listener-2">
            <http  chunking-enabled="false"  default-virtual-server="server" max-connections="250">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>

Set chunking-enabled="false"

This also removes some random characters I was getting spread out in the response.

like image 90
Roberto Rodriguez Avatar answered Feb 26 '26 10:02

Roberto Rodriguez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!