Results 1 to 3 of 3

Thread: Merge of normal applicationContext and ws-config possible? WSDL written manually?

  1. #1
    Join Date
    Oct 2008
    Posts
    9

    Default Merge of normal applicationContext and ws-config possible? WSDL written manually?

    Hello,

    I want to use spring-WS and have already a spring-application-context.

    Two newbie-Questions:
    1.
    The endpoint-bean and the "normal" application-context have to know each other.
    In the spring-ws tutorial is written, that I have to provide in WEB-INF a file, which contains endoint and mapping.
    Is it possible to merge both different contextes, for example when I use in the web.xml the context-param:

    Code:
    context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>main-applicationcontext.xml
    /WEB-INF/webservice.xml</param-value>
    </context-param>
    Or which other possibilties exist to make them know each other?

    2.
    Can I write the wsdl manually an how will spring-ws find them? (Have I to define in a bean the name and location or wil spring take any file ending with .wsdl lying in WEB-INF?

    Thanks a lot !

    Louisa

  2. #2
    Join Date
    Apr 2008
    Location
    Colombo
    Posts
    35

    Default

    1.) you can write two separate context files and possible to assign them in web.xml file ,as same as you illustrate in your code sample or you can write one context file for both context , if you look at example webservice context file closely you can see there is no any new xml elements (tags) on that file endpoint , mapping and everything treated as spring beans as usual way, so you can merge those two file in to one without any problem .

    2.) you can use your own WSDL file with Spring - WS. I think you have bean defined for class DefaultWsdl11Definition replace that bean definition with SimpleWsdl11Definition and then you can assign your own WSDL file as follows .

    Code:
    <bean id="echo" 
    class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
            <constructor-arg value="/WEB-INF/echo.wsdl"/>        
        </bean>

  3. #3
    Join Date
    Oct 2008
    Posts
    9

    Default

    Hi sagara,

    Thank you for your help!

    The manually written wsdl is now recognized and I could load both contextes via the web.xml.

    The merge of the applicationContext seems to work as well.

    Louisa

Posting Permissions

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