Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can i convert a interface to web servcice ?  RSS feed

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a projekt with an interface that gets called from other java programs.

Now the test department want to test this as a standalone program.

They want to call this interface via SoapUI.

Can i in a easy way convert this to webservice, så they can call my program.

Im using weblogic 9.0.,
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.5.0_14
Java home: /usr/lib/jvm/jrockit-R27.5.0-jdk1.5.0_14/jre
Default locale: da_DK, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-23-generic" arch: "amd64" Family: "unix"

I can do this manually, but thats a lot of work




Frank
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frank,
I can do this manually, but thats a lot of work

What IDE are you using for your development? Even freely available IDEs like NetBeans and Eclipse are equipped with web service and client generation tools. If you are not using any, pick one of these and work on!
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I may have misunderstood you, but to me it sounds like you want to create a mock web service that the test department can call.
If you have a WSDL, then you can use soapUI to do this for you. In fact, soapUI can even help you create a mock web service that can be deployed to a web container as a WAR.
With soapUI, the only thing you need to create are one or more SOAP responses. There may be a little scripting involved, depending on how advanced you want your mock web service to be.
If you do not have a WSDL, then you can create one by creating an endpoint implementation class that is annotated with @WebService and which implements the interface you spoke about. Then you use wsgen (comes with JDK 6) to create a WSDL file. The methods of the endpoint implementation class can be empty and return null, if required to return something - the main point is to create a WSDL that you can use in soapUI.

Best wishes!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!