Xsd schema location can not be found in WSDL file












6















This problem still not solved since 3 days, really appreciated if someone can help, here is all the code below.



Problem is: this web service works well if I show the wsdl file (which is in my eclipse project directory) to the soapUI from hard disc. But it can not find the Request schema file if I give the url as:



http://localhost:8080/mwp/mws/mwsid.wsdl


This expose the wsdl correctly but cant find the schema, I get the error from soapUI:



ERROR:Failed to load url [http://localhost:8080/mwp/mws/Request.xsd]



this is the spring config file



<?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:sws="http://www.springframework.org/schema/web-services"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

<description>
</description>

<bean id="webServicePluginDescriptor"
class="com.mywebsite.ws.configuration.mtchWebservicePluginDescriptor" />

<bean id="payloadMapping"
class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
<property name="defaultEndpoint" ref="inferenceEndPoint" />
<property name="interceptors">
<list>
<ref local="validatingInterceptor" />
<ref local="payLoadInterceptor" />
</list>
</property>
</bean>

<bean id="payLoadInterceptor"
class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />

<bean id="validatingInterceptor"
class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">

<property name="schema"
value="classpath:/wsdl/Request.xsd" />
<property name="validateRequest" value="true" />
<property name="validateResponse" value="false" />
</bean>

<bean id="PropertyResource" class="com.mywebsite.ws.im.PropertyResource">
<property name="resource"
value="/WEB-INF/client-specific/InferenceMachine.properties" />
</bean>

<bean id="inferenceEndPoint" class="com.mywebsite.ws.web.InferenceEndPoint">
<property name="messageWebService" ref="messageWebService" />
</bean>

<bean id="messageWebService" class="com.mywebsite.ws.service.MessageWebService"
scope="request">
<aop:scoped-proxy />
<property name="inferenceService" ref="inferenceService" />
</bean>

<bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
<property name="xsd" value="classpath:/wsdl/Request.xsd" />
</bean>

<bean id="mwsid"
class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
<constructor-arg value="classpath:/wsdl/mtchwsdl.wsdl" />
</bean>

<bean id="inferenceService" class="com.mywebsite.ws.im.InferenceService"
scope="request">
<aop:scoped-proxy />
<property name="webServiceConfiguration" ref="wsPlayerConfiguration" />

<property name="properties">
<bean class="com.mywebsite.ws.im.PropertyResource">
<property name="resource"
value="/WEB-INF/client-specific/InferenceMachine.properties" />
</bean>
</property>
</bean>

<!-- ~~~~~~~ Application beans ~~~~~~~ -->
<bean id="wsPlayerConfiguration"
class="com.mywebsite.ws.configuration.WebServiceConfiguration"
scope="request">
<aop:scoped-proxy />
<property name="playerConfiguration" ref="playerConfiguration"></property>
<property name="configurationSetup" ref="configurationSetup"></property>
</bean>




this is the wsdl file:



 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:schema="http://www.mywebsitex.com/xml/webservice"
xmlns:tns="http://www.mywebsitex.com/xml/webservice"
targetNamespace="http://www.mywebsitex.com/xml/webservice">


<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
schemaLocation="Request.xsd"/>
</xsd:schema>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
schemaLocation="Response.xsd"/>
</xsd:schema>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
schemaLocation="Error.xsd"/>
</xsd:schema>
</wsdl:types>


<wsdl:message name="inferencerequest">
<!-- <wsdl:part element="schema:inferencerequest" name="inferencerequest"/> -->
</wsdl:message>
<wsdl:message name="inferenceresponse">
<!-- <wsdl:part element="schema:inferenceresponse" name="inferenceresponse"/> -->
</wsdl:message>
<wsdl:message name="errorresponse">
<!-- <wsdl:part element="schema:errorresponse" name="errorresponse"/> -->
</wsdl:message>

<wsdl:portType name="mtchWS">
<wsdl:operation name="inference">
<wsdl:input message="tns:inferencerequest" name="inferencerequest"/>
<wsdl:output message="tns:inferenceresponse" name="inferenceresponse"/>
<wsdl:fault message="tns:errorresponse" name="errorresponse"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="mtchWSBinding" type="tns:mtchWS">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="inference">
<soap:operation soapAction="http://www.mywebsitex.com/webservice"/>
<wsdl:input name="inferencerequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="inferenceresponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="errorreponse">
<!-- <soap:fault use="literal"/>-->
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="mtchWSService">
<wsdl:port binding="tns:mtchWSBinding" name="mtchWSPort">
<soap:address location="http://localhost:8080/mwp/mws"/>
</wsdl:port>
</wsdl:service>




and this is how I define in the web.xml:



<servlet>
<servlet-name>mws</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/resources/mtchwebservice/applicationContext-MtchWebService.xml</param-value>
</init-param>

<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>

<load-on-startup>2</load-on-startup>
</servlet>









share|improve this question



























    6















    This problem still not solved since 3 days, really appreciated if someone can help, here is all the code below.



    Problem is: this web service works well if I show the wsdl file (which is in my eclipse project directory) to the soapUI from hard disc. But it can not find the Request schema file if I give the url as:



    http://localhost:8080/mwp/mws/mwsid.wsdl


    This expose the wsdl correctly but cant find the schema, I get the error from soapUI:



    ERROR:Failed to load url [http://localhost:8080/mwp/mws/Request.xsd]



    this is the spring config file



    <?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:sws="http://www.springframework.org/schema/web-services"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

    <description>
    </description>

    <bean id="webServicePluginDescriptor"
    class="com.mywebsite.ws.configuration.mtchWebservicePluginDescriptor" />

    <bean id="payloadMapping"
    class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
    <property name="defaultEndpoint" ref="inferenceEndPoint" />
    <property name="interceptors">
    <list>
    <ref local="validatingInterceptor" />
    <ref local="payLoadInterceptor" />
    </list>
    </property>
    </bean>

    <bean id="payLoadInterceptor"
    class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />

    <bean id="validatingInterceptor"
    class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">

    <property name="schema"
    value="classpath:/wsdl/Request.xsd" />
    <property name="validateRequest" value="true" />
    <property name="validateResponse" value="false" />
    </bean>

    <bean id="PropertyResource" class="com.mywebsite.ws.im.PropertyResource">
    <property name="resource"
    value="/WEB-INF/client-specific/InferenceMachine.properties" />
    </bean>

    <bean id="inferenceEndPoint" class="com.mywebsite.ws.web.InferenceEndPoint">
    <property name="messageWebService" ref="messageWebService" />
    </bean>

    <bean id="messageWebService" class="com.mywebsite.ws.service.MessageWebService"
    scope="request">
    <aop:scoped-proxy />
    <property name="inferenceService" ref="inferenceService" />
    </bean>

    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
    <property name="xsd" value="classpath:/wsdl/Request.xsd" />
    </bean>

    <bean id="mwsid"
    class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
    <constructor-arg value="classpath:/wsdl/mtchwsdl.wsdl" />
    </bean>

    <bean id="inferenceService" class="com.mywebsite.ws.im.InferenceService"
    scope="request">
    <aop:scoped-proxy />
    <property name="webServiceConfiguration" ref="wsPlayerConfiguration" />

    <property name="properties">
    <bean class="com.mywebsite.ws.im.PropertyResource">
    <property name="resource"
    value="/WEB-INF/client-specific/InferenceMachine.properties" />
    </bean>
    </property>
    </bean>

    <!-- ~~~~~~~ Application beans ~~~~~~~ -->
    <bean id="wsPlayerConfiguration"
    class="com.mywebsite.ws.configuration.WebServiceConfiguration"
    scope="request">
    <aop:scoped-proxy />
    <property name="playerConfiguration" ref="playerConfiguration"></property>
    <property name="configurationSetup" ref="configurationSetup"></property>
    </bean>




    this is the wsdl file:



     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:schema="http://www.mywebsitex.com/xml/webservice"
    xmlns:tns="http://www.mywebsitex.com/xml/webservice"
    targetNamespace="http://www.mywebsitex.com/xml/webservice">


    <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
    schemaLocation="Request.xsd"/>
    </xsd:schema>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
    schemaLocation="Response.xsd"/>
    </xsd:schema>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
    schemaLocation="Error.xsd"/>
    </xsd:schema>
    </wsdl:types>


    <wsdl:message name="inferencerequest">
    <!-- <wsdl:part element="schema:inferencerequest" name="inferencerequest"/> -->
    </wsdl:message>
    <wsdl:message name="inferenceresponse">
    <!-- <wsdl:part element="schema:inferenceresponse" name="inferenceresponse"/> -->
    </wsdl:message>
    <wsdl:message name="errorresponse">
    <!-- <wsdl:part element="schema:errorresponse" name="errorresponse"/> -->
    </wsdl:message>

    <wsdl:portType name="mtchWS">
    <wsdl:operation name="inference">
    <wsdl:input message="tns:inferencerequest" name="inferencerequest"/>
    <wsdl:output message="tns:inferenceresponse" name="inferenceresponse"/>
    <wsdl:fault message="tns:errorresponse" name="errorresponse"/>
    </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="mtchWSBinding" type="tns:mtchWS">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="inference">
    <soap:operation soapAction="http://www.mywebsitex.com/webservice"/>
    <wsdl:input name="inferencerequest">
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output name="inferenceresponse">
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="errorreponse">
    <!-- <soap:fault use="literal"/>-->
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="mtchWSService">
    <wsdl:port binding="tns:mtchWSBinding" name="mtchWSPort">
    <soap:address location="http://localhost:8080/mwp/mws"/>
    </wsdl:port>
    </wsdl:service>




    and this is how I define in the web.xml:



    <servlet>
    <servlet-name>mws</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:/resources/mtchwebservice/applicationContext-MtchWebService.xml</param-value>
    </init-param>

    <init-param>
    <param-name>transformWsdlLocations</param-name>
    <param-value>true</param-value>
    </init-param>

    <load-on-startup>2</load-on-startup>
    </servlet>









    share|improve this question

























      6












      6








      6


      2






      This problem still not solved since 3 days, really appreciated if someone can help, here is all the code below.



      Problem is: this web service works well if I show the wsdl file (which is in my eclipse project directory) to the soapUI from hard disc. But it can not find the Request schema file if I give the url as:



      http://localhost:8080/mwp/mws/mwsid.wsdl


      This expose the wsdl correctly but cant find the schema, I get the error from soapUI:



      ERROR:Failed to load url [http://localhost:8080/mwp/mws/Request.xsd]



      this is the spring config file



      <?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:sws="http://www.springframework.org/schema/web-services"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop
      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

      <description>
      </description>

      <bean id="webServicePluginDescriptor"
      class="com.mywebsite.ws.configuration.mtchWebservicePluginDescriptor" />

      <bean id="payloadMapping"
      class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
      <property name="defaultEndpoint" ref="inferenceEndPoint" />
      <property name="interceptors">
      <list>
      <ref local="validatingInterceptor" />
      <ref local="payLoadInterceptor" />
      </list>
      </property>
      </bean>

      <bean id="payLoadInterceptor"
      class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />

      <bean id="validatingInterceptor"
      class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">

      <property name="schema"
      value="classpath:/wsdl/Request.xsd" />
      <property name="validateRequest" value="true" />
      <property name="validateResponse" value="false" />
      </bean>

      <bean id="PropertyResource" class="com.mywebsite.ws.im.PropertyResource">
      <property name="resource"
      value="/WEB-INF/client-specific/InferenceMachine.properties" />
      </bean>

      <bean id="inferenceEndPoint" class="com.mywebsite.ws.web.InferenceEndPoint">
      <property name="messageWebService" ref="messageWebService" />
      </bean>

      <bean id="messageWebService" class="com.mywebsite.ws.service.MessageWebService"
      scope="request">
      <aop:scoped-proxy />
      <property name="inferenceService" ref="inferenceService" />
      </bean>

      <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
      <property name="xsd" value="classpath:/wsdl/Request.xsd" />
      </bean>

      <bean id="mwsid"
      class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
      <constructor-arg value="classpath:/wsdl/mtchwsdl.wsdl" />
      </bean>

      <bean id="inferenceService" class="com.mywebsite.ws.im.InferenceService"
      scope="request">
      <aop:scoped-proxy />
      <property name="webServiceConfiguration" ref="wsPlayerConfiguration" />

      <property name="properties">
      <bean class="com.mywebsite.ws.im.PropertyResource">
      <property name="resource"
      value="/WEB-INF/client-specific/InferenceMachine.properties" />
      </bean>
      </property>
      </bean>

      <!-- ~~~~~~~ Application beans ~~~~~~~ -->
      <bean id="wsPlayerConfiguration"
      class="com.mywebsite.ws.configuration.WebServiceConfiguration"
      scope="request">
      <aop:scoped-proxy />
      <property name="playerConfiguration" ref="playerConfiguration"></property>
      <property name="configurationSetup" ref="configurationSetup"></property>
      </bean>




      this is the wsdl file:



       <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:schema="http://www.mywebsitex.com/xml/webservice"
      xmlns:tns="http://www.mywebsitex.com/xml/webservice"
      targetNamespace="http://www.mywebsitex.com/xml/webservice">


      <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Request.xsd"/>
      </xsd:schema>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Response.xsd"/>
      </xsd:schema>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Error.xsd"/>
      </xsd:schema>
      </wsdl:types>


      <wsdl:message name="inferencerequest">
      <!-- <wsdl:part element="schema:inferencerequest" name="inferencerequest"/> -->
      </wsdl:message>
      <wsdl:message name="inferenceresponse">
      <!-- <wsdl:part element="schema:inferenceresponse" name="inferenceresponse"/> -->
      </wsdl:message>
      <wsdl:message name="errorresponse">
      <!-- <wsdl:part element="schema:errorresponse" name="errorresponse"/> -->
      </wsdl:message>

      <wsdl:portType name="mtchWS">
      <wsdl:operation name="inference">
      <wsdl:input message="tns:inferencerequest" name="inferencerequest"/>
      <wsdl:output message="tns:inferenceresponse" name="inferenceresponse"/>
      <wsdl:fault message="tns:errorresponse" name="errorresponse"/>
      </wsdl:operation>
      </wsdl:portType>

      <wsdl:binding name="mtchWSBinding" type="tns:mtchWS">
      <soap:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="inference">
      <soap:operation soapAction="http://www.mywebsitex.com/webservice"/>
      <wsdl:input name="inferencerequest">
      <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="inferenceresponse">
      <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="errorreponse">
      <!-- <soap:fault use="literal"/>-->
      </wsdl:fault>
      </wsdl:operation>
      </wsdl:binding>

      <wsdl:service name="mtchWSService">
      <wsdl:port binding="tns:mtchWSBinding" name="mtchWSPort">
      <soap:address location="http://localhost:8080/mwp/mws"/>
      </wsdl:port>
      </wsdl:service>




      and this is how I define in the web.xml:



      <servlet>
      <servlet-name>mws</servlet-name>
      <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
      <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:/resources/mtchwebservice/applicationContext-MtchWebService.xml</param-value>
      </init-param>

      <init-param>
      <param-name>transformWsdlLocations</param-name>
      <param-value>true</param-value>
      </init-param>

      <load-on-startup>2</load-on-startup>
      </servlet>









      share|improve this question














      This problem still not solved since 3 days, really appreciated if someone can help, here is all the code below.



      Problem is: this web service works well if I show the wsdl file (which is in my eclipse project directory) to the soapUI from hard disc. But it can not find the Request schema file if I give the url as:



      http://localhost:8080/mwp/mws/mwsid.wsdl


      This expose the wsdl correctly but cant find the schema, I get the error from soapUI:



      ERROR:Failed to load url [http://localhost:8080/mwp/mws/Request.xsd]



      this is the spring config file



      <?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:sws="http://www.springframework.org/schema/web-services"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop
      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

      <description>
      </description>

      <bean id="webServicePluginDescriptor"
      class="com.mywebsite.ws.configuration.mtchWebservicePluginDescriptor" />

      <bean id="payloadMapping"
      class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
      <property name="defaultEndpoint" ref="inferenceEndPoint" />
      <property name="interceptors">
      <list>
      <ref local="validatingInterceptor" />
      <ref local="payLoadInterceptor" />
      </list>
      </property>
      </bean>

      <bean id="payLoadInterceptor"
      class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />

      <bean id="validatingInterceptor"
      class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">

      <property name="schema"
      value="classpath:/wsdl/Request.xsd" />
      <property name="validateRequest" value="true" />
      <property name="validateResponse" value="false" />
      </bean>

      <bean id="PropertyResource" class="com.mywebsite.ws.im.PropertyResource">
      <property name="resource"
      value="/WEB-INF/client-specific/InferenceMachine.properties" />
      </bean>

      <bean id="inferenceEndPoint" class="com.mywebsite.ws.web.InferenceEndPoint">
      <property name="messageWebService" ref="messageWebService" />
      </bean>

      <bean id="messageWebService" class="com.mywebsite.ws.service.MessageWebService"
      scope="request">
      <aop:scoped-proxy />
      <property name="inferenceService" ref="inferenceService" />
      </bean>

      <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
      <property name="xsd" value="classpath:/wsdl/Request.xsd" />
      </bean>

      <bean id="mwsid"
      class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
      <constructor-arg value="classpath:/wsdl/mtchwsdl.wsdl" />
      </bean>

      <bean id="inferenceService" class="com.mywebsite.ws.im.InferenceService"
      scope="request">
      <aop:scoped-proxy />
      <property name="webServiceConfiguration" ref="wsPlayerConfiguration" />

      <property name="properties">
      <bean class="com.mywebsite.ws.im.PropertyResource">
      <property name="resource"
      value="/WEB-INF/client-specific/InferenceMachine.properties" />
      </bean>
      </property>
      </bean>

      <!-- ~~~~~~~ Application beans ~~~~~~~ -->
      <bean id="wsPlayerConfiguration"
      class="com.mywebsite.ws.configuration.WebServiceConfiguration"
      scope="request">
      <aop:scoped-proxy />
      <property name="playerConfiguration" ref="playerConfiguration"></property>
      <property name="configurationSetup" ref="configurationSetup"></property>
      </bean>




      this is the wsdl file:



       <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:schema="http://www.mywebsitex.com/xml/webservice"
      xmlns:tns="http://www.mywebsitex.com/xml/webservice"
      targetNamespace="http://www.mywebsitex.com/xml/webservice">


      <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Request.xsd"/>
      </xsd:schema>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Response.xsd"/>
      </xsd:schema>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://www.mywebsitex.com/xml/webservice"
      schemaLocation="Error.xsd"/>
      </xsd:schema>
      </wsdl:types>


      <wsdl:message name="inferencerequest">
      <!-- <wsdl:part element="schema:inferencerequest" name="inferencerequest"/> -->
      </wsdl:message>
      <wsdl:message name="inferenceresponse">
      <!-- <wsdl:part element="schema:inferenceresponse" name="inferenceresponse"/> -->
      </wsdl:message>
      <wsdl:message name="errorresponse">
      <!-- <wsdl:part element="schema:errorresponse" name="errorresponse"/> -->
      </wsdl:message>

      <wsdl:portType name="mtchWS">
      <wsdl:operation name="inference">
      <wsdl:input message="tns:inferencerequest" name="inferencerequest"/>
      <wsdl:output message="tns:inferenceresponse" name="inferenceresponse"/>
      <wsdl:fault message="tns:errorresponse" name="errorresponse"/>
      </wsdl:operation>
      </wsdl:portType>

      <wsdl:binding name="mtchWSBinding" type="tns:mtchWS">
      <soap:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="inference">
      <soap:operation soapAction="http://www.mywebsitex.com/webservice"/>
      <wsdl:input name="inferencerequest">
      <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="inferenceresponse">
      <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="errorreponse">
      <!-- <soap:fault use="literal"/>-->
      </wsdl:fault>
      </wsdl:operation>
      </wsdl:binding>

      <wsdl:service name="mtchWSService">
      <wsdl:port binding="tns:mtchWSBinding" name="mtchWSPort">
      <soap:address location="http://localhost:8080/mwp/mws"/>
      </wsdl:port>
      </wsdl:service>




      and this is how I define in the web.xml:



      <servlet>
      <servlet-name>mws</servlet-name>
      <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
      <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:/resources/mtchwebservice/applicationContext-MtchWebService.xml</param-value>
      </init-param>

      <init-param>
      <param-name>transformWsdlLocations</param-name>
      <param-value>true</param-value>
      </init-param>

      <load-on-startup>2</load-on-startup>
      </servlet>






      java web-services spring soap wsdl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 17 '11 at 21:07









      SpringSpring

      3,2092482157




      3,2092482157
























          1 Answer
          1






          active

          oldest

          votes


















          9














          Changing:



          <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          to:



          <bean id="Request" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          should get the schema resolution of Request.xsd to work. The MessageDispatcherServlet looks for XsdSchema types and resolves the request for a xsd to the schema based on the id/name.






          share|improve this answer
























          • Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

            – Spring
            Jun 18 '11 at 9:42












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6391865%2fxsd-schema-location-can-not-be-found-in-wsdl-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          9














          Changing:



          <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          to:



          <bean id="Request" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          should get the schema resolution of Request.xsd to work. The MessageDispatcherServlet looks for XsdSchema types and resolves the request for a xsd to the schema based on the id/name.






          share|improve this answer
























          • Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

            – Spring
            Jun 18 '11 at 9:42
















          9














          Changing:



          <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          to:



          <bean id="Request" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          should get the schema resolution of Request.xsd to work. The MessageDispatcherServlet looks for XsdSchema types and resolves the request for a xsd to the schema based on the id/name.






          share|improve this answer
























          • Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

            – Spring
            Jun 18 '11 at 9:42














          9












          9








          9







          Changing:



          <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          to:



          <bean id="Request" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          should get the schema resolution of Request.xsd to work. The MessageDispatcherServlet looks for XsdSchema types and resolves the request for a xsd to the schema based on the id/name.






          share|improve this answer













          Changing:



          <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          to:



          <bean id="Request" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="classpath:/wsdl/Request.xsd" />
          </bean>


          should get the schema resolution of Request.xsd to work. The MessageDispatcherServlet looks for XsdSchema types and resolves the request for a xsd to the schema based on the id/name.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 18 '11 at 2:50









          Biju KunjummenBiju Kunjummen

          40.6k990111




          40.6k990111













          • Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

            – Spring
            Jun 18 '11 at 9:42



















          • Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

            – Spring
            Jun 18 '11 at 9:42

















          Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

          – Spring
          Jun 18 '11 at 9:42





          Wow, I would like to give you a 100 point for this, Tnx working now! Is my Response.xsd is as importtant as Request.xsd while creating wsdl? Because I only validate the request.xml, response.xsd is something for clients that they look and know how a response looks like?

          – Spring
          Jun 18 '11 at 9:42




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6391865%2fxsd-schema-location-can-not-be-found-in-wsdl-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith