• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

call web service from java interface possible?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all!

i am new to web services and i would like to know whether it's possible to call a web service from a java user interface. all the examples i have met are creating bpel web service clients in jsp!(i am working in netbeans)
if anyone has a good tutorial or link with appropriate example in mind, please share it with me!
any help appreciated!
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Axis
Axis2
The Java Web Services Tutorial
[ August 25, 2007: Message edited by: Rene Larsen ]
 
timothy smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much for answering!

unfortunately it still hasn't answered my question. i am using netbeans and have already created the bpel project. what i need to do now is create the web service client. in all cases i have met in internet, the web client interacts with the web service via jsp page. what i want though is to create a web service client who is a java desktop application. does anyone know how to create such a web service client? thank you all!
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the BPEL has generated a WSDL then 3. WSDL2Java: Generate the Server-side Wrapper Code and Stubs For Easy Client Access shows you how to write a command line client with Axis 1.x. The code in a desktop application wouldn't be much different.

If course if you are using NetBeans with the Java 6 SDK then you should be using JAX-WS instead (I think it uses wscompile/wsimport or something like that instead of WSDL2Java).
 
timothy smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i am using java 6 sdk. what i cant understand is the following: i create a java desktop application with one button only. i then create a web client for that project by pointing at the local wsdl file and finally when i am trying to add some line in the action which will be performed by the button i get warnings!

the code which i am adding is generated automatically by netbeans when i right click in the source and choose Web Service Client Resources --> Call Web Service Operation. the actual code is as follows :



the error i get is cannot find symbol LoanRequestorService etc in package testing. Does anyone recognizes what i am doing wrong??
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • Find the generated .java files to determine whether these classes are actually inside the "testing" package.
  • Determine if the classpath in the execution environment actually includes the directory to which those .java files are compiled as .class files.

  •  
    timothy smith
    Greenhorn
    Posts: 11
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    hmm i am not quit sure that i understand what you are saying.. but i am having another problem now, it isnt possible to make a new web client for my java desktop application, because i get a failed message after build! things are just getting worst!
     
    Lookout! Runaway whale! Hide behind this tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
    reply
      Bookmark Topic Watch Topic
    • New Topic