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 958563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:53:17+00:00 2026-05-16T00:53:17+00:00

I am writing a server that receives SOAP 1.2 messages. The problem I have

  • 0

I am writing a server that receives SOAP 1.2 messages. The problem I have is that when I am sending via SOAPui a SOAP 1.1 message, the message is correctly handled but not when it’s a SOAP 1.2 message. I use axis2.

Here is my POM dependency:

  <dependencies>
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-saaj</artifactId>
        <version>1.4.1</version>
    </dependency>
  </dependencies>

Here is my main routine to run the server. This is not the actual server (no thread), the purpose is to show the problem.

public class App {
    public static void main(String[] args) {
        try {
            ServerSocket server = new ServerSocket(3400);
            Socket socket = server.accept();
            BasicHttpParams params = new BasicHttpParams();
            DefaultHttpServerConnection conn = new DefaultHttpServerConnection();
            conn.bind(socket, params);
            HttpRequest request = conn.receiveRequestHeader();
            if (request instanceof HttpEntityEnclosingRequest) {
                conn.receiveRequestEntity((HttpEntityEnclosingRequest) request);
                HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
                if (entity != null) {
                    MessageFactory soapMessageFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
                    SOAPMessage soapMessage = soapMessageFactory.createMessage(
                            new MimeHeaders(), entity.getContent());
                    SOAPBody soapBody = soapMessage.getSOAPBody();
                    entity.consumeContent();
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

SOAP 1.1 message

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
    </soapenv:Body>
</soapenv:Envelope>

SOAP 1.2 message

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    </soapenv:Body>
</soapenv:Envelope>

The exception I got with the 1.2 message

javax.xml.soap.SOAPException: org.apache.axiom.soap.SOAPProcessingException: Disallowed element found inside Envelope : {http://www.w3.org/2003/05/soap-envelope}Body
    at org.apache.axis2.saaj.SOAPPartImpl.<init>(SOAPPartImpl.java:228)
    at org.apache.axis2.saaj.SOAPPartImpl.<init>(SOAPPartImpl.java:246)
    at org.apache.axis2.saaj.SOAPMessageImpl.<init>(SOAPMessageImpl.java:99)
    at org.apache.axis2.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:131)
    at lolissimo.xhiara.App.main(App.java:33)
  • 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-05-16T00:53:17+00:00Added an answer on May 16, 2026 at 12:53 am

    You should try with the official implementation of SAAJ.

    <dependency>
        <groupId>com.sun.xml.messaging.saaj</groupId>
        <artifactId>saaj-impl</artifactId>
        <version>1.3.4</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Writing a client application that sends images to a server via a webservice. As
I'm writing a UDP server that currently receives data from UDP wraps it up
I am writing a C# .NET server application that sends and receives data over
I have a small client/server app that sends/receives UDP discovery packets. When a UDP
I'm writing some server code that talks to a client process via STDIN. I'm
I am writing http server that can serve big files to client. While writing
I am writing a game server that requires connecting to a MySQL database server
I am writing a client for a server that typically sends data as strings
I'm writing a tcp client in Delphi for a server that has a series
I am writing a server side process in Python that takes XML in a

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.