logo       

RE: blank namespace: msg#00044

text.xml.xmlbeans.user

Subject: RE: blank namespace

Yeah - this is related to what I've been complaining about for a week!

Handling of default namespace is the reverse of what you would expect.

What you try is putting a default namespace declaration on your root
element - <req:getEquityAccountDetail xmlns="http://banktrans/default/";>

Which will at least prevent it having to generate ones for you inside
your XML.

There should however be some way to tell XMLBeans to not require a
default namespace declaration - but so far I've not been able to track
down how...

DW

-----Original Message-----
From: gopi.rcr [mailto:gopi.rcr@xxxxxxxxx]
Sent: Tuesday, November 21, 2006 7:03 PM
To: user@xxxxxxxxxxxxxxxxxxx
Subject: Re: blank namespace


Forgot to include,

My schema file looks somthing like this.

<xs:schema targetNamespace="http://service..com/req/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>

<xs:import schemaLocation="Elps_GetEquityData_Request1.xsd"/>
<xs:element name="getEquityAccountDetail">
<xs:complexType>
<xs:sequence>
<xs:element ref="accountNumber"/>
<xs:element ref="productCode"/>
<xs:element ref="elementList"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

The elements accountNumber, productCode and elementList dont have a
namespace.

Thanks,



gopi.rcr wrote:
>
> Hi,
>
> I have an XMLBeans based program for generating XML output. XML output

> looks as below:
>
> <req:getEquityAccountDetail>
> <accountNumber>
> <bank>651</bank>
> <branch>651</branch>
> <customer>0444650</customer>
> <loan>0001</loan>
> </accountNumber>
> <productCode>LCA</productCode>
> -----------
>
> When I modify my code to filter out req namespace prefix by doing the
> following.
>
> XmlOptions op = new XmlOptions();
> HashMap m=new HashMap();
> m.put("","http://service.wellsfargo.com/req/";); //namespace uri for
req
> opts.setSaveImplicitNamespaces(m);
>
> -----------------------------------------------------------
>
> I am getting output as follows, which has unwanted blank namespace
> references for accountNumber and ProductCode. What should I do to get
rid
> of these namespace references ? Why is it putting the blank namespace
> references ?
>
> <getEquityAccountDetail>
> <accountNumber xmlns="">
> <bank>651</bank>
> <branch>651</branch>
> <customer>0444650</customer>
> <loan>0001</loan>
> </accountNumber>
> <productCode xmlns="">LCA</productCode>
>
>
> You help is highly appreicated.
>
> Thanks
>
>

--
View this message in context:
http://www.nabble.com/blank-namespace-tf2681769.html#a7482861
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise