soap - How to handle relative paths of xsds while publishing wsdl in spring web services? -
i have soap web services exposed through springs... need expose wsdl same. bean definition expose wsdl shown below.
<bean id="schemacollection" class="org.springframework.xml.xsd.commons.commonsxsdschemacollection"> <description> bean wrap messages.xsd (which imports types.xsd), , inlines them one. </description> <property name="xsds"> <list> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/prpa_in201301uv02.xsd</value> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/prpa_in201302uv02.xsd</value> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/prpa_in201304uv02.xsd</value> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/mcci_in000002uv01.xsd</value> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/prpa_in201309uv02.xsd</value> <value>/web-inf/classes/schema/hl7v3/ne2008/multicacheschemas/prpa_in201310uv02.xsd</value> </list> </property> <property name="inline" value="true"/> </bean> <bean id="pixmanager" class="org.springframework.ws.wsdl.wsdl11.defaultwsdl11definition"> <property name="schemacollection" ref ="schemacollection"/> <property name="porttypename" value="pixmanager_porttype"/> <property name="locationuri" value="/services/pixmanager/"/> </bean>
the problem facing here have child xsds referred these xsds shown below not getting resolved.
<xs:include schemalocation="../coreschemas/infrastructureroot.xsd"/>
i getting following error..
caused by: org.springframework.xml.xsd.commons.commonsxsdschemaexception: schema [servletcontext resource [/web-inf/classes/schema/hl7v3/ne2008/multicaches chemas/prpa_in201301uv02.xsd]] not loaded; nested exception java.lang.illegalargumentexception: resource path [/../coreschemas/infrastructu reroot.xsd] has been normalized [null] not valid
where [/../coreschemas/infrastructu reroot.xsd] relative path of child xsds.
you need extract schemas required interaction(s), folder structure this:
../coreschemas ../schemas
and "flatten" interaction schema , related schemas 1 may embed wsdl.
Comments
Post a Comment