• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web service client in j2se

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the code of webservice call in j2me using ksoap. which is working good.
public String getCount() throws Exception {
StringBuffer sb = new StringBuffer();
SoapObject client = new SoapObject("http://xxxxxxx/cqforms/", "GetCount");
client.addProperty("Mode", criteria.by);
client.addProperty("SearchString", txtSearch.getText());
HttpTransport ht = new HttpTransport("http://xxxxxxxxx/cqforms/Service1.asmx", "GetCount");
sb.append("" + ht.call(client));
return sb.toString();
}
how do i call the same webservice in swing application. i am using netbeans 6.9 IDE.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any reason you don't want to use the J2SE version of kSOAP? (I haven't used kSOAP, but there's a J2SE jar on the sourceforge files page.)

 
mani senthil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got that, but HttpTransport class is not available in that jar. is there any alternative to that class
 
Jason Cone
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mani senthil wrote:I got that, but HttpTransport class is not available in that jar. is there any alternative to that class


There's the HttpTransportSE class.
 
mani senthil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much Jason Cone. It is working now.
 
Everyone is a villain in someone else's story. Especially this devious tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic