Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

create a web sevice in jdevelolper using the existing Java file

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am pl/sql developer and new to java, I want to create a web sevice in jdevelolper using the existing Java file eg.accessfile.java.
I like to how to open the existing .java in jdeveloper and using with this file I want to create the web sevice.
I already create the webservice using this tutorial in the below link but there they create Java class and then create web service. But I want to use the exisitng java file
http://www.baigzeeshan.com/2010/11/creating-webservice-from-java-class-in.html
Please help me where to start.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you could follow the same steps mentioned in the link/video (copy your java file content to the new file and create a web service out of it)
 
tahir ahmed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply,
I can able to open and the exisitng Java and run succesfully. Again I stop when creating the web service in step 5 all the methods are disable and I can't proceed with out it it give me STATIC METHOD " method name" CANNOT BE PUBLISH IN WEB SERVICE if I remove the statiC in the java script then I can't able to compile and it's give me the error "Error(14,37): non-static method getPrintServices() cannot be referenced from a static context".
Please reply me how to solve this issue.
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't gone through the video you are following, but for the latter issue you are facing use an instance of the class and call the method "getPrintServices()" on that instance. Would that help here?
 
tahir ahmed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was able to create the webservice and deployed into the webloigc server and successfully tested from the weblogic server. But when we call this webservice from the Oracle database using utl_http.
I am forwarding the WSDL file and the PL/SQL fucntion which calling the webservice in given below.
And how can I test this webservice from browser.
Please help me to resolve this.
Thanks in advance.

 
Vijitha Kumara
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

And how can I test this webservice from browser.



You can write a servlet (and related other components needed) to be invoked as necessary, so that it talks to your DB function eventually. You can have the servlet then send the response to the browser...
 
tahir ahmed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. As I new to java & web services can please send me any sample for that which is related to my service as I have short time to complete this.
Thanks in advance.
 
Vijitha Kumara
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at thid for a servlet example. And then you can call any other POJO bean method(s) form there which is responsible of handling procedure/function call to the DB. And then return any response as needed from the doGet() method itself.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic