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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:00:11+00:00 2026-05-24T23:00:11+00:00

I want to send an envelope with an empty body like this: <v:Envelope xmlns:i=http://www.w3.org/2001/XMLSchema-instance

  • 0

I want to send an envelope with an empty body like this:

     <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:d="http://www.w3.org/2001/XMLSchema" 
     xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
     xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
     <v:Header />
        <v:Body>
        </v:Body>
     </v:Envelope>

Is it possible and how? I’ve tried with this:

     HttpsTransportSE transport = new HttpsTransportSE(HOST, PORT, ENDPOINT, TIMEOUT);
     SoapObject request = new SoapObject(null, null);
     SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);    
     envelope.setOutputSoapObject(request);
     transport.call(SOAP_ACTION, envelope);

I can’t seem to figure out how to do it, can anyone please help?

  • 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-24T23:00:13+00:00Added an answer on May 24, 2026 at 11:00 pm

    I have fixed the problem by creating my own SoapSerializationEnvelope extending the original one and overridering the writeBody method with this:
    public class MySoapEnvelope extends SoapSerializationEnvelope

    {   
        public MySoapEnvelope(int version) {
            super(version);
        }
        @Override
        public void writeBody(XmlSerializer writer) throws IOException
        {
            if (bodyOut!=null){
            super.writeBody(writer);
            }   
        }
    }
    

    To use it, you just have to use the MySoapSerializationEnvelope and set envelope.bodyOut=null;

    HttpsTransportSE transport = new HttpsTransportSE(host, port, endpoint, timeout);
    MySoapEnvelope emptySoapEnvelope = new MySoapEnvelope(SoapEnvelope.VER11);
    emptySoapEnvelope.bodyOut = null;
    transport.call(methodname, emptySoapEnvelope);
    

    I dont know if you want to cut a new release with this code. I would possibly make a new method in the original SoapEnvelope called setEmptyEnvelope(). But that’s up to you.
    You could get along with this, but then you should make a respectable
    documentation so people would know this is how it’s done.

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

Sidebar

Related Questions

I want to send a UIImage to a server with socket. I'm using this
I have a WSDL web service http://portal.strongtech.com/i/services/ivos?wsdl and I want to send request to
I have some action. I want send mail. usually i doing this way. public
I want to send data to youtube by POST method. I write http.open(POST, myUrl,
For testing purposes I want send mail to my localhost user account rather than
Want to send the text from my current vb application to the Active Window
I want so send every week an update by email. But Im afraid that
I want to send email from a Ruby application. Is there a call in
I want to send an array constructed in javascript with the selected values of
I want to send a message to a thread and handle it in the

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.