Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-791

Transform schemaLocation in WsdlDefinitionHandlerAdapter

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.0 GA
    • Fix Version/s: 2.1.1
    • Component/s: XML
    • Labels:
      None
    • Environment:
      WINDOWS

      Description

      I have a static-wsdl defined and in wsdl I have inported a schema with schemaLocation attribute.
      When I deploy this to weblogic spring doesn't transform the schemaLocation to where it's deployed.

      I do have transformWsdlLocations set to true in my web.xml.

      The location in the service section of WSDL does get transformed but schemaLocation is not.

      Please help.

      Thanks,

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          The WsdlDefinitionHandlerAdapter currently does not support transforming the schemaLocation. I will consider this issue a feature request for that functionality.

          Show
          arjen.poutsma Arjen Poutsma added a comment - The WsdlDefinitionHandlerAdapter currently does not support transforming the schemaLocation. I will consider this issue a feature request for that functionality.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Fixed. WsdlDefinitionAdapter now has a transformSchemaLocations property, which defaults to false. When set to true, it will transform all schemaLocation attributes found in the WSDL, just like transformLocations does.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Fixed. WsdlDefinitionAdapter now has a transformSchemaLocations property, which defaults to false. When set to true, it will transform all schemaLocation attributes found in the WSDL, just like transformLocations does.
          Hide
          arvindbpatel Arvind Patel added a comment -

          Hi,
          Can you please point me the url where I can download the new version 2.1.1 ?

          Thanks,
          Arvind

          Show
          arvindbpatel Arvind Patel added a comment - Hi, Can you please point me the url where I can download the new version 2.1.1 ? Thanks, Arvind
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          @Arvind, it's not out yet. Keep an eye on the forum to see when it's released.

          Show
          arjen.poutsma Arjen Poutsma added a comment - @Arvind, it's not out yet. Keep an eye on the forum to see when it's released.
          Hide
          arvindbpatel Arvind Patel added a comment -

          Hi Arjen,

          We are running behind deadlines and was wondering if the new version 2.1.1 out yet.

          let me know.

          Regards,
          Arvind

          Show
          arvindbpatel Arvind Patel added a comment - Hi Arjen, We are running behind deadlines and was wondering if the new version 2.1.1 out yet. let me know. Regards, Arvind
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          It's out now.

          Show
          arjen.poutsma Arjen Poutsma added a comment - It's out now.
          Hide
          arvindbpatel Arvind Patel added a comment -

          Hi Arjen,

          I tried this and it does replace the schemaLocation in the wsdl but It does NOT replace schemaLocation in XSDs.

          For example I have Employee.wsdl which has the following line

          <xsd:import namespace="http://www.localhost/schema/EmployeeService" schemaLocation="http://localhost/employee/EmployeeService.xsd"/>

          This does get replaced with actual server name :

          But Now if my EmployeeService.xsd has the following line , it does not replace with the actual server name;

          <xsd:import namespace="http://www.localhost/schema/Employee" schemaLocation="http://localhost/employee/Employee.xsd"/>

          Please advise.

          Thanks,
          Arvind.

          Show
          arvindbpatel Arvind Patel added a comment - Hi Arjen, I tried this and it does replace the schemaLocation in the wsdl but It does NOT replace schemaLocation in XSDs. For example I have Employee.wsdl which has the following line <xsd:import namespace="http://www.localhost/schema/EmployeeService" schemaLocation="http://localhost/employee/EmployeeService.xsd"/> This does get replaced with actual server name : But Now if my EmployeeService.xsd has the following line , it does not replace with the actual server name; <xsd:import namespace="http://www.localhost/schema/Employee" schemaLocation="http://localhost/employee/Employee.xsd"/> Please advise. Thanks, Arvind.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Indeed: I only changed the code in the WsdlDefinitionHandlerAdapter (as requested), but I should also change the XsdSchemaHandlerAdapter, which serves the XSD files.

          Will fix for 2.1.2.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Indeed: I only changed the code in the WsdlDefinitionHandlerAdapter (as requested), but I should also change the XsdSchemaHandlerAdapter, which serves the XSD files. Will fix for 2.1.2.
          Hide
          arvindbpatel Arvind Patel added a comment -

          Let me know if this issue is resolved and if it's part of nightly build so that I can try.

          Thanks,

          Show
          arvindbpatel Arvind Patel added a comment - Let me know if this issue is resolved and if it's part of nightly build so that I can try. Thanks,
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          If you are talking about SWS-797: yes that should be in the nightly build.

          Show
          arjen.poutsma Arjen Poutsma added a comment - If you are talking about SWS-797 : yes that should be in the nightly build.
          Hide
          arvindbpatel Arvind Patel added a comment -

          It's related to SWS-797 , but it does not completely solve the problem.

          Please refer to my comment above from 24/Sep/12 8:07 AM and your reply on 25/Sep/12 5:21 AM

          Please let me know if this is part of the nightly build.

          Thanks,
          Arvind

          Show
          arvindbpatel Arvind Patel added a comment - It's related to SWS-797 , but it does not completely solve the problem. Please refer to my comment above from 24/Sep/12 8:07 AM and your reply on 25/Sep/12 5:21 AM Please let me know if this is part of the nightly build. Thanks, Arvind
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          It should be part of the build. Let me know if it doesn't work for you.

          Show
          arjen.poutsma Arjen Poutsma added a comment - It should be part of the build. Let me know if it doesn't work for you.
          Hide
          arvindbpatel Arvind Patel added a comment -

          I tried the new build but it does not replace the schema locations in XSD.

          Is there a special property that I need to set ?

          Thanks,

          Show
          arvindbpatel Arvind Patel added a comment - I tried the new build but it does not replace the schema locations in XSD. Is there a special property that I need to set ? Thanks,
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I made some additional changes, and now you should be able to enable XSD transformations by setting the transformSchemaLocations property to true. Please use a recent snapshot to try this out (as of tonight).

          Show
          arjen.poutsma Arjen Poutsma added a comment - I made some additional changes, and now you should be able to enable XSD transformations by setting the transformSchemaLocations property to true. Please use a recent snapshot to try this out (as of tonight).
          Hide
          arvindbpatel Arvind Patel added a comment -

          I tried the new version and It still does not work.
          The configuration I have is

          <bean id="wsdlDefinitionHandlerAdapter" class="org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter">
          <property name="transformSchemaLocations" value="true"/>
          </bean>

          Let me know if I am missing anything.

          Thanks,

          Show
          arvindbpatel Arvind Patel added a comment - I tried the new version and It still does not work. The configuration I have is <bean id="wsdlDefinitionHandlerAdapter" class="org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter"> <property name="transformSchemaLocations" value="true"/> </bean> Let me know if I am missing anything. Thanks,
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Ok, I'll reopen this issue and take a look at it again.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Ok, I'll reopen this issue and take a look at it again.
          Hide
          arvindbpatel Arvind Patel added a comment -

          I took nightly built jars and it worked now.

          Thanks a lot for working on this.

          Let me know when you include this in a new release.

          Thanks again !

          Show
          arvindbpatel Arvind Patel added a comment - I took nightly built jars and it worked now. Thanks a lot for working on this. Let me know when you include this in a new release. Thanks again !
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Good to hear!

          Show
          arjen.poutsma Arjen Poutsma added a comment - Good to hear!
          Hide
          arvindbpatel Arvind Patel added a comment -

          Arjen,

          Can you give me the timeframe when the new version (2.1.2)is going to be relased ?

          Thanks,

          Show
          arvindbpatel Arvind Patel added a comment - Arjen, Can you give me the timeframe when the new version (2.1.2)is going to be relased ? Thanks,
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I hope to do it before the end of the year. There are still 8 issues to resolve, and I cannot yet tell how much time they will take.

          Show
          arjen.poutsma Arjen Poutsma added a comment - I hope to do it before the end of the year. There are still 8 issues to resolve, and I cannot yet tell how much time they will take.
          Show
          arjen.poutsma Arjen Poutsma added a comment - It's out now, see http://forum.springsource.org/showthread.php?132971-Spring-Web-Services-2-1-2-RELEASE-released
          Hide
          arvindbpatel Arvind Patel added a comment -

          When I go to download page and click on link to download it gives me error and takes me to the page with following contents

          <Error>
          <Code>AccessDenied</Code>
          <Message>Access Denied</Message>
          <RequestId>21BD3C619D51FCBF</RequestId>
          <HostId>
          +WultixhXrHOmYTTzoYS3xdZbOohDoJbLeNrCMvHL6zDlJbZiQIeForthbcnYNd1
          </HostId>
          </Error>

          Show
          arvindbpatel Arvind Patel added a comment - When I go to download page and click on link to download it gives me error and takes me to the page with following contents <Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>21BD3C619D51FCBF</RequestId> <HostId> +WultixhXrHOmYTTzoYS3xdZbOohDoJbLeNrCMvHL6zDlJbZiQIeForthbcnYNd1 </HostId> </Error>
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Yes, I screwed up with the rights. Try again, this should be fixed now.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Yes, I screwed up with the rights. Try again, this should be fixed now.
          Hide
          arvindbpatel Arvind Patel added a comment -

          It worked, thank you,

          Show
          arvindbpatel Arvind Patel added a comment - It worked, thank you,

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              arvindbpatel Arvind Patel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 31m
                31m