Click here to Skip to main content
15,891,749 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello, Hoping someone can provide some help.
I have a quite simple .net web service which I intend to communicate with an Android.
On the android side I'm using the ksoap2 library.

Without any parameters being passed, the service works fine.
However, when I try and pass parameters, its like the .net side doesn't recieve them, or the values are dropped, cast to default or something similar.
When I built a .net app to consume the service, parameters are passed and processed by the service just fine, but then .net wraps much of the complicated stuff so I don't see whats going on.

I've used Wireshark to get the xml sent to the service and its supplied below.
XML from .net app. This xml is recieved, processed and returned correctly from the service:
<s:envelope xmlns:s="#unknown">
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:body>
<addnumber xmlns="http://tempuri.org/">
<num1> 8
<num2> 7

<s:body>


This xml is recieved, but when I step thru the code in the service, the values for num1 and num2 are 0.
<v:envelope xmlns:v="#unknown">
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://shcema.xmlsoap.org/soap/envelope/">
<v:header>
<v:body>
<n0:addnumber id="o0" c:root="1" xmlns:n0="http://tempuri.org/><br mode=" hold=" /> <num1 i:type=" d:int="> 3 </num1><br mode=" num1=", 3);<br mode=" num2=", 8);<br mode=" 1.0=" encoding=" utf-8=" ?><br mode=" defaultsource=" switchName=" defaultswitch="><br mode=" filelog="/><br mode=" eventlog="/>--><br mode=" information=" /><br mode=" version="8.0.0.0," culture="neutral," publickeytoken="b03f5f7f11d50a3a," processorarchitecture="MSIL" &lt;br"="" mode="hold" xmlns:d="#unknown" xmlns:c="#unknown"> initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializedata="APPLICATION_NAME"> -->


<system.servicemodel>
<bindings>
<basichttpbinding>
<binding name="BasicHttpBinding_IService1">


<client>
<endpoint address="http://72.198.31.100:8080/CalculatorService/CalculatorService">
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />




Hope someone can make some heads or tails out of this and help me on it.

Thanks
Posted

1 solution

Disregard this question. The cut and pasted code has ruined the format.
I'm reposting with some the the '<' taken out
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900