Hi all,

I don't know how Axis2 makes decision while putting namespaces into the messages. I figured out that it somehow changed regarding the type's definition:
- <xs:element ref="tns:..." />
- <xs:element ref="importedNs:..." />
- <xs:element name="..." type="tns:..." />
- <xs:element name="..." type="importedNs:..." />

What I want is to prevent "xmlns:..." _expression_ in each element. Instead, I want Axis2 automatically define global namespaces and add qualifiers to the elements. You can find examples below.

Is there a way to achive this?

Thanks a lot

Ali Sadik Kumlali

-------------------------------------------------
What I have (Produced by my service automatically
-------------------------------------------------
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<OpenAccountResponse2 xmlns="http://mycompany.com/service/test/schemas/account">
  <Header xmlns="http://mycompany.com/service/test/schemas/types">
     <MessageReferenceId xmlns:q1="http://mycompany.com/service/test/schemas/types">OpenAccount2Ref</MessageReferenceId>
  </Header>
  <Message xmlns="http://mycompany.com/service/test/schemas/types">
    <MessageId>12345</MessageId>
  </Message>
</OpenAccountResponse2>
</soapenv:Body>
</soapenv:Envelope>

-------------------------------------------------
What I want - 1
-------------------------------------------------
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://mycompany.com/service/test/schemas/account" xmlns:q1="http://mycompany.com/service/test/schemas/types">
<soapenv:Header/>
<soapenv:Body>
<q0:OpenAccountResponse2>
  <q1:Header>
     <q1:MessageReferenceId>OpenAccount2Ref</q1:MessageReferenceId>
  </q1:Header>
  <q1:Message>
    <q1:MessageId>12345</q1:MessageId>
  </q1:Message>
</q0:OpenAccountResponse2>
</soapenv:Body>
</soapenv:Envelope>

-------------------------------------------------
OR what I want - 2
-------------------------------------------------
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://mycompany.com/service/test/schemas/account" xmlns:q1="http://mycompany.com/service/test/schemas/types">
<soapenv:Header/>
<soapenv:Body>
<OpenAccountResponse2 xmlns="http://mycompany.com/service/test/schemas/account">
  <Header xmlns="http://mycompany.com/service/test/schemas/types">
     <MessageReferenceId>OpenAccount2Ref</MessageReferenceId>
  </Header>
  <Message xmlns="http://mycompany.com/service/test/schemas/types">
    <MessageId>12345</MessageId>
  </Message>
</OpenAccountResponse2>
</soapenv:Body>
</soapenv:Envelope>


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

Reply via email to