Results 1 to 8 of 8

Thread: Adding ws-policy to the wsdl

  1. #1
    Join Date
    Jan 2008
    Posts
    13

    Default Adding ws-policy to the wsdl

    I am dynamically generating the wsdl to my web service using the DefaultWsdl11Definition class. I am also using ws-security to secure the webservice, however the security requirements do not get reflected in the wsdl. Is there an easy way to add the security requirements to the wsdl short of creating my own wsdl and using the SimpleWsdlDefinitionClass?

    If anyone has added the ws policy to the wsdl and has an example of that, I'd greatly appreciate that as well.

    Thanks

  2. #2
    Join Date
    Jul 2006
    Posts
    5

    Default

    Quote Originally Posted by irfanm12 View Post
    If anyone has added the ws policy to the wsdl and has an example of that, I'd greatly appreciate that as well.
    Has anyone ever had a take at this. Or can provide us with a pointer to information on this subject ?

  3. #3

    Default

    Unfortunately there is no WS-Policy support in Spring-WS. You have to write your own WSDL if you want to add WS-Policy.

  4. #4
    Join Date
    Jul 2006
    Posts
    5

    Default

    Quote Originally Posted by Si-Coder View Post
    Unfortunately there is no WS-Policy support in Spring-WS. You have to write your own WSDL if you want to add WS-Policy.
    Thanks for the answer. Is there at least a hook where we could add our own ''handler'' to enrich the auto-generated WSDL ?

  5. #5

    Default

    I think the best option is to extend DefaultWsdl11Definition and in that extension provide logic responsible for adding WS-Policy assertions or other elements.

  6. #6
    Join Date
    Jul 2006
    Posts
    5

    Default

    Any chances of adding such extension points from within this class, so that such extensions could be wired through Spring ?

  7. #7

    Default

    I don't understand... Spring container is able to wire non-spring objects so where is the problem ?

    Code:
    <bean id="holiday" class="com.example.WsPolicyWsdl11Definition">  
        <property name="schema" ref="schema"/>                                              
        <property name="portTypeName" value="HumanResource"/>                               
        <property name="locationUri" value="/holidayService/"/>                             
        <property name="targetNamespace" value="http://mycompany.com/hr/definitions"/>    
    //any other properties responsible for WS-Policy ( such as xml config )  
    </bean>
    
    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">                  
        <property name="xsd" value="/WEB-INF/hr.xsd"/>
    </bean>
    Where WsPolicyWsdl11Definition is extended DefaultWsdl11Definition.

  8. #8
    Join Date
    Feb 2010
    Posts
    1

    Default

    I've got a problem just like wgutmn,
    but when i try to use my WsPolicyWsdlDefinition which extends the Default one,
    i only get messages, like the namespace is not set...
    could u post me a code snippet how to do this ?

    thx
    tulip

Tags for this Thread

Posting Permissions

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