Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 159005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:46:56+00:00 2026-05-11T10:46:56+00:00

QUESTION : how can I use a different encoding (charset and transfer) with axis?

  • 0

QUESTION: how can I use a different encoding (charset and transfer) with axis?

Here is my client:

public Object[] invoke(String xmlRepresentation)             throws CustomApplicationException {              Object[] responseWS = null;             RPCServiceClient serviceClient = new RPCServiceClient();                         Options options = serviceClient.getOptions();                        options.setAction('WBSREFT');             options.setTo(new EndpointReference('http://localhost:6132'));             QName qName = new QName(XML_SCHEMA, operation);              Object[] args = new Object[] { 'blablabla' };             responseWS = serviceClient.invokeBlocking(qName, args, returnTypes);               String responseAsString = (String) responseWS[0];             return responseWS;      } 

Here is the SOAPEnvelope being generated (captured using TCP/IP Monitor):

<?xml version='1.0' encoding='http://schemas.xmlsoap.org/soap/envelope/'?> <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> <soapenv:Body> <WBSREFT xmlns='http://tempuri.org/LICPOCSampleService'> <arg0 xmlns=''>blablabla</arg0> </WBSREFT> </soapenv:Body> </soapenv:Envelope> 

WHY Axis2 generated this stupid encoding (http://schemas.xmlsoap.org/soap/envelope)???

Using Apache TCPMon I’ve captured this request:

POST / HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: 'WBSREFT' User-Agent: Axis2 Host: 172.17.192.113:6133 Transfer-Encoding: chunked  102 <?xml version='1.0' encoding='UTF-8'?>    <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>       <soapenv:Body>          <WBSREFT xmlns='http://tempuri.org/LICPOCSampleService'>             <arg0 xmlns=''>to cobol</arg0>          </WBSREFT>       </soapenv:Body>    </soapenv:Envelope>0 

If I send the XML request using soapUI that’s what TCPMon captures:

POST / HTTP/0.9 Content-Type: text/xml;charset=UTF-8 SOAPAction: '' User-Agent: Jakarta Commons-HttpClient/3.1 Host: 172.17.192.113:6133 Content-Length: 265  <?xml version='1.0' encoding='UTF-8'?>    <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>       <soapenv:Body>          <WBSREFT xmlns='http://tempuri.org/LICPOCSampleService'>             <arg0 xmlns=''>to cobol</arg0>          </WBSREFT>       </soapenv:Body>    </soapenv:Envelope> 

I’ve noticed this weird output: 102 and 0 in the middle of the XML… what can it be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:46:57+00:00Added an answer on May 11, 2026 at 10:46 am

    After all Eclipse’s plugin TCP/IP Monitor was apparently not giving me the right XML request leading me to wrong directions.

    It was showing encoding=’http://schemas.xmlsoap.org/soap/envelope/’, while Apache TCPMon gave me different (RIGHT) results.

    As saua noted, problem was the Chunk encoding, which you can change with this (AND SOLVED MY PROBLEM):

    options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); 

    And to answer my question:

    options.setProperty(org.apache.axis2.Constants.Configuration.CHARACTER_SET_ENCODING, 'UTF-8'); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 80k
  • Answers 80k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Agreed. They belong in the service layer. The controller should… May 11, 2026 at 4:18 pm
  • Editorial Team
    Editorial Team added an answer The difference is that the first would allow you to… May 11, 2026 at 4:18 pm
  • Editorial Team
    Editorial Team added an answer Your issue is that you're both inheriting from List(of T)… May 11, 2026 at 4:18 pm

Related Questions

By default, Visual Studio 2008 puts the Unicode byte-order mark in front of any
Informally, most of us understand that there are 'binary' files (object files, images, movies,
I am supposed to provide my users a really simple way of capturing video
I have a PHP script (running on a Linux server) that ouputs the names

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.