Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: more than one schema in PayloadValidatingInterceptor

  1. #11

    Default

    Quote Originally Posted by Arjen Poutsma View Post
    Please create an issue here: http://opensource.atlassian.com/proj...ing/browse/SWS. Make sure to attach the multiple schema files which show the problem, if possible.
    done! http://opensource.atlassian.com/proj...browse/SWS-176

    hopefully somebody can quickly fix it.

  2. #12

    Default

    Quote Originally Posted by marknoten View Post
    Arjen,

    If I switch the order than the FileSubmission Web Services works well and visa versa. Could it be that it's because the two XSD schemas share the same target namespace?
    Yes! this is the problem. After Arjen created a unit test i noticed that he had separate namespaces for each of this xsd files. So i changed the namespaces on my xsd and everything worked.

  3. #13
    Join Date
    Nov 2007
    Posts
    4

    Default

    The problem still exists in Spring-WS 1.0.2.

  4. #14
    Join Date
    Sep 2006
    Location
    Germany
    Posts
    73

    Default

    The namespace collition problem was also the point we hit as we built a second webservice.
    Therefore, we set a unique target namespace for every webservice we deploy.

    As long as the two webservices got no relation to each other, this isn't a problem.
    But if you have to deploy another version of an existing webservice in parallel to the old one (e.g to not break other apps that use your service), this is not optimal.

    Btw: The PayloadValidationInterceptor seems to accept schema file wildcards also:
    <bean class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
    <property name="schemas">
    <list>
    <value>/WEB-INF/ws/*.xsd</value>
    </list>
    </property>
    <property name="validateRequest" value="true"/>
    <property name="validateResponse" value="true"/>
    </bean>
    Last edited by robertoschwald; Dec 11th, 2007 at 09:50 AM.

  5. #15
    Join Date
    Nov 2007
    Posts
    4

    Default

    We can not set a unique target namespace for every webservice, so we need a solution for that problem. Do anybody know how to use PayloadValidatingInterceptor with a set of schemas that share the same namespace?

  6. #16
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    The schema handling code Spring-WS's PayloadValidatingInterceptor depends on javax.xml.validation.Schema. The algorithm for multiple namespaces is described here: http://java.sun.com/j2se/1.5.0/docs/...sform.S ource[]), the "W3C XML Schema 1.0" part of that method specifically.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  7. #17
    Join Date
    Dec 2007
    Posts
    25

    Default

    I ran into this problem too when using the PayloadValidatingInterceptor to validate against multiple schemas that were all in the same namespace. Due to what looks to be a vagueness in the spec or the JAXP implementation, there is some flakiness when validating multiple schemas with the same namespace.

    For what it is worth, I was able to get past my problems by pointing my validating interceptor to a single xsd file that included all my schemas, and by avoiding using relative paths that used "../". This works fine now. I think the weirdness is in JAXP, not spring-ws.

    BTW - Afterwards I found this link where someone else encountered basically the exact same problems I did. See: http://kontrawize.blogs.com/kontrawi...rouble-wit.htm

  8. #18
    Join Date
    Dec 2007
    Posts
    25

    Default

    Quote Originally Posted by jimcummings View Post
    I ran into this problem too when using the PayloadValidatingInterceptor to validate against multiple schemas that were all in the same namespace. Due to what looks to be a vagueness in the spec or the JAXP implementation, there is some flakiness when validating multiple schemas with the same namespace.

    For what it is worth, I was able to get past my problems by pointing my validating interceptor to a single xsd file that included all my schemas, and by avoiding using relative paths that used "../". This works fine now. I think the weirdness is in JAXP, not spring-ws.

    BTW - Afterwards I found this link where someone else encountered basically the exact same problems I did. See: http://kontrawize.blogs.com/kontrawi...rouble-wit.htm
    Fixing the link in my post: http://kontrawize.blogs.com/kontrawi...ouble-wit.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •