wsit
  1. wsit
  2. WSIT-654

@Addressing annotation does not generate WS-Addressing policy assertions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: not determined
    • Component/s: policy
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      this is Java first case. The endpoint is annotated with @Addressing or
      @Addressing(reuire="true") annotation. the published WSDL has no associated
      WS-Addressing policy assertion with it.

      Because of this there is'nt anyway a .NET 3.0 client can talk to my endpoint
      automatically using addressing headers.

      @WebService()
      @Addressing
      public class SimpleService {
      /**

      • Web service operation
        */
        @WebMethod
        public String operation1(@WebParam(name = "p") String p) { return p; }

        /**
        * Web service operation
        */
        @WebMethod
        public String operation2(@WebParam(name = "p") String p) { return p; }


        }

        Activity

        Hide
        ritzmann added a comment -

        We need to add an implementation of PolicyMapUpdateProvider for addressing to
        fix this issue. In the mean-time, this issue can be worked-around by creating a
        wsit-SimpleService.xml configuration file that contains the missing policy.
        Detailed instructions:

        1. Create a web service with NetBeans:

        package com.sun.xml.ws.test;

        @WebService()
        @Addressing
        public class SimpleService {
        /**

        • Web service operation
          */
          @WebMethod
          public String operation1(@WebParam(name = "p") String p) { return p; }

          /**
          * Web service operation
          */
          @WebMethod
          public String operation2(@WebParam(name = "p") String p) { return p; }


          }

        2. In NetBeans, select Edit WS attributes.

        • Enable Reliable Message Delivery
        • You can now open the WSIT configuration files from the NetBeans Projects
          tab under Web Pages/WEB-INF/wsit-com.sun.xml.ws.test.SimpleService.xml
        • Search for a policy that looks like this:

        <wsp:Policy wsu:Id="SimpleServicePortBindingPolicy">
        <wsp:ExactlyOne>
        <wsp:All>
        <wsaws:UsingAddressing
        xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
        <wsrm:RMAssertion/>
        </wsp:All>
        </wsp:ExactlyOne>
        </wsp:Policy>

        • Remove this line:

        <wsrm:RMAssertion/>

        • Save the file.
        Show
        ritzmann added a comment - We need to add an implementation of PolicyMapUpdateProvider for addressing to fix this issue. In the mean-time, this issue can be worked-around by creating a wsit-SimpleService.xml configuration file that contains the missing policy. Detailed instructions: 1. Create a web service with NetBeans: package com.sun.xml.ws.test; @WebService() @Addressing public class SimpleService { /** Web service operation */ @WebMethod public String operation1(@WebParam(name = "p") String p) { return p; } /** * Web service operation */ @WebMethod public String operation2(@WebParam(name = "p") String p) { return p; } } 2. In NetBeans, select Edit WS attributes. Enable Reliable Message Delivery You can now open the WSIT configuration files from the NetBeans Projects tab under Web Pages/WEB-INF/wsit-com.sun.xml.ws.test.SimpleService.xml Search for a policy that looks like this: <wsp:Policy wsu:Id="SimpleServicePortBindingPolicy"> <wsp:ExactlyOne> <wsp:All> <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/> <wsrm:RMAssertion/> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> Remove this line: <wsrm:RMAssertion/> Save the file.
        Hide
        ritzmann added a comment -

        Rama, I need you to review the code I sent yesterday and make sure we are
        generating the correct policy assertions.

        Show
        ritzmann added a comment - Rama, I need you to review the code I sent yesterday and make sure we are generating the correct policy assertions.
        Hide
        ramapulavarthi added a comment -

        The policy assertion should be
        <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/>
        when @Addressing is used.

        Show
        ramapulavarthi added a comment - The policy assertion should be <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> when @Addressing is used.
        Hide
        ritzmann added a comment -

        Rama, could you please do a detailed review of the code I sent you earlier this
        week?

        Show
        ritzmann added a comment - Rama, could you please do a detailed review of the code I sent you earlier this week?
        Hide
        ramapulavarthi added a comment -

        This will be a non-issue if just @Addressing is used, as by default its use is
        optional and not declaring such capability in wsdl description does n't hurt.

        This can be a issue when one tries to use @Addressing(required=true) and
        moreover this happens only when someone (WCF) doesn't understand the wsdl
        extension element <wsaw:UsingAddressing/> which is generated by default when
        addressing is enabled.
        At any cost server will verify the messages at runtime and throw proper
        Addressing Fault when it receives messages with no addressing headers.

        Show
        ramapulavarthi added a comment - This will be a non-issue if just @Addressing is used, as by default its use is optional and not declaring such capability in wsdl description does n't hurt. This can be a issue when one tries to use @Addressing(required=true) and moreover this happens only when someone (WCF) doesn't understand the wsdl extension element <wsaw:UsingAddressing/> which is generated by default when addressing is enabled. At any cost server will verify the messages at runtime and throw proper Addressing Fault when it receives messages with no addressing headers.
        Hide
        ritzmann added a comment -

        Fixed on the trunk on behalf of Rama.

        Show
        ritzmann added a comment - Fixed on the trunk on behalf of Rama.

          People

          • Assignee:
            ramapulavarthi
            Reporter:
            vivekp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: