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

Related Questions

this question can create a misunderstanding: I know I have to use CSS to
There are similar question, but not regarding C# libraries I can use in my
On this question , there's an answer that states: You can use typedef to
Simple question. I use Visual studio and I've just installed subversion, how can i
Here is the question: Can TortoiseSvn work on Windows 2008 without turning off User
Question Can I build a image database/library that has an e-commerce style checkout system
Simple question: Can a swing frame be completely modal ( block all others windows
Simple question: Can I mix in my desktop application Java and JavaFX Script code?
We are using SQL Server 2005, but this question can be for any RDBMS
This is a question you can read everywhere on the web with various answers:

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.