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

  • Home
  • SEARCH
  • 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 8639529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:01:44+00:00 2026-06-12T11:01:44+00:00

im having problem whith a POST request. I have to receive an XML message

  • 0

im having problem whith a POST request. I have to receive an XML message and im parsing it with JAXB. Everithing works fine but when special chars are included in the message like

<?xml version="1.0" encoding="UTF-8"?>
<sending>
    <sms>
        <message>España</message>
    </sms>
</sending>

it throws a Bad Request Error (400)
The request sent by the client was syntactically incorrect (Bad Request).

This is my code to process the xml message

@POST
@Path("smsSendPost")
@Produces(MediaType.APPLICATION_XML)
public Response smsSendPost(JAXBElement<Sending> xml){
    Sending sending = xml.getValue();

    //Process the message
}

Im using tomcat to test it.

Can anyone help me with this?

UPDATE:
I’ve just found the cause of the problem is the tomcat, when I send the request via POST with ISO-8859-1 encoding the service works fine. The solution is to change the encoding of the tomcat.

  • 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. Editorial Team
    Editorial Team
    2026-06-12T11:01:45+00:00Added an answer on June 12, 2026 at 11:01 am

    I’ve just found that the cause of the problem is the tomcat, when I send the request via POST with ISO-8859-1 encoding the service works fine. I guess the solution is to change the encoding of the tomcat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problem with sending XML-data using HTTP POST to an API. If I
I'm having a problem with a ajax request in a django project. I have
This is related to this post . I think I am having problem with
I am having a problem with multiple thread synchronization, I will post only an
I'm having problems with understanding how jQuery create headers for ajax post. I have
I'm having problem with datagrid view. I have attached an image with the code
I'm having a small problem with AFNetworking. Im trying to have a simple call
I am having problem in django. I have created a form in my app
I'm having a real problem with the WCF web api. I have a simple
Hi all I have seen all question related to this problem but couldn't find

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.