0

I have a simple vb.net webservice which accepts a string parameter. the function appends the passed value to a string, then returns it back. (See code below). My client uses ksoap2 on an android platform to invoke & consume the service. I can connect to the service fine, and while the value appears to be sent in the xml, it is not being passed to the function. Below is a tcp trace of the conversation to and from the server and my web service code.

The service description can be viewed at http://ikonicsoft.com/android_service_test.asmx

Can anyone explain to me why this seemingly simple soap request might not pass the parameter to the function? Isn't the passed xml what the server is expecting? I believe it to be valid. Am I wrong? I know the method is being processed? What could be wrong here. I'm pulling my hair out. The resources i've found so far on the issue have either not been resolved, and suggestions have not helped

The service consists of the asmx file which sits at the web root, and the class file located in the App_Code folder. No entries in the web.config file. Am I missing something there?

Any suggestions?
Patrick

TCP TRACE


POST /android_service_test.asmx HTTP/1.1
Host: ikonicsoft.com
user-agent: kSOAP/2.0
soapaction: http://ikonicsoft.com/TestMethod
content-type: text/xml
connection: close
content-length: 391

<?xml version="1.0" encoding="UTF-8"?>
<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:TestMethod id="o0" c:root="1" xmlns:n0="http://ikonicsoft.com">
<deviceid i:type="d:string">000000000000000</deviceid>
</n0:TestMethod>
</v:Body>
</v:Envelope>

HTTP/1.1 200 OK
Connection: close
Date: Wed, 23 Jun 2010 13:06:07 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: PleskWin
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: .ASPXANONYMOUS=mCtirWZJywEkAAAAMjhjYzllNzMtM2ZkZS00YWRkLThmOTUtZjM5YTllN2RkOGZj0; expires=Tue, 31-Aug-2010 23:46:05 GMT; path=/; HttpOnly

Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 366

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<TestMethodResponse xmlns="http://ikonicsoft.com/">
<TestMethodResult>deviceid = </TestMethodResult>
</TestMethodResponse>
</soap:Body>
</soap:Envelope>


WEBSERVICE CODE

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://ikonicsoft.com/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1, Name:="WSBinding")> _
Public Class AndroidServiceTest    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function TestMethod(ByVal deviceid As String) As String

        Return "deviceid = " & deviceid
        
    End Function

End Class
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by balazs.kelemen
0

Hi!
I have the same problem. I figured it is the envelope that should be the same type for the post and the response, but don't know yet how to fix it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.