I'm a first time user of spring ws. I was following the tutorial from the spring-ws reference manual and using DefaultWsdl11Definition to auto-generate my wsdl.
Code:
public class DashboardEndpoint extends AbstractJDomPayloadEndpoint {
private final DBInputService dbInputService;
public DashboardEndpoint (DBInputService dbInputService) {
this.dbInputService = dbInputService;
}
protected Element invokeInternal(Element request) throws Exception {
try {
dbInputService.insertBuild(parseRequest(request));
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
@SuppressWarnings("unchecked")
private BuildInfo parseRequest (Element root) throws ParseException {
...
}
spring-ws-servlet.xml
Code:
<bean id="dashboardEndpoint" class="com.adobe.production.dashboardWeb.DashboardEndpoint">
<constructor-arg ref="dbInputService"></constructor-arg>
</bean>
<bean id="dbInputService" class="com.adobe.production.dashboard.services.DBInputService" />
<bean
class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
<property name="mappings">
<props>
<prop key="{hxxp://production.adobe.com/dashboard}buildInfo">dashboardEndpoint</prop>
</props>
</property>
<property name="interceptors">
<bean
class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" /></property>
</bean>
<bean id="addBuild"
class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schema" ref="schema" /><property name="portTypeName" value="DashboardInput" />
<property name="locationUri" value="/dashboardWeb/" /><property name="targetNamespace" value="hxxp://production.adobe.com/dashboard/definitions"/>
</bean><bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
<property name="xsd" value="/WEB-INF/buildInfo.xsd" /></bean>
I'm new to wsdl creation. But the auto-generated wsdl doesn't look anything like the hand-written one in the tutorial. For example, I couldn't find any tags in mine.
Can someone let me know what I did wrong?
Thanks.