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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:17:24+00:00 2026-05-28T14:17:24+00:00

Right off the bat, here is my Soap call implementation, minus the irrelevant bits.

  • 0

Right off the bat, here is my Soap call implementation, minus the irrelevant bits.

public class MySoapClient implements AbstractSoapClient
{

    private String NAMESPACE = "http://www.examples.com/wsdl/MyService/";
    private String METHOD_NAME = "getPersonDetails";
    private String SOAP_ACTION = "http://www.examples.com/getPersonDetails/";
    String URL = "http://192.168.0.10:8088/mockMyServiceBinding?WSDL";


    public Object process() throws Exception
    {
        SoapSerializationEnvelope envelope = generateEnvelope();
        return responseObject = makeCall(envelope);
    }

    private SoapSerializationEnvelope generateEnvelope()
    {
        // dont set a namespace for the requestobject, otherwise ksoap adds implicit namespaces onto request elements
        SoapObject requestObject = new SoapObject("", METHOD_NAME);
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.implicitTypes = true;

        requestObject.addProperty("name", "Dave");
        envelope.setOutputSoapObject(requestObject);

        return envelope;
    }

    private Object makeCall(SoapSerializationEnvelope envelope)
    {
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
        try
        {
            androidHttpTransport.debug = true;
            androidHttpTransport.call(SOAP_ACTION, envelope);
            return envelope.bodyIn;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            return e;
        }
    }


}

I think the problem is the SoapObject requestObject = new SoapObject("", METHOD_NAME); part.

If I use SoapObject requestObject = new SoapObject("", METHOD_NAME); Then I get this in the bodyOut :

<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>
        <getPersonDetails xmlns="" id="o0" c:root="1">
            <name>Dave</name>
        </getPersonDetails>
    </v:Body>
</v:Envelope>

If I use SoapObject requestObject = new SoapObject(NAMESPACE, METHOD_NAME); Then I get this in the bodyOut :

<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>
        <n0:getPersonDetails id="o0" c:root="1" xmlns:n0="http://www.examples.com/wsdl/MyService/">
            <name i:type="d:string">Dave</name>
        </n0:getPersonDetails>
    </v:Body>
</v:Envelope>

BUT..SoapUI only accepts the following as a valid XML request :

<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>
        <getPersonDetails>
            <name>Dave</name>
        </getPersonDetails>
    </v:Body>
</v:Envelope>

For some reason, it doesn’t like the xmlns="http://www.examples.com/getPersonDetails/" id="o0" c:root="1" part, but I can’t find a way to remove it, please help!

So how can I completely remove the xmlns declaration? It feels “dirty” creating a SoapObject and setting namespace to “”

  • 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-28T14:17:25+00:00Added an answer on May 28, 2026 at 2:17 pm

    Play with

    envelope.implicitTypes = true;
    

    as well as

    envelope.setAddAdornments(false);
    

    and see if you get it to do what you want. Also keep in mind that in the end the request is totally valid and it will depend on your server if it is okay with it and NOT SoapUI.

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

Sidebar

Related Questions

I'm having difficulty using reinterpret_cast. Lets just say right off the bat that I'm
So I'm putting a few boxes in my footer and right off the bat
I am wising up and getting my internationalization act together. Right off the bat
I'm having trouble with my project for a class. I'll say right off the
I am following this tutorial: http://www.generation5.org/content/2001/sr00.asp?Print=1 Right off the bat it asks me to
Here's a minimal batch file, demo.bat , to illustrate my problem: @ECHO off set
I will say this right off the bat. I am an amateur at threading.
I recently came across something that I thought I understood right off the bat,
Right off the bat - no, this is NOT homework. I would like to
Right off the bat, I am not a programmer. It's weird, but the harder

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.