I have one module where I have my XSD schemas, where one schema can reference an other using relative path within schema location:
Here is my solution for static WSDL and XSDs
@Bean(name = "OpportunityAttachmentService")
public Wsdl11Definition getOpportunityAttachmentServiceDefinition() {
SimpleWsdl11Definition wsdl11Definition =
new SimpleWsdl11Definition();
wsdl11Definition.setWsdl(
new ClassPathResource(
"wsdl/getOpportunityAttachment/BeP_getOpportunityAttachment_cuContract.wsdl"));
return wsdl11Definition;
}
@Bean(name = "getOpportunityAttachment_Request_CRM")
public XsdSchema getOpportunityAttachmentServiceRequestXsd() {
return new SimpleXsdSchema(
new ClassPathResource("wsdl/getOpportunityAttachment/getOpportunityAttachment_Request_CRM.xsd"));
}
@Bean(name = "getOpportunityAttachment_Response_CRM")
public XsdSchema getOpportunityAttachmentServiceResponseXsd() {
return new SimpleXsdSchema(
new ClassPathResource("wsdl/getOpportunityAttachment/getOpportunityAttachment_Response_CRM.xsd"));
}