You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by keith chapman <ke...@gmail.com> on 2008/09/02 06:33:49 UTC

Re: Setting a default namespace for responses

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 <ar...@bzzt.net> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


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

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