axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert K." <hostiro...@nexgo.de>
Subject Problem with Response of Soap for an Array
Date Fri, 01 Dec 2006 12:30:52 GMT
Hello,

I am a Student at Dresden University Germany and have a problem with SOAP Response for an
Array.

Every ArrayElement get a own new namespace (ns1:item, ns2:item, 
ns3:item.....). How can I avoid this? Is there a "simple" possibility. 

I use Java for develop my Webservice.

Thanks for Help

Robert

SOAP-Response

- <#> <ns1:item xmlns:ns1="http://Foobar/ServiceName">
  <foobar1>AB12345</foobar1>
 [...]
  </ns1:item>
- <#> <ns2:item xmlns:ns2="http://Foobar/ServiceName">
  <foobar1>CF1</foobar1>
 [...]
  </ns2:item>
- <#> <ns3:item xmlns:ns3="http://Foobar/ServiceName">
  <foobar1>PC12</foobar1>
 [...]
  </ns3:item>


WSDL :

<complexType name="Foo">
    <sequence>
     <element name="foobar1" type="xsd:string"/>
     <element name="foobar2" type="xsd:dateTime"/>
     <element name="foobar3" type="xsd:string"/>
    </sequence>
   </complexType>
   <element name="showallFooResponse">
    <complexType>
     <sequence>
      <element name="FooArrayItems" nillable="true" 
type="impl:ArrayOf_tns1_Foo"/>
     </sequence>
    </complexType>
   </element>
[...]
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" 
targetNamespace="http://FBWS0607G03/FooBar">
   <import namespace="http://Foobar/ServiceName/Types"/>
   <complexType name="ArrayOf_tns1_Foo">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="1" name="item" 
type="tns1:Foo"/>
    </sequence>
   </complexType>
  </schema>
[...]
<wsdl:message name="showallFooResponse">

      <wsdl:part element="tns1:showallFooResponse" 
name="showallFooResponse"/>

   </wsdl:message>

[...]
<wsdl:operation name="showallFoo" 
parameterOrder="showallFooRequest">

         <wsdl:input message="impl:showallFooRequest" 
name="showallFooRequest"/>

         <wsdl:output message="impl:showallFooResponse" 
name="showallFooResponse"/>

      </wsdl:operation>
[...]
<wsdl:output name="showallFooResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>
[...]

WSDD:
[...]
<arrayMapping
        xmlns:ns="http://FBWS0607G03/FooBar"
        qname="ns:ArrayOf_tns1_Foo"
        type="java:FBWS0607G03.FooBar.Types.Foo[]"
        innerType="cmp-ns:Flug" 
xmlns:cmp-ns="http://FBWS0607G03/FooBar/Types"
        encodingStyle=""
      />
[...]
<typeMapping
        xmlns:ns="http://FBWS0607G03/FooBar/Types"
        qname="ns:>showallFooResponse"
        type="java:FBWS0607G03.FooBar.Types.showallFooResponse"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
[...]


--------------080207050402070401030009
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Hello,

I am a Student at Dresden University Germany and have a problem with SOAP Response for an
Array.

Every ArrayElement get a own new namespace (ns1:item, ns2:item, 
ns3:item.....). How can I avoid this? Is there a "simple" possibility. 

I use Java for develop my Webservice.

Thanks for Help

Robert

SOAP-Response

- &lt;#&gt; &lt;ns1:item xmlns:ns1="<b class="moz-txt-star"><span
 class="moz-txt-tag"></span><a class="moz-txt-link-freetext" href="http://Foobar/ServiceName">http://Foobar/ServiceName</a><span
 class="moz-txt-tag"></span></b>"&gt;
  &lt;foobar1&gt;AB12345&lt;/foobar1&gt;
 [...]
  &lt;/ns1:item&gt;
- &lt;#&gt; &lt;ns2:item xmlns:ns2="<b class="moz-txt-star"><span
 class="moz-txt-tag"></span><a class="moz-txt-link-freetext" href="http://Foobar/ServiceName">http://Foobar/ServiceName</a><span
 class="moz-txt-tag">"</span></b>&gt;
  &lt;foobar1&gt;CF1&lt;/foobar1&gt;
 [...]
  &lt;/ns2:item&gt;
- &lt;#&gt; &lt;ns3:item xmlns:ns3="<b class="moz-txt-star"><span
 class="moz-txt-tag"></span><a class="moz-txt-link-freetext" href="http://Foobar/ServiceName">http://Foobar/ServiceName</a><span
 class="moz-txt-tag"></span></b>"&gt;
  &lt;foobar1&gt;PC12&lt;/foobar1&gt;
 [...]
  &lt;/ns3:item&gt;


WSDL :

&lt;complexType name="Foo"&gt;
    &lt;sequence&gt;
     &lt;element name="foobar1" type="xsd:string"/&gt;
     &lt;element name="foobar2" type="xsd:dateTime"/&gt;
     &lt;element name="foobar3" type="xsd:string"/&gt;
    &lt;/sequence&gt;
   &lt;/complexType&gt;
   &lt;element name="showallFooResponse"&gt;
    &lt;complexType&gt;
     &lt;sequence&gt;
      &lt;element name="FooArrayItems" nillable="true" 
type="impl:ArrayOf_tns1_Foo"/&gt;
     &lt;/sequence&gt;
    &lt;/complexType&gt;
   &lt;/element&gt;
[...]
&lt;schema xmlns=<a class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> 
elementFormDefault="qualified" 
targetNamespace=<a class="moz-txt-link-rfc2396E"
 href="http://FBWS0607G03/FlugBuchung">"http://FBWS0607G03/FooBar"</a>&gt;
   &lt;import namespace=<a class="moz-txt-link-rfc2396E"
 href="http://Foobar/ServiceName/Types">"http://Foobar/ServiceName/Types"</a>/&gt;
   &lt;complexType name="ArrayOf_tns1_Foo"&gt;
    &lt;sequence&gt;
     &lt;element maxOccurs="unbounded" minOccurs="1" name="item" 
type="tns1:Foo"/&gt;
    &lt;/sequence&gt;
   &lt;/complexType&gt;
  &lt;/schema&gt;
[...]
&lt;wsdl:message name="showallFooResponse"&gt;

      &lt;wsdl:part element="tns1:showallFooResponse" 
name="showallFooResponse"/&gt;

   &lt;/wsdl:message&gt;

[...]
&lt;wsdl:operation name="showallFoo" 
parameterOrder="showallFooRequest"&gt;

         &lt;wsdl:input message="impl:showallFooRequest" 
name="showallFooRequest"/&gt;

         &lt;wsdl:output message="impl:showallFooResponse" 
name="showallFooResponse"/&gt;

      &lt;/wsdl:operation&gt;
[...]
&lt;wsdl:output name="showallFooResponse"&gt;

            &lt;wsdlsoap:body use="literal"/&gt;

         &lt;/wsdl:output&gt;
[...]

WSDD:
[...]
&lt;arrayMapping
        xmlns:ns=<a class="moz-txt-link-rfc2396E"
 href="http://FBWS0607G03/FlugBuchung">"http://FBWS0607G03/FooBar"</a>
        qname="ns:ArrayOf_tns1_Foo"
        type="java:FBWS0607G03.FooBar.Types.Foo[]"
        innerType="cmp-ns:Flug" 
xmlns:cmp-ns=<a class="moz-txt-link-rfc2396E"
 href="http://FBWS0607G03/FlugBuchung/Types">"http://FBWS0607G03/FooBar/Types"</a>
        encodingStyle=""
      /&gt;
[...]
&lt;typeMapping
        xmlns:ns=<a class="moz-txt-link-rfc2396E"
 href="http://FBWS0607G03/FlugBuchung/Types">"http://FBWS0607G03/FooBar/Types"</a>
        qname="ns:&gt;showallFooResponse"
        type="java:FBWS0607G03.FooBar.Types.showallFooResponse"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      /&gt;
[...]</pre>
</body>
</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message