Code Monkey home page Code Monkey logo

Comments (4)

gregturn avatar gregturn commented on May 22, 2024

Arjen Poutsma commented

This is now implemented in SVN.

The basic idea is to define a WsdlDefinition bean in your app context, and to add the WsdlDefinitionHandlerAdapter to your *-servlet.xml app context. You then map the incoming requires for the WSDL file to the WsdlDefintion instead of the WSDL file itself.

The adapter has a property transformLocations. When enabled, this adapter transforms all location attributes to reflect the incoming request.

For instance, if the location attribute defined in the WSDL is http://localhost:8080/context/services/myService, and the request URI for the WSDL is http://example.com/context/myService.wsdl, the location will be changed to http://example.com/context/services/myService.

Note that - contrary to my previous comment on this issue - you should not use relative URLs in the location!

from spring-ws.

gregturn avatar gregturn commented on May 22, 2024

Arjen Poutsma commented

Also, you can look in the echo sample, which uses this functionality.

from spring-ws.

gregturn avatar gregturn commented on May 22, 2024

Arjen Poutsma commented

Turns out that the relative path option can be pretty useful as well, especially in situations where the running context is not known beforehand (see http://forum.springframework.org/showpost.php?p=70606&postcount=9). So, I will implement this as well.

Basically, if a location contains a relative url, the the full context path is prepended to this relative url. When the location is non-relative, only the server information is changed.

from spring-ws.

gregturn avatar gregturn commented on May 22, 2024

Jason Stiefel commented

Thought this was worth commenting on since it's not clear from the above text just how to implement this feature. Adding a WsdlDefinitionHandlerAdapter to your servlet context is ignored from the MessageDispatcherServlet. The servlet instantiates it's own instance that is configured through exposed init-params on the servlet itself. So for the current version (1.0-rc2) you must add an init-param value to your web.xml:

<servlet>
    <servlet-name>spring-ws</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    <init-param>
        <param-name>transformWsdlLocations</param-name>
        <param-value>true</param-value>
    </init-param>
</servlet>

I plan to open a bug regarding the handler adapter being overlooked within the servlet context.

from spring-ws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.