users@jaxb.java.net

RE: JAXB, SOAP and attribute namespaces

From: George Datuashvili <George.Datuashvili_at_Siebel.com>
Date: Thu, 18 Mar 2004 11:45:01 -0700

Are you trying to do it with a single schema, or does your schema
include another one (that has soap-env targetNamespace) ?
 
  _____

From: Anthony Chater [mailto:achater_at_epo.org]
Sent: Thursday, March 18, 2004 4:38 AM
To: users_at_jaxb.dev.java.net
Subject: JAXB, SOAP and attribute namespaces




        I have been using JAXB successfully in a project for XML , but
without namespaces. Now I am trying to create a schema from which I can
generate JAXB class for a segment of a SOAP message. Specifically I want
to generate some SOAP elements with mustUnderstand and actor attributes.

        The soap segment of XML which I want to be able to marshal and
unmarshall with JAXB looks like this:
        
        <?xml version="1.0" encoding="UTF-8"?>
        <ROOT xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
>
        <SYSTEM_ID soap-env:mustUnderstand="1"
soap-env:actor="SYSTEM_ID">MUSE</SYSTEM_ID>
        <SUB_SYSTEM_ID soap-env:mustUnderstand="1"
soap-env:actor="SUB_SYSTEM_ID">SERVER</SUB_SYSTEM_ID>
        <MESSAGE_ID soap-env:mustUnderstand="1"
soap-env:actor="MESSAGE_ID">MU0003</MESSAGE_ID>
        </ROOT>
        
        I have tried many combinations of qualified/unqualified/target
etc.etc.. namespace but am unable to create a schema which preserves the
namespaced SOAP attributes after marshal and unmarshal operations.
        Can anyone assist me?
        Thanks.
        Anton