java - Multiple xsd schemas in ws message validator - why is the resource not found in schemaCollection but found in xsdSchema? -


i'm trying find out why using simplexsdschema set xsd resource works

<bean id="xsdschema" class="org.springframework.xml.xsd.simplexsdschema">     <property name="xsd" value="/web-inf/schema.xsd"/> </bean> 

whereas using commonsxsdschemacollection not. intend use provide multiple xsd's. prefer approach importing xsd inside 1 another.

<bean id="schemacollection"       class="org.springframework.xml.xsd.commons.commonsxsdschemacollection">     <!--<property name="resourceloader" ref="resourceloader"/>-->     <property name="xsds">         <list>             <value>/web-inf/schema.xsd"</value>         </list>     </property>     <property name="inline" value="true" /> </bean> 

when using marked below error is: servletcontext resource [/web-inf/schema.xsd"] not exit

precisely

 error creating bean name 'org.springframework.ws.soap.server.endpoint.interceptor.payloadvalidatinginterceptor#0' defined in servletcontext resource [/web-inf/security-context.xml]:   cannot resolve reference bean 'schemacollection' while setting bean property 'schemacollection'; nested exception org.springframework.beans.factory.beancreationexception: error creating  bean name 'schemacollection' defined in servletcontext resource [/web-inf/security-context.xml]: invocation of init method failed; nested exception java.lang.illegalargumentexception: servletcontext resource [/web-inf/schema.xsd"] not exit 

usage:

    <bean class="org.springframework.ws.soap.server.endpoint.interceptor.payloadvalidatinginterceptor">         <property name="errorhandler" ref="customvalidationerrorhandler"/>         <!--<property name="xsdschema" ref="xsdschema"/>-->         <property name="schemacollection" ref="schemacollection"/>     </bean> 

does have clue it? there resourceloader should use? (the app packed in war , deployed application server remains unexploded).

there typo in config:

        <value>/web-inf/schema.xsd"</value> 

this should be:

        <value>/web-inf/schema.xsd</value> 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -