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

SOAP re-declaring qname inside body

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • None
    • Invalid
    • None
    • None
    • Unknown

    Description

      This request fails on CXF:
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:myqname="http://example.com/hello"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header/>
      <soapenv:Body>
      <myqname:MyRequest>
      ...
      </myqname:MyRequest>
      </soapenv:Body>
      </soapenv:Envelope>

      with the error:
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Unmarshalling Error: UndeclaredPrefix: Cannot resolve 'myqname:MyRequest' as a QName: the prefix 'myqname' is not declared.</faultstring>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

      However, if I re-define the myqname inside the body node, then it works.

      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:myqname="http://example.com/hello"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header/>
      <soapenv:Body>
      <myqname:MyRequest xmlns:myqname="http://example.com/hello">
      ...
      </myqname:MyRequest>
      </soapenv:Body>
      </soapenv:Envelope>

      Is this a bug from CXF?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dportabella David Portabella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment