Results 1 to 5 of 5

Thread: Payload namespace prefix in attribute value

  1. #1
    Join Date
    Nov 2007
    Posts
    17

    Default 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. #2
    Join Date
    Sep 2004
    Location
    Austin, TX
    Posts
    12

    Default

    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

  3. #3
    Join Date
    Nov 2007
    Posts
    17

    Default

    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.

  4. #4
    Join Date
    Sep 2004
    Location
    Austin, TX
    Posts
    12

    Default 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.

  5. #5
    Join Date
    May 2011
    Posts
    1

    Default

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •