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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:08:51+00:00 2026-05-18T10:08:51+00:00

Apparently this is a fairly often experienced issue. I’m not sure entirely where the

  • 0

Apparently this is a fairly often experienced issue. I’m not sure entirely where the problem lies, or what needs to be adjusted, but for the life of me I cannot retrieve anything other than a NULL result to my SoapObject or SoapPrimitive from my .NET XML web service with parameters.

I’ve tried everything I’ve found on the net:

  • Adding the .setXmlVersionTag = no change
  • Using SoapObject instead of SoapPrimitive = no change
  • Using SoapPrimitive instead of SoapObject = no change
  • Using HttpTransportSE instead of AndroidHttppTransport = no change
  • Using AndroidHttpTransport instead of HttpTransportSE = no change
  • Setting .dotNet = true = no change
  • Removing .dotNet assignment line = no change
  • Removing the colon (entire HTTP:// prefix) from the web service = no change
  • Using the PropertyInfo class instead of direct assignment = no change
  • Using direct assignment instead of the PropertyInfo class = no change

I’m at a total loss and it’s quite frustrating. I have total control of the web service (I wrote it) so minor changes, if helpful, I’m willing to attempt.

Currently my code as follows is this:

public void GetResults()
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("lastName", "sm");
request.addProperty("middleName", "");
request.addProperty("firstName", "");
request.addProperty("pageSize", 25);
request.addProperty("pageNumber", 1);

SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);           
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(request);

//AndroidHttpTransport aht = new AndroidHttpTransport(URL);
HttpTransportSE aht = new HttpTransportSE(URL);

try
{
    aht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    aht.call(SOAP_ACTION, soapEnvelope);           

    //SoapObject result = (SoapObject)soapEnvelope.bodyIn;
    SoapObject result = (SoapObject)soapEnvelope.getResponse();
    //SoapPrimitive result = (SoapPrimitive) soapEnvelope.getResponse();
    //Object result = soapEnvelope.getResponse();

    Log.d("WS", String.valueOf(result));          
}
catch(Exception e)
{
    e.printStackTrace();
}       
}

and my globals look like this:

private static final String SOAP_ACTION = "http://yoda/SearchPerson";
private static final String METHOD_NAME = "SearchPerson";
private static final String NAMESPACE = "http://yoda/";
private static final String URL = "http://yoda/ws.asmx";

I know ‘yoda’ is translating correctly as my non-parameterized web serivce is working like a bloody champ. (Everything is identical save the ‘request.addProperty’ calls which are obviously (part or all) of the issue at hand.)

If it matters I’m writing this against a 1.6 target platform with KSoap2 2.5.2 and it behaves identically across all my different Android emulators.

I’ve sniffed the packets with wireshark and the emulator appears to be sending the correct stuff but the results it receives are always NULL. (I’ve tested these exact parameters many times against my test web site that uses these web services, and all is working perfectly there.)

So, can anyone throw me a bone here?

Thanks,

Magua

EDIT 2010.11.28:

Even though Wireshark is telling me that I’m sending the parameters it would seem that the web service isn’t receiving them correctly, or something similar. I created a whole new service that was suppose to return a simple string, whatever the first parameter was, with ” TEST” at the end, hardcoded from the web service itself.

Well, every time I run this (from Android) I do get a result, and it is always ” TEST”. No matter how I formulate the SoapEnvelope or no matter what I pass as the parameter, I always receive ” TEST”. Of course when I invoke the web service on the server it works like a champ (and my result is “THIS IS A TEST”).

My web service is on Windows Server 2008 with IIS 7. The application pool is running against framework v2.0 (not v4.0) with ‘Integrated’ managed pipeline mode.

I have no idea where the disconnect lies. Is KSoap2 sending the parameters improperly? Is IIS configured incorrectly? Something else entirely?

  • 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-18T10:08:51+00:00Added an answer on May 18, 2026 at 10:08 am

    Wow. Chalk this one up to all sorts of oddities and oversights, but I’ve fixed it.

    The problem was the missing trailing ‘/’ at the end of the namespace. NOT the namespace declared for the Android globals, but the namespace declared on the Web Service itself near the top of the service.asmx.cs file. (Directly above WebServiceBinding).

    Once I added it to the end, everything was functioning like a champ.

    Oddly enough, this obviously affects ONLY methods that take parameters as those methods without parameters were working perfectly. And only with KSoap2 as my web site that uses the exact same services was functioning flawlessly.

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

Sidebar

Related Questions

Apparently this problem comes up fairly often, after reading Regular expression to detect semi-colon
Apparently this used to work on ruby 1.8.7 but unfortunately not on 1.9.2 class
Apparently this is very basic jQuery but im on a time crunch and I
Trying to parse some XML but apparently this is too much for a lazy
I see the CSC task in NAnt has a nowarn attribute, but apparently this
Apparently, this does not work. WHY ??????? I don't want to do all this
I have this sql: ALTER TABLE dbo.ChannelPlayerSkins DROP CONSTRAINT FK_ChannelPlayerSkins_Channels but apparently, on some
A coworker of mine has this problem, apparently after installing Re#, which seems totally
I am having a fairly huge problem. I am hoping this is due to
I'm having a pretty confusing problem in building a binary tree. Apparently this should

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.