Announcement Announcement Module
Collapse
No announcement yet.
Payload namespace prefix in attribute value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Payload namespace prefix in attribute value

    Hi,

    I have following SOAP request.

    Code:
    <soapenv:Envelope  xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:getRights> 
                <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
                   <ns:msisdn>420123456789</ns:msisdn>
                </ns:customerCredential>
          </ns:getRights>
       </soapenv:Body>
    </soapenv:Envelope>
    When XmlBeans unmarshalling is called, only payload is passed in:

    Code:
    <ns:getRights> 
                <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
                   <ns:msisdn>420123456789</ns:msisdn>
                </ns:customerCredential>
    </ns:getRights>
    The issue is, that XmlBeans can't find "ns" prefix definition and therefore they can't resolve xsi:type correctly. If I specify the prefix on getRights level instead of on Envelope element everything works fine.

    Is there a way how to work around this issue? Thanks

  • #2
    I have the exact same problem. Has anyone found an answer to this? I am using:

    org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory
    with
    org.springframework.ws.soap.SoapVersion.SOAP_12

    Comment


    • #3
      I have filed Spring WS bug (http://jira.springframework.org/browse/SWS-523) but allegedly it's Xmlbeans problem (https://issues.apache.org/jira/browse/XMLBEANS-427). Unfortunately I have not received any reply there.

      Comment


      • #4
        solution revolving around xerces and xalan

        I was not specifically trying to use xmlbeans, but parse the body with Jdom. For me, the solution was removing xalan and xerces from the classpath. I am running jdk 1.6, mac. I hope that can be helpful for you.

        Comment


        • #5
          Do you know whether there is a workaround for the problem yet?

          The version with removing xalan and xerces is not working for me.

          Comment

          Working...
          X