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 Sebastian Beigel <s....@diefirma.de> on 2005/07/04 16:05:18 UTC

arrayMapping's innerType qname

Hi,

I'm using a document-style web service and the request contains an array
of objects in the form:

<users><user>...</user><user>...</user></users>

defined by (from my WSDL-file):

    <element name="users">
     <complexType>
      <sequence>
       <element maxOccurs="unbounded" minOccurs="0" name="user"
type="impl:User"/>
      </sequence>
     </complexType>
    </element>

Requests sent by the generated junit tests are constructed in the
desired format but looking at
http://localhost:8080/foo/services/FooUsers?WSDL results in:

<element name="users">
     <complexType>
      <sequence>
       <element maxOccurs="unbounded" minOccurs="0" name="item"
type="impl:User"/>
      </sequence>
     </complexType>
    </element>

So, the inner element's name is "item" instead of "user".

This makes no difference (as it seems that you can name this inner
element as you like?!) but I would really appreciate the "correctness"
of the generated WSDL (thinking about validation...)

Any ideas or am I missing something?

Please Cc me since I'm not subscribed to the list.

Regards,
Sebastian

-- 
Sebastian Beigel // Software Architekt
(F) Die Firma GmbH // Innovative Kommunikation
Schwalbacher Straße 74 // D-65183 Wiesbaden
T +49.6 11.2 38 50.24 // F +49.6 11.2 38 50.11
mailto:s.beigel@diefirma.de // http://www.diefirma.de


Re: arrayMapping's innerType qname

Posted by Anne Thomas Manes <at...@gmail.com>.
Use the wsdlFile option in the WSDD.

Anne

On 7/4/05, Sebastian Beigel <s....@diefirma.de> wrote:
> Anne Thomas Manes wrote:
> > Actually, it could matter if you are trying to achieve
> > interoperability. Did you generate your code from the WSDL?
> 
> Yes. And this file contained the "user" not the "item" element name.
> 
> > Did you tell the service to use your WSDL file rather than an
> > auto-generated one?
> 
> How do I switch from the auto-generated to one I supply?
> 
> But the question's still why contains the auto-generated file the "item"
> element (even FooUsersSoapBindingStub.java contains something like
> 
> param.setItemQName(new javax.xml.namespace.QName("urn:ImportUsers",
> "user"));
> 
> ?
> 
> (Forget about Cc'ing me, I'm subscribed now :)
> 
> Sebastian
> 
> 
> --
> Sebastian Beigel // Software Architekt
> (F) Die Firma GmbH // Innovative Kommunikation
> Schwalbacher Straße 74 // D-65183 Wiesbaden
> T +49.6 11.2 38 50.24 // F +49.6 11.2 38 50.11
> mailto:s.beigel@diefirma.de // http://www.diefirma.de
>

Re: arrayMapping's innerType qname

Posted by Sebastian Beigel <s....@diefirma.de>.
Anne Thomas Manes wrote:
> Actually, it could matter if you are trying to achieve 
> interoperability. Did you generate your code from the WSDL?

Yes. And this file contained the "user" not the "item" element name.

> Did you tell the service to use your WSDL file rather than an
> auto-generated one?

How do I switch from the auto-generated to one I supply?

But the question's still why contains the auto-generated file the "item" 
element (even FooUsersSoapBindingStub.java contains something like

param.setItemQName(new javax.xml.namespace.QName("urn:ImportUsers", 
"user"));

?

(Forget about Cc'ing me, I'm subscribed now :)

Sebastian


-- 
Sebastian Beigel // Software Architekt
(F) Die Firma GmbH // Innovative Kommunikation
Schwalbacher Straße 74 // D-65183 Wiesbaden
T +49.6 11.2 38 50.24 // F +49.6 11.2 38 50.11
mailto:s.beigel@diefirma.de // http://www.diefirma.de

Re: arrayMapping's innerType qname

Posted by Anne Thomas Manes <at...@gmail.com>.
Actually, it could matter if you are trying to achieve
interoperability. Did you generate your code from the WSDL? Did you
tell the service to use your WSDL file rather than an auto-generated
one?

Anne

On 7/4/05, Sebastian Beigel <s....@diefirma.de> wrote:
> Hi,
> 
> I'm using a document-style web service and the request contains an array
> of objects in the form:
> 
> <users><user>...</user><user>...</user></users>
> 
> defined by (from my WSDL-file):
> 
>     <element name="users">
>      <complexType>
>       <sequence>
>        <element maxOccurs="unbounded" minOccurs="0" name="user"
> type="impl:User"/>
>       </sequence>
>      </complexType>
>     </element>
> 
> Requests sent by the generated junit tests are constructed in the
> desired format but looking at
> http://localhost:8080/foo/services/FooUsers?WSDL results in:
> 
> <element name="users">
>      <complexType>
>       <sequence>
>        <element maxOccurs="unbounded" minOccurs="0" name="item"
> type="impl:User"/>
>       </sequence>
>      </complexType>
>     </element>
> 
> So, the inner element's name is "item" instead of "user".
> 
> This makes no difference (as it seems that you can name this inner
> element as you like?!) but I would really appreciate the "correctness"
> of the generated WSDL (thinking about validation...)
> 
> Any ideas or am I missing something?
> 
> Please Cc me since I'm not subscribed to the list.
> 
> Regards,
> Sebastian
> 
> --
> Sebastian Beigel // Software Architekt
> (F) Die Firma GmbH // Innovative Kommunikation
> Schwalbacher Straße 74 // D-65183 Wiesbaden
> T +49.6 11.2 38 50.24 // F +49.6 11.2 38 50.11
> mailto:s.beigel@diefirma.de // http://www.diefirma.de
> 
>