I'm using soapUI to inspect the generated reponses from a spring ws web service. I noticed every namespace from all of the imported xsds are included in the reponse, notice the ns2-8. Below is a generated response:
Here are my spring ws beans:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schem...ng-oxm-1.5.xsd">
<!-- Endpoint Mappings (Analagous to SimpleUrlMapping with Spring MVC) -->
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
</property>
</bean>
<!-- Endpoints -->
<bean id="listEndpoint" class="com.company.ws.endpoint.ListEndpoint">
<property name="dropDownService" ref="dropDownService"/>
</bean>
<bean id="projectEndpoint" class="com.company.ws.endpoint.project.ProjectEndpoint">
<constructor-arg ref="projectService"/>
<constructor-arg ref="javaBeanMapper"/>
</bean>
<bean id="projectTeamEndpoint" class="com.company.ws.endpoint.project.ProjectTeamEndpoint">
<constructor-arg ref="projectContactService"/>
<constructor-arg ref="javaBeanMapper"/>
</bean>
<bean id="safetySurveyEndpoint" class="com.company.ws.endpoint.purchasing.SafetySurveyEndpoint">
<constructor-arg index="0" ref="safetyAssessmentService"/>
</bean>
<bean id="subInformationFormEndpoint" class="com.company.ws.endpoint.purchasing.SubInformationFormEndpoint">
<constructor-arg ref="subInformationFormService"/>
<constructor-arg ref="javaBeanMapper"/>
</bean>
<!-- OXM -->
<bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
<constructor-arg ref="marshaller" />
</bean>
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="contextPaths">
<list>
<value>com.company.schema.message.common.v1</value>
<value>com.company.schema.message.project.v1</value>
<value>com.company.schema.message.purchasing.v1</value>
<value>com.company.schema.type.common.v1</value>
<value>com.company.schema.type.company.v1</value>
<value>com.company.schema.type.project.v1</value>
<value>com.company.schema.type.purchasing.v1</value>
</list>
</property>
</bean>
<!-- Schemas -->
<bean id="listSchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true"/>
<property name="xsds">
<list>
<value>classpath:/com/company/schema/message/common/list.xsd</value>
</list>
</property>
</bean>
<bean id="projectSchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true"/>
<property name="xsds">
<list>
<value>classpath:/com/company/schema/message/project/project.xsd</value>
</list>
</property>
</bean>
<bean id="projectTeamSchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true"/>
<property name="xsds">
<list>
<value>classpath:/com/company/schema/message/project/projectteam.xsd</value>
</list>
</property>
</bean>
<bean id="safetysurveySchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true"/>
<property name="xsds">
<list>
<value>classpath:/com/company/schema/message/purchasing/safetysurvey.xsd</value>
</list>
</property>
</bean>
<bean id="sifSchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true"/>
<property name="xsds">
<list>
<value>classpath:/com/company/schema/message/purchasing/sif.xsd</value>
</list>
</property>
</bean>
<!-- Wsdls -->
<bean id="list" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="listSchemaCollection"/>
<property name="portTypeName" value="List" />
<property name="locationUri" value="/services/list" />
<property name="targetNamespace" value="http://company.com/schema/contract/common/v1" />
<property name="createSoap11Binding" value="true"/>
</bean>
<bean id="project" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="projectSchemaCollection"/>
<property name="portTypeName" value="Project" />
<property name="locationUri" value="/services/project" />
<property name="targetNamespace" value="http://company.com/schema/contract/project/v1" />
<property name="createSoap11Binding" value="true"/>
</bean>
<bean id="projectteam" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="projectTeamSchemaCollection"/>
<property name="portTypeName" value="ProjectTeam" />
<property name="locationUri" value="/services/projectteam" />
<property name="targetNamespace" value="http://company.com/schema/contract/project/v1" />
<property name="createSoap11Binding" value="true"/>
</bean>
<bean id="safetysurvey" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="safetysurveySchemaCollection"/>
<property name="portTypeName" value="SafetySurvey" />
<property name="locationUri" value="/services/safetysurvey" />
<property name="targetNamespace" value="http://company.com/schema/contract/purchasing/v1" />
<property name="createSoap11Binding" value="true"/>
</bean>
<bean id="sif" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="sifSchemaCollection"/>
<property name="portTypeName" value="SIF" />
<property name="locationUri" value="/services/sif" />
<property name="targetNamespace" value="http://company.com/schema/contract/purchasing/v1" />
<property name="createSoap11Binding" value="true"/>
</bean>
<!-- ======== Dozer Mapper (Java Bean to Java Bean mapper ) ========== -->
<bean id="javaBeanMapper" class="org.dozer.spring.DozerBeanMapperFactoryBean" scope="singleton">
<property name="mappingFiles">
<list>
<value>classpath*:dozer-bean-mappings.xml</value>
</list>
</property>
</bean>
</beans>
I'm not overly concerned about it untill a year or two down the road when i have 15,20,...n more services.
What are my options to adjust this behavior, if any at all?
Thanks
-Russ