Closed GoogleCodeExporter closed 8 years ago
check that the requestDump is as expected by the .net webservice using
debugging as documented on the wiki
Original comment by mosa...@gmail.com
on 30 Aug 2011 at 9:45
Thank for the reply, I checked my request dump its mentioned below
The .net service method
PlaceDiningOrder(DiningOrderDTO orderDetails, List<DiningItemDTO> items, int
gID, int pID)
Am I missing anything here ?
<PlaceDiningOrder xmlns="http://tempuri.org/" id="o0" c:root="1">
<DiningOrderDTO i:type="n0:DiningOrderDTO" xmlns:n0="http://tempuri.org/">
<gID i:type="d:int">2444</gID>
<isInitialOrder i:type="d:boolean">true</isInitialOrder>
<paymentType i:type="d:string">cash</paymentType>
<requestedDeliveryDatetime i:type="d:dateTime"></requestedDeliveryDatetime>
<serveFor i:type="d:int">1</serveFor>
<totalAmount i:type="d:decimal">19</totalAmount>
</DiningOrderDTO>
<DiningItemDTO i:type="n1:DiningItemDTO" xmlns:n1="http://tempuri.org/">
<active i:type="d:boolean">true</active>
<counterID i:type="d:int">0</counterID>
<description i:type="d:string">Wilted Swiss chard and bean cassoulet with choice of 2 sides and 1 sauce.</description>
<diningCategoryID i:type="d:int">18</diningCategoryID>
<diningItemID i:type="d:int">54</diningItemID>
<diningItemModifierCategories i:null="true" />
<hasModifiers i:type="d:boolean">false</hasModifiers>
<imageURL i:null="true" /><instructions i:null="true" />
<itemOrder i:type="d:double">0.0</itemOrder>
<name i:type="d:string">Half Chicken Cooked Under a Brick</name>
<price i:type="d:decimal">19</price>
<quantity i:type="d:int">1</quantity>
<totalPriceWithModifiers i:type="d:decimal">19</totalPriceWithModifiers>
</DiningItemDTO>
<gID i:type="d:int">2444</gID>
<pID i:type="d:int">1</ID>
</PlaceDiningOrder>
Original comment by jul...@gmail.com
on 1 Sep 2011 at 5:23
Hi, I have been stuck on the same issue for about a week.
Finally found what the problem is, just not sure how to resolve.
<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:GetDate id="o0" c:root="1" xmlns:n0="http://tempuri.org/">
<dt i:type="d:dateTime">1970-01-01T00:00:00.033Z</dt>
</n0:GetDate>
</v:Body>
</v:Envelope>
Using the code requestDump above. This section "xmlns:n0="http://tempuri.org/""
is breaking .net ws calls, causing it to ignore input parameters. What is
should look like is something like this "xmlns="http://tempuri.org/" and also
remove the "n0" reference all over the request.
so your final xml should ideally look 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>
<GetDate id="o0" c:root="1" xmlns="http://tempuri.org/">
<dt i:type="d:dateTime">1970-01-01T00:00:00.033Z</dt>
</GetDate>
</v:Body>
</v:Envelope>
This xml above works, however i am not sure how to fix my Ksoap2 jar file
without the actual source. Please can you advise as to how to resolve?
Original comment by spoon...@gmail.com
on 2 Sep 2011 at 4:48
The source is on github so feel free to investigate with it and fix. However
there might be a different issue since it works for me and many others with
.net web services.
Original comment by mosa...@gmail.com
on 2 Sep 2011 at 4:53
[deleted comment]
Sorry... but I do not have the time to do that without being paid..
Original comment by mosa...@gmail.com
on 7 Sep 2011 at 7:38
Hi all,
To get the type of xml you need just especify:
envelope.dotNet = true;
I spent the whole day trying to pass a String to my webservice and there are a
lot of rules to follow for a parameter not to be null. On some posts all over
the internet you will read about setting this property to false, but at first I
was having 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>
<n0:LeerCodigo id="o0" c:root="1" xmlns:n0="uplatform/entrada">
<psParametrosJSON i:type="d:string">Param</psParametrosJSON>
</n0:LeerCodigo>
</v:Body>
</v:Envelope>
... and after setting envelope.dotNet = true I get:
<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>
<LeerCodigo xmlns="uplatform/entrada" id="o0" c:root="1">
<psParametrosJSON i:type="d:string">Param</psParametrosJSON>
</LeerCodigo>
</v:Body>
</v:Envelope>
and finally I can receive the String parameter.
Hope this helps, at least for you to get the xml format you were expecting.
Regards.
Original comment by ramon.ru...@gmail.com
on 1 Nov 2011 at 6:58
Evidently setting .net to true did the trick as expected.
Original comment by mosa...@gmail.com
on 18 Nov 2011 at 5:33
Original issue reported on code.google.com by
jul...@gmail.com
on 30 Aug 2011 at 9:23