Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-970

CXF doesnt handle the Doc/Literal (Bare) with Null parameter.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 2.0.2
    • JAX-WS Runtime
    • None
    • windows

    Description

      When the parameter is null, at the client, it will send the soap message like below:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body></soap:Body></soap:Envelope>

      but I think the correct soap message would be:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><inString/></soap:Body></soap:Envelope>

      The test case would like below code snippet: (added it in DOCBareClientServerTest.java)

      @Test
      public void testNillableParameter() throws Exception

      { URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl"); assertNotNull("WSDL is null", wsdl); SOAPService service = new SOAPService(wsdl, serviceName); assertNotNull("Service is null", service); PutLastTradedPricePortType port = service.getPort(portName, PutLastTradedPricePortType.class); String result = port.nillableParameter(null); assertEquals("Hello", result); }

      Attachments

        1. cxf-970.patch
          8 kB
          Jeff Yu
        2. doc_lit_bare.wsdl
          5 kB
          Jeff Yu

        Activity

          People

            dkulp Daniel Kulp
            jeff.yu Jeff Yu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: