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 Jens-Michael Klaus <kl...@fokus.fraunhofer.de> on 2004/02/02 15:07:16 UTC

Array of Sequences

Hi all,

I am not quite sure whether this has been asked before, but I think
there was a bugreport. I am not quite sure whether this bug-report
really applies to me, so 'll ask anyway.

When you have an array of a sequence, axis does not seem to use the name
of the sequence-type but only put the elements contained in the
sequence-type into the array.

OK, an example:
This is the part of the wsdl-file applying to both the sequence and the
array (Somewhat shortened though).

<xsd:complexType name='A'>
<xsd:sequence>
<xsd:element name='ElementName' type='xsd:anyURI'/>
</xsd:sequence>
</xsd:complexType>
                                                                                         <xsd:complexType name='ArrayOfA'>
<xsd:complexContent>
<xsd:restriction base='SOAP-ENC:Array'>
<xsd:attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='...:A[]'/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>

When you invoke a method that contains the array as a parameter, axis
creates something like:
....
<ArrayOfA>
<ElementName>.....</ElementName>
</ArrayOfA>

instead of: 
<ArrayOfA>
<A>
<ElementName>.....</ElementName>
</A>
</ArrayOfA>

Now my question is, which version is the right one?

Best Regards and thanks,
Jens-Michael Klaus
-----------------------------------------------------
klaus@fokus.fhg.de
0049 30 3463 7151

Fraunhofer Institute for Open Communication Systems 
Kaiserin-Augusta-Allee 31 
10589 Berlin



return xml to .net client

Posted by Cui <cu...@yahoo.com.cn>.
hi,all
  can anybody show me some example to build a web
service with aixs which can  retrun xml document to
.net client ?

  I've build the service successfully in .net server
and it's wsdl look like this :

  <?xml version="1.0" encoding="utf-8" ?> 
- <definitions
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://tempuri.org/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
- <s:element name="HelloDoc">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="inDoc">
- <s:complexType mixed="true">
- <s:sequence>
  <s:any /> 
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="HelloDocResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1"
name="HelloDocResult">
- <s:complexType mixed="true">
- <s:sequence>
  <s:any /> 
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:schema>
  </types>
- <message name="HelloDocSoapIn">
  <part name="parameters" element="s0:HelloDoc" /> 
  </message>
- <message name="HelloDocSoapOut">
  <part name="parameters"
element="s0:HelloDocResponse" /> 
  </message>
- <portType name="DocServSoap">
- <operation name="HelloDoc">
  <input message="s0:HelloDocSoapIn" /> 
  <output message="s0:HelloDocSoapOut" /> 
  </operation>
  </portType>
- <binding name="DocServSoap" type="s0:DocServSoap">
  <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" /> 
- <operation name="HelloDoc">
  <soap:operation
soapAction="http://tempuri.org/HelloDoc"
style="document" /> 
- <input>
  <soap:body use="literal" /> 
  </input>
- <output>
  <soap:body use="literal" /> 
  </output>
  </operation>
  </binding>
- <service name="DocServ">
- <port name="DocServSoap" binding="s0:DocServSoap">
  <soap:address
location="http://localhost/NetService/Service2.asmx"
/> 
  </port>
  </service>
  </definitions>
---------------------------
but I can't build an axis web service from this wsdl
file,can you give me some help???

thanks.



_________________________________________________________
Do You Yahoo!? 
完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com