Announcement Announcement Module
Collapse
No announcement yet.
Adding ws-policy to the wsdl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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 ?

    Comment


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

      Comment


      • #4
        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 ?

        Comment


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

          Comment


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

            Comment


            • #7
              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.

              Comment


              • #8
                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

                Comment

                Working...
                X