File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port?" Watch "Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port?" New topic
Author

Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port?

Amrit J Baruah
Greenhorn

Joined: Jul 02, 2010
Posts: 3
I have got three WSDLS which contains same PortType suppose ABC. Under ABC in the three WSDL different operations are defined.

Now if I want to implement a HTTP server to provide the services defined by the WSDLs, I have to implement ABC. In the below example service1 and service2 are from two different wsdls.

public class ABCImpl implements ABC{



...........................
public void startServer() {
try {
................
server.start();
.............
endPoint.publish(server.createContext("/ABC"));

} catch (Exception e) {
e.printStackTrace();
}
}

public Service1Response service1(
Service1Request request) {

Service1Response resp = new Service1Response();

return resp;
}

@Override
public Service2Response service2(
Service2Request request) {
// TODO Auto-generated method stub
return null;
}

}

Now if I acccess like http://host:port/ABCImpl?wsdl only one wsdl is shown in the browser, that means server is not exposing both the wsdls.

So Do I need to run two servers for the two wsdls or is there any way to implement both the wsdls under the same server.

Thanks in advance
Devaka Cooray
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2691
    
    3

"Webman Here", please check your private messages regarding an important administrative matter.


Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
First of all, you cannot publish three WSDL at the same endpoint address.
An option is to merge the WSDLs by creating a PortType ABC that contains all the operations from the ABC PortType in the three different WSDLs.
Additionally, you do not implement a service in the manner you have done. Try searching the internet for a tutorial on wsdl-first development for the development environment you use.
Please do not hesitate to ask if there are additional questions!
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Amrit J Baruah
Greenhorn

Joined: Jul 02, 2010
Posts: 3
Hi Ivan,

Thanks for the response, it helps.

Regards,

Amrit
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port?
 
Similar Threads
newbie question: one war with two interfaces
Sharing sessions on client stubs for different services generated by Eclipse?
Same method in two classes - conflict?
Game Tutorials -->> Creating An Executable JAR File
Two or more JVM in a single machine