Jaclyn Tan

Greenhorn
+ Follow
since Jan 16, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jaclyn Tan

This is my .NET Web Service. AuthHeader is a class that contains two strings, username and password.



For the kSOAP call, I just included the function executeWebService(). This is my code.



As for JSR172, I did not create any stubs of the Web Service because I don’t have a WTK with me.

I found this tutorial about JSR172 and how to implement it, and that’s how I did it. If you want to read about it, its title is "J2ME Web Services Specification" from Sun Microsystems. I could not upload it in this post because it does not allow .pdf files.

I’ve used almost all classes that I could in trying to create a web service client using JSR172. I’ve used javax.xml.rpc, javax.xml.namespace.QName and javax.microedition.xml.rpc. The only class I haven’t used so far is the javax.xml.parsers. But I don’t know what’s the use of this in my problem. Is there really no available api that I can use to add these SOAP headers in JSR172? I really have to hardcode the SOAP message like you said in your earlier post?
15 years ago
Hi Aleksandar,

Thank you very much for your quick reply.

Your first suggesstion worked for me. I just replaced that part of my code with what you provided and it worked. I didn't have any problem with the prefixes or whatsoever. Isn't it amazing? And i owe it all to you. Thank you very much!

Now my next step is how to do this using JSR172. Do you have any idea on how to do this?
15 years ago
hi aleksandar,

can you help me with the headerOut in kSoap? i was trying it but somehow, my username and password is always a blank. this is what i did:



im using a .net web service which returns the username and password that was passed. but all i get is null. i checked the request dump, the headers were already included. Can you please help me?
15 years ago
Hi Aleksandar,
Thanks for the response. I looked at the request and response of these web services and all it has is an empty header tag. As for your suggestion, i don't think my superiors would agree to hardcoding the header information as it would be very risking especially dealing with security authentication. I will keep on looking until i find the solution to this dilemma.

Hi Guadalupe,
I wasn't able to include information in the SOAP header. As what i explained to Aleksandar, i was only able to set the properties of the stubs, using Stub.USERNAME_PROPERTY and Stub.PASSWORD_PROPERTY. But if you mean this example, then i can give you a sample code. I am still trying to figure out how to include information in the SOAP header.
15 years ago
hi Aleksandar Babic,

you mentioned problems with authentication because username and password goes to the soap header?
i already tried implementing JSR172 and it worked successfully even with authentication.

i used setProperty() method of the Operation class and set Stub.USERNAME_PROPERTY and Stub.PASSWORD_PROPERTY.

What i'm wondering is, by setting these stubs, are these included in the SOAP header already?
15 years ago