Results 1 to 4 of 4

Thread: xsi namespace not added

Hybrid View

  1. #1

    Question xsi namespace not added

    Hi,

    I'm using spring ws 2.0.4 and castor 1.3.1, and I'm having a problem with the marshalling of a soap message, the marshalling produces the following output:
    Code:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <ls:infringementResponse xmlns:ls="http://www.bt.com/ls/schemas">
    <ls:infringement xsi:type="ls:uncommunicatedInfringement"> 
    <ls:infringementId>3</ls:infringementId
    <ls:infringementDate>2012-04-09T00:00:00.000-05:00</ls:infringementDate>         <ls:infringementTypeId>2</ls:infringementTypeId>
    <ls:licenseId>3</ls:licenseId>
    <ls:startAt>2012-03-01T00:00:00.000-06:00</ls:startAt>
    <ls:endAt>2012-04-09T00:00:00.000-05:00</ls:endAt>
    </ls:infringement>
    </ls:infringementResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    As you can see an element has an xsi:type attribute, but the xsi namespace it's not added, what do I have to do so that it outputs the namespace? I have checked and the suppressNamespaces flag is off.

    Thanks in advance,

    Sebastian Montero

  2. #2

    Default

    Hi,
    I just wanted to add that this problem happens when using inheritance and I’m sending a subtype. In this case I have a base type called “Infringement” and when I send the subtype “UncommunicatedInfringement” the xsi:type attribute is added, but not the namespace.
    Hopefully this additional info will help someone help me.
    Thanks,
    Sebastian Montero

  3. #3

    Default

    Hi,

    I finally managed to solve my problem, the only thing I had do was to put the following libs in the endorsed directory to override the default ones:

    serializer-2.7.1.jar
    xalan-2.7.1.jar
    xercesImpl-2.10.0.jar
    xml-apis-1.4.01.jar

    Hope this helps someone.

    Thanks,
    Sebastian

  4. #4

    Default

    The solution seems to be so simple! I wonder why I did not mange to solve this problem myself. Nevertheless, many thanks to you, guys!
    _____________
    winrar download free

Tags for this Thread

Posting Permissions

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