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 Anne Thomas Manes <at...@gmail.com> on 2005/12/04 00:19:56 UTC

Re: Returning a bean - confused over namespaces

qname="ns:????" refers to the qualified name (prefix plus local name) of the
XML element that maps to your Bean.

xmlns:ns="????" refers to the namespace of your XML element (what the prefix
stands for).

These names must correspond to the names in your WSDL. If you are using
document style, then the namespace is the targetNamespace of the schema that
defines the element. If you are using rpc style, then the namespace should
be defined as "" (no namespace). (That's assuming this is the return value
of the method.)

Anne

On 11/30/05, Simon Brunning <si...@brunningonline.net> wrote:
>
> I want to write a service which returns a bean as a value. Both client
> and server sides are to use Axis, for the moment at least.
>
> I think what I need to do is to register a bean mapping on the server
> side, like so:
>
> <beanMapping qname="ns:????" xmlns:ns="????"
> languageSpecificType="java:com.my.Bean"/>
>
> and, on the client side, to register the type mapping:
>
> QName qname = new QName("urn:????",  "????");
> call.registerTypeMapping(
>     Bean.class,
>     qname,
>     new BeanSerializerFactory(Bean.class, qname),
>     new BeanDeserializerFactory(Bean.class, qname));
>
> Am I on the right track so far?
>
> Thing is, I'm at a loss as to what I should be putting in where I've
> shown the "????"s. Can anyone explain to me what I need here? I've
> Googled, but while I can find many examples of people having problems
> with these values, I can't find any clear explaination of what they
> mean.
>
> --
> Cheers,
> Simon B,
> simon@brunningonline.net,
> http://www.brunningonline.net/simon/blog/
>