Re: Setting a default namespace for responses

2008-09-01 Thread keith chapman
Hi,

If your question was how do I set a default namespace to an OMElemnt, here
is the answer.

omElement.declareDefaultNamespace(http:wso2.com);

Thanks,
Keith.

On Tue, Aug 26, 2008 at 4:14 PM, Arnout Engelen [EMAIL PROTECTED] wrote:

 Hi,

 I'm calling a webservice that returns XML elements without a namespace.

 Is there any way I can specify a default namespace to use when none is
 specified in the returned XML? Now I get a:

  Caused by: org.apache.axis2.databinding.ADBException: Unexpected
 subelement lfm
at gennedservice.GeoStub$Lfm$Factory.parse(GeoStub.java:1319)

 because the following check fails:

  new javax.xml.namespace.QName(
 http://net/bzzt/lastfmlib/model/geo/getEvents
 ,lfm).equals(reader.getName())

 which is because the namespace of the element in the reader is 'null'.


 Kind regards,

 Arnout

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


Setting a default namespace for responses

2008-08-26 Thread Arnout Engelen
Hi,

I'm calling a webservice that returns XML elements without a namespace.

Is there any way I can specify a default namespace to use when none is
specified in the returned XML? Now I get a:

  Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement 
lfm
at gennedservice.GeoStub$Lfm$Factory.parse(GeoStub.java:1319)

because the following check fails:

  new 
javax.xml.namespace.QName(http://net/bzzt/lastfmlib/model/geo/getEvents,lfm;).equals(reader.getName())

which is because the namespace of the element in the reader is 'null'.


Kind regards,

Arnout

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]