java - Spring Integration not exposing WSDL -


i new spring integration. creating simple poc hello world code below

web.xml

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" version="2.4"     xsi:schemalocation="http://java.sun.com/xml/ns/j2ee     http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">     <description>ws:inbound-gateway sample</description>      <servlet>         <servlet-name>spring-ws</servlet-name>         <servlet-    class>org.springframework.ws.transport.http.messagedispatcherservlet</servlet-    class>         <init-param>             <param-name>contextconfiglocation</param-name>             <param-value>web-inf/spring-ws-config.xml</param-value>         </init-param>         <load-on-startup>1</load-on-startup>     </servlet>  <servlet-mapping>     <servlet-name>spring-ws</servlet-name>     <url-pattern>/*</url-pattern> </servlet-mapping>   <welcome-file-list>     <welcome-file>index.html</welcome-file> </welcome-file-list> 

spring-ws-config.xml

<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans.xsd">      <import resource="classpath:/meta-inf/spring/integration/inbound-    gateway-config.xml"/>      <!-- ensures incoming requests routed     ws:inbound-gateway -->     <bean class="org.springframework.ws.server.endpoint.mapping.uriendpointmapping">         <property name="defaultendpoint" ref="hello-world"/>     </bean>  </beans> 

inbound-gateway-config.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-ws="http://www.springframework.org/schema/integration/ws" xsi:schemalocation="http://www.springframework.org/schema/integration/ws http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd     http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">      <int:channel id="input"/>      <int-ws:inbound-gateway id="hello-world" request-channel="input"/>      <int:service-activator input-channel="input">         <bean class="org.springframework.integration.samples.ws.helloworldws">             <property name="helloworldbo" ref="helloworldbo" />         </bean>     </int:service-activator>      <bean id="helloworldbo" class="org.springframework.integration.samples.bo.helloworldboimpl" /> </beans> 

helloworldbo.java

package org.springframework.integration.samples.bo;  import org.springframework.stereotype.service;  @service public interface helloworldbo{       string gethelloworld(string str);  } 

helloworldboimpl.java

package org.springframework.integration.samples.bo;    public class helloworldboimpl implements helloworldbo{      public string gethelloworld(string str){         return "jax-ws + spring! " + str;     }  } 

helloworldws.java

package org.springframework.integration.samples.ws;  import org.springframework.integration.samples.bo.helloworldbo; import org.springframework.ws.server.endpoint.annotation.endpoint;    @endpoint public class helloworldws{       helloworldbo helloworldbo;       public void sethelloworldbo(helloworldbo helloworldbo) {         this.helloworldbo = helloworldbo;     }      public string gethelloworld(string str) {          return helloworldbo.gethelloworld(str);      }  } 

index.html

the web service has been deployed.  may issue soap requests. 

this program working not exposing wsdl. displaying html contents on following link http://localhost:8080/hello-world/

but not displaying wsdl tried following ways getting blank page

  1. http://localhost:8080/hello-world/hello
  2. http://localhost:8080/hello-world/hello.wsdl
  3. http://localhost:8080/hello-world/hello?wsdl

spring integration ws endpoints sit on top of spring web services infrastructure.

see spring web services documentation how expose wsdl web service.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

node.js - Express and Redis - If session exists for this user, don't allow access -