Announcement Announcement Module
Collapse
No announcement yet.
more than one schema in PayloadValidatingInterceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • more than one schema in PayloadValidatingInterceptor

    Hi,

    i have more than one schema which PayloadValidatingInterceptor should use.
    The JAXB marshaller have an schemas element, something similar would be nice for the PayloadValidatingInterceptor.

    Cheers,

    Ingo

  • #2
    You're right. Could you create an issue? Thanks!

    Comment


    • #3
      Arjen,

      I'm using the schemas property on the PayloadValidationInterceptor but it only validates payload request correctly for the first XSD schema location defined in the list.

      <property name="interceptors">
      <list>
      <bean
      class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
      <property name="schemas">
      <list>
      <value>
      /WEB-INF/xsd/PaymentSubmission.xsd
      </value>
      <value>
      /WEB-INF/xsd/Notifications.xsd
      </value>
      </list>
      </property>
      <property name="validateRequest" value="true" />
      <property name="validateResponse" value="true" />
      </bean>
      </list>
      </property>

      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?

      I looked a bit in the source code but I could not locate why I'm having this strange behavior. A solution could be to just put them together in one XSD shema. Sadly I didn't make the WSDL definitions where I extracted these XSD schemas from.

      Kind regards,

      Mark

      Comment


      • #4
        Which version of the JDK are you using?

        Comment


        • #5
          I'm using JDK 1.5

          For now, I put both schema definition elements that share the same namespace together in one XSD file. I used the schema property instead of the schemas property and that works ofcourse.

          Mark

          Comment


          • #6
            Originally posted by Arjen Poutsma View Post
            You're right. Could you create an issue? Thanks!
            has there been a ticket opened for this? what's the status?

            Comment


            • #7
              really, please tell what is the status of this problem?

              Comment


              • #8
                There is no JIRA issue yet, as far as I know.

                Comment


                • #9
                  should we create one (or two)?

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        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.

                        Comment


                        • #13
                          The problem still exists in Spring-WS 1.0.2.

                          Comment


                          • #14
                            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, 10:50 AM.

                            Comment


                            • #15
                              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?

                              Comment

                              Working...
                              X