Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 6136
985
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Webman Here", please check your private messages regarding an important administrative matter.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Amrit J Baruah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan,

Thanks for the response, it helps.

Regards,

Amrit
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!