TastyCode
TastyCode

Reputation: 5799

Getting XmlSchemaException: Unable to locate imported document

Getting exception when accessing my webservice:

org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'test.xsd', relative to 'jndi:/localhost/proj/WEB-INF/wsdl/testwsdl#types1'.

Upvotes: 1

Views: 3073

Answers (1)

TastyCode
TastyCode

Reputation: 5799

I was accessing webservice from within my war and forgot to include .xsd files under WEB-INF

 <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.3</version>
    <configuration>
        <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
        <webResources>
            <resource>
                <directory>../service/src/main/resources</directory>
                <targetPath>WEB-INF/wsdl</targetPath>
                <includes>
                    <include>*.wsdl</include>
                    <include>*.xsd</include>
                </includes>
            </resource>
        </webResources>
    </configuration>
 </plugin>

Upvotes: 3

Related Questions