BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-27-2007, 10:43 AM   #1
eyalo
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700g
PIN: N/A
Carrier: T-Mobile
Posts: 21
Default KSOAP2 and .NET web service

Please Login to Remove!

Hi

i am trying to use the ksoap2 with .NET web service.
it was to get to it but i am in a situation that i am getting a response that the server cannot read the soap header

"Server did not recognize the value of HTTP Header SOAPAction:"

checking the HttpTransport request shows that the soap message looks like the following:

<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>
<HW1 xmlns="www.qpay123.org" id="o0" c:root="1" />
</v:Body>
</v:Envelope>


i believe that the error message that refer to the empty header tag i have in the soap request but i cannot find the way to change it, the code that creates the soap message and the call is as follow:

SoapObject rpc = new SoapObject (NAMESPACE, METHOD);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.bodyOut = rpc;

envelope.encodingStyle = SoapSerializationEnvelope.XSD;

ht = new HttpTransport (URL);
ht.debug = true;
ht.call(METHOD,envelope);


in the last few days i read so many ksoap example which non of them really worked.

can anyone show me the light?

thanks in advance,
__________________
eyal
Offline  
Old 11-27-2007, 12:09 PM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

METHOD is used to create the SoapObject (correct in your code as far as i can see).
The call-method does not use METHOD.
Try
Code:
ht.call("urn:anonOutInOp", envelope);
instead.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 11-27-2007, 01:46 PM   #3
eyalo
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700g
PIN: N/A
Carrier: T-Mobile
Posts: 21
Default

Hi

thanks for the quick response.
i try what you said and i am still getting the same error message.

i still believe the reason is in the empty header tag that is added to the soap message, i have no clue how to remove it.

thanks,
__________________
eyal
Offline  
Old 11-28-2007, 11:18 AM   #4
brcewane
Thumbs Must Hurt
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: Rogers
Posts: 140
Default

Have you checked your SOAP encoding? are you using 1.0, 1.1 or 1.2 that might be source.
Offline  
Old 11-28-2007, 03:14 PM   #5
eyalo
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700g
PIN: N/A
Carrier: T-Mobile
Posts: 21
Default

Hi and thanks again,

i actually solved it based on your previous post.

i will code something more generic and post a complete example here maybe next week. so everyone can have an example to follow.

thanks for all your help.
__________________
eyal
Offline  
Old 01-16-2009, 02:51 AM   #6
jacytan
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Globe
Posts: 52
Default Question

hi,

i am using the HttpTransportBasicAuth class instead of the normal HttpTransport because my web service is secure.

i was wondering, when i pass the username and password in this class for authentication, where will they be placed? are they included in the SOAP header? if so, how can i verify its contents?
Offline  
Old 02-17-2009, 01:44 AM   #7
SunitK
New Member
 
Join Date: Feb 2009
Model: 8700
PIN: N/A
Carrier: Vodafone
Posts: 7
Default

Quote:
Originally Posted by eyalo View Post
Hi and thanks again,

i actually solved it based on your previous post.

i will code something more generic and post a complete example here maybe next week. so everyone can have an example to follow.

thanks for all your help.
can u plz p[ost the complete example ASAP
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Festo Lab-Volt 91005-20 Semiconductor Fundamentals Circuit Board Training Module picture

Festo Lab-Volt 91005-20 Semiconductor Fundamentals Circuit Board Training Module

$145.00



AlphaTest Custom Semiconductor Test Head  picture

AlphaTest Custom Semiconductor Test Head

$295.00



Dual Range Transistor Diode Semiconductor & Passive Curve Tracer Tester/Tracker picture

Dual Range Transistor Diode Semiconductor & Passive Curve Tracer Tester/Tracker

$26.99



Ferraz Shawmut A50P125-4TA Semiconductor Fuse picture

Ferraz Shawmut A50P125-4TA Semiconductor Fuse

$199.99



Semiconductor Refrigeration Cooler Thermoelectric Peltier Cold Plate 240W SALE picture

Semiconductor Refrigeration Cooler Thermoelectric Peltier Cold Plate 240W SALE

$32.30



Fuse, Semiconductor, Blade, FWP, 175A, 700V picture

Fuse, Semiconductor, Blade, FWP, 175A, 700V

$283.43







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.