[SWS-791] Transform schemaLocation in WsdlDefinitionHandlerAdapter Created: 08/Aug/12  Updated: 04/Dec/12  Resolved: 26/Nov/12

Status: Resolved
Project: Spring Web Services
Component/s: XML
Affects Version/s: 2.0 GA
Fix Version/s: 2.1.1

Type: New Feature Priority: Major
Reporter: Arvind Patel Assignee: Arjen Poutsma
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 31m
Original Estimate: Not Specified
Environment:

WINDOWS


Issue Links:
Relate
relates to SWS-797 XsdSchemaHandlerAdapter does not tran... Resolved

 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,



 Comments   
Comment by Arjen Poutsma [ 09/Aug/12 ]

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

Comment by Arjen Poutsma [ 14/Aug/12 ]

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.

Comment by Arvind Patel [ 21/Aug/12 ]

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

Thanks,
Arvind

Comment by Arjen Poutsma [ 22/Aug/12 ]

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

Comment by Arvind Patel [ 04/Sep/12 ]

Hi Arjen,

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

let me know.

Regards,
Arvind

Comment by Arjen Poutsma [ 18/Sep/12 ]

It's out now.

Comment by Arvind Patel [ 24/Sep/12 ]

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.

Comment by Arjen Poutsma [ 25/Sep/12 ]

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.

Comment by Arvind Patel [ 02/Nov/12 ]

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

Thanks,

Comment by Arjen Poutsma [ 05/Nov/12 ]

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

Comment by Arvind Patel [ 05/Nov/12 ]

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

Comment by Arjen Poutsma [ 06/Nov/12 ]

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

Comment by Arvind Patel [ 06/Nov/12 ]

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,

Comment by Arjen Poutsma [ 07/Nov/12 ]

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).

Comment by Arvind Patel [ 07/Nov/12 ]

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,

Comment by Arjen Poutsma [ 09/Nov/12 ]

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

Comment by Arvind Patel [ 19/Nov/12 ]

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 !

Comment by Arjen Poutsma [ 26/Nov/12 ]

Good to hear!

Comment by Arvind Patel [ 29/Nov/12 ]

Arjen,

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

Thanks,

Comment by Arjen Poutsma [ 30/Nov/12 ]

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.

Comment by Arjen Poutsma [ 04/Dec/12 ]

It's out now, see http://forum.springsource.org/showthread.php?132971-Spring-Web-Services-2-1-2-RELEASE-released

Comment by Arvind Patel [ 04/Dec/12 ]

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>

Comment by Arjen Poutsma [ 04/Dec/12 ]

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

Comment by Arvind Patel [ 04/Dec/12 ]

It worked, thank you,

Generated at Mon Dec 11 18:57:53 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.