You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Terry Zhou <zh...@gmail.com> on 2007/11/27 11:31:38 UTC

Namespace problem of Array element.

Hi, all

Is there any configuration to prevent the empty namespace generatation of
array element for Axis1.4 when use basic type array with document/literal
style? For example,
The client soap request message is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd">
         <ns:return>1</ns:return>
         <ns:return>2</ns:return>
         <ns:return>5</ns:return>
         <ns:return>8</ns:return>
         <ns:return>99</ns:return>
      </ns:echoIntArrayResponse>
   </soapenv:Body>
</soapenv:Envelope>


and axis serve side response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <aReturn xmlns="http://math.samples">
         <item xmlns="">1</item>
         <item xmlns="">2</item>
         <item xmlns="">5</item>
         <item xmlns="">8</item>
         <item xmlns="">99</item>
      </aReturn>
   </soapenv:Body>
</soapenv:Envelope>

This won't interop with some web service client for the element <item> has a
empty namespace instead of the default one("http://math.samples"). I have
also tested with Axis2-1.3, it responses OK with the following message:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd">
         <ns:return>1</ns:return>
         <ns:return>2</ns:return>
         <ns:return>5</ns:return>
         <ns:return>8</ns:return>
         <ns:return>99</ns:return>
      </ns:echoIntArrayResponse>
   </soapenv:Body>
</soapenv:Envelope>

So for Axis 1.4, is there any configuration to make the namespace of element
<item> right? Thanks a lot!

Terry


FYI, WSDL file for the web service.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://math.samples/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://math.samples/" xmlns:intf="http://math.samples/"
xmlns:tns1="http://math.samples"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified"
targetNamespace="http://math.samples"
xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="a">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:int"/>
     </sequence>

    </complexType>
   </element>
  </schema>
  <schema elementFormDefault="qualified"
targetNamespace="http://math.samples/"
xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="echoIntArrayReturn">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:int"/>
     </sequence>

    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="echoIntArrayResponse">

      <wsdl:part element="impl:echoIntArrayReturn" name="echoIntArrayReturn"/>

   </wsdl:message>

   <wsdl:message name="echoIntArrayRequest">

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

   </wsdl:message>

   <wsdl:portType name="Math">

      <wsdl:operation name="echoIntArray" parameterOrder="a">

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

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

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MathSoapBinding" type="impl:Math">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="echoIntArray">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="echoIntArrayRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="echoIntArrayResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="MathService">

      <wsdl:port binding="impl:MathSoapBinding" name="Math">

         <wsdlsoap:address location="http://localhost:8080/axis/services/Math"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

Re: Namespace problem of Array element.

Posted by WJ Krpelan <kr...@yahoo.com>.
Hi
you should generally use doc-lit-wrapped anyway,
Cheers, Wolfgang
--- Terry Zhou <zh...@gmail.com> wrote:

> Hey Anne,
> 
> Sorry my typo the client message is wrong, should be
> 
> <env:Envelope
>
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
>    <env:Header/>
>    <env:Body>
>       <math:a xmlns:math="http://math.samples">
>          <math:item>1</math:item>
>          <math:item>2</math:item>
>          <math:item>5</math:item>
>          <math:item>8</math:item>
>          <math:item>99</math:item>
>       </math:a>
>    </env:Body>
> </env:Envelope>
> 
> I have started from a clean state and try the
> message on Axis2-1.3 and
> Axis1.4 again and found Axis1.4 did have namespace
> problem of Array elements
> as I have described. I used doc/literal bare style,
> for Axis2-1.3, it has no
> such problem with the same style.  A workaround for
> Axis1.4 is to use
> doc/literal wrapped style, it's OK.
> 
> Regards,
> Terry
> 
> On Nov 28, 2007 12:19 AM, Anne Thomas Manes
> <at...@gmail.com> wrote:
> 
> > As I said, I think it must be something wrong in
> your implementation.
> > Please start from a clean slate by generating code
> from your WSDL
> > file.
> >
> > Anne
> >
> > On Nov 27, 2007 9:28 AM, Terry Zhou
> <zh...@gmail.com> wrote:
> > > Thanks Anne for your reply!
> > >
> > >  I have two question about you answer:
> > > 1.The same WSDL why axis2 behavior differs with
> Axis 1.4?
> > > 2.If it's qualified why not use "
> http://math.samples" as its namespace
> > > instead of empty?
> > >
> > > Regards,
> > > Terry
> > >
> > >
> > >
> > > On Nov 27, 2007 10:23 PM, Anne Thomas Manes
> <atmanes@gmail.com > wrote:
> > > >
> > > >
> > > >
> > > > You schema definition specifies
> elementFormDefault="qualified"
> > > > therefore Axis should qualify the "item"
> elements. Axis normally
> > > > handles this just fine, so I assume there's a
> problem in the way you
> > > > implemented your service. I suggest you start
> over by running
> > > > wsdl2java.
> > > >
> > > > Anne
> > > >
> > > >
> > > >
> > > >
> > > > On Nov 27, 2007 9:10 AM, Terry Zhou
> <zh...@gmail.com> wrote:
> > > > > Sorry, Anne, I just think this maybe an
> issue of Axis 1.4, developer
> > may
> > > > > know more about it.
> > > > >
> > > > > Thanks,
> > > > > Terry
> > > > >
> > > > >
> > > > >
> > > > > On Nov 27, 2007 10:02 PM, Anne Thomas Manes
> < atmanes@gmail.com >
> > wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > Please send questions related to using
> Axis and Axis2 to the
> > axis-user
> > > > > > list. The axis-dev list is for issues
> related to developing the
> > Axis
> > > > > > and Axis2 frameworks themselves.
> > > > > >
> > > > > > Anne
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Nov 27, 2007 5:31 AM, Terry Zhou <
> zhouxc@gmail.com> wrote:
> > > > > > > Hi, all
> > > > > > >
> > > > > > > Is there any configuration to prevent
> the empty namespace
> > > generatation
> > > > > of
> > > > > > > array element for Axis1.4 when use basic
> type array with
> > > > > document/literal
> > > > > > > style? For example,
> > > > > > > The client soap request message is:
> > > > > > >
> > > > > > > <soapenv:Envelope
> > > > > xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/ ">
> > > > > > >    <soapenv:Body>
> > > > > > >       <ns:echoIntArrayResponse
> xmlns:ns="
> > > > > http://quickstart.samples/xsd">
> > > > > > >          <ns:return>1</ns:return>
> > > > > > >          <ns:return>2</ns:return>
> > > > > > >          <ns:return>5</ns:return>
> > > > > > >          <ns:return>8</ns:return>
> > > > > > >          <ns:return>99</ns:return>
> > > > > > >       </ns:echoIntArrayResponse>
> > > > > > >    </soapenv:Body>
> > > > > > > </soapenv:Envelope>
> > > > > > >
> > > > > > >
> > > > > > > and axis serve side response:
> > > > > > >
> > > > > > > <soapenv:Envelope xmlns:soapenv="
> > > > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > > > >
> xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > > > > xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> > > > > > >    <soapenv:Body>
> > > > > > >       <aReturn xmlns="
> http://math.samples">
> > > > > > >          <item xmlns="">1</item>
> > > > > > >          <item xmlns="">2</item>
> > > > > > >          <item xmlns="">5</item>
> > > > > > >          <item xmlns="">8</item>
> > > > > > >          <item xmlns="">99</item>
> > > > > > >       </aReturn>
> > > > > > >    </soapenv:Body>
> > > > > > > </soapenv:Envelope>
> > > > > > >
> > > > > > > This won't interop with some web service
> client for the element
> > > <item>
> > > > > has a
> > > > > > > empty namespace instead of the default
> one(" http://math.samples").
> > > I
> > > > > have
> > > > > > > also tested with Axis2-1.3, it responses
> OK with the following
> > > message:
> > > > > > >
> > > > > > > <soapenv:Envelope xmlns:soapenv="
> > > > > > >
> http://schemas.xmlsoap.org/soap/envelope/">
> > > > > > >    <soapenv:Body>
> > > > > > >       <ns:echoIntArrayResponse
> xmlns:ns="
> > > http://quickstart.samples/xsd
> > > > > ">
> > > > > > >           <ns:return>1</ns:return>
> > > > > > >          <ns:return>2</ns:return>
> > > > > > >          <ns:return>5</ns:return>
> > > > > > >          <ns:return>8</ns:return>
> > > > > > >          <ns:return>99</ns:return>
> > > > > > >       </ns:echoIntArrayResponse>
> > > > > > >    </soapenv:Body>
> > > > > > > </soapenv:Envelope>
> > > > > > >
> > > > > > > So for Axis 1.4, is there any
> configuration to make the
> > namespace of
> > > > > element
> > > > > > > <item> right? Thanks a lot!
> > > > > > >
> > > > > > > Terry
> > > > > > >
> > > > > > >
> > > > > > > FYI, WSDL file for the web service.
> > > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > > <wsdl:definitions
> 
=== message truncated ===



      ____________________________________________________________________________________
Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/

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


Re: Namespace problem of Array element.

Posted by Terry Zhou <zh...@gmail.com>.
Hey Anne,

Sorry my typo the client message is wrong, should be

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <math:a xmlns:math="http://math.samples">
         <math:item>1</math:item>
         <math:item>2</math:item>
         <math:item>5</math:item>
         <math:item>8</math:item>
         <math:item>99</math:item>
      </math:a>
   </env:Body>
</env:Envelope>

I have started from a clean state and try the message on Axis2-1.3 and
Axis1.4 again and found Axis1.4 did have namespace problem of Array elements
as I have described. I used doc/literal bare style, for Axis2-1.3, it has no
such problem with the same style.  A workaround for Axis1.4 is to use
doc/literal wrapped style, it's OK.

Regards,
Terry

On Nov 28, 2007 12:19 AM, Anne Thomas Manes <at...@gmail.com> wrote:

> As I said, I think it must be something wrong in your implementation.
> Please start from a clean slate by generating code from your WSDL
> file.
>
> Anne
>
> On Nov 27, 2007 9:28 AM, Terry Zhou <zh...@gmail.com> wrote:
> > Thanks Anne for your reply!
> >
> >  I have two question about you answer:
> > 1.The same WSDL why axis2 behavior differs with Axis 1.4?
> > 2.If it's qualified why not use " http://math.samples" as its namespace
> > instead of empty?
> >
> > Regards,
> > Terry
> >
> >
> >
> > On Nov 27, 2007 10:23 PM, Anne Thomas Manes <atmanes@gmail.com > wrote:
> > >
> > >
> > >
> > > You schema definition specifies elementFormDefault="qualified"
> > > therefore Axis should qualify the "item" elements. Axis normally
> > > handles this just fine, so I assume there's a problem in the way you
> > > implemented your service. I suggest you start over by running
> > > wsdl2java.
> > >
> > > Anne
> > >
> > >
> > >
> > >
> > > On Nov 27, 2007 9:10 AM, Terry Zhou <zh...@gmail.com> wrote:
> > > > Sorry, Anne, I just think this maybe an issue of Axis 1.4, developer
> may
> > > > know more about it.
> > > >
> > > > Thanks,
> > > > Terry
> > > >
> > > >
> > > >
> > > > On Nov 27, 2007 10:02 PM, Anne Thomas Manes < atmanes@gmail.com >
> wrote:
> > > > >
> > > > >
> > > > >
> > > > > Please send questions related to using Axis and Axis2 to the
> axis-user
> > > > > list. The axis-dev list is for issues related to developing the
> Axis
> > > > > and Axis2 frameworks themselves.
> > > > >
> > > > > Anne
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Nov 27, 2007 5:31 AM, Terry Zhou < zhouxc@gmail.com> wrote:
> > > > > > Hi, all
> > > > > >
> > > > > > Is there any configuration to prevent the empty namespace
> > generatation
> > > > of
> > > > > > array element for Axis1.4 when use basic type array with
> > > > document/literal
> > > > > > style? For example,
> > > > > > The client soap request message is:
> > > > > >
> > > > > > <soapenv:Envelope
> > > > xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ ">
> > > > > >    <soapenv:Body>
> > > > > >       <ns:echoIntArrayResponse xmlns:ns="
> > > > http://quickstart.samples/xsd">
> > > > > >          <ns:return>1</ns:return>
> > > > > >          <ns:return>2</ns:return>
> > > > > >          <ns:return>5</ns:return>
> > > > > >          <ns:return>8</ns:return>
> > > > > >          <ns:return>99</ns:return>
> > > > > >       </ns:echoIntArrayResponse>
> > > > > >    </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > >
> > > > > > and axis serve side response:
> > > > > >
> > > > > > <soapenv:Envelope xmlns:soapenv="
> > > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
> > > > > >    <soapenv:Body>
> > > > > >       <aReturn xmlns=" http://math.samples">
> > > > > >          <item xmlns="">1</item>
> > > > > >          <item xmlns="">2</item>
> > > > > >          <item xmlns="">5</item>
> > > > > >          <item xmlns="">8</item>
> > > > > >          <item xmlns="">99</item>
> > > > > >       </aReturn>
> > > > > >    </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > > This won't interop with some web service client for the element
> > <item>
> > > > has a
> > > > > > empty namespace instead of the default one(" http://math.samples").
> > I
> > > > have
> > > > > > also tested with Axis2-1.3, it responses OK with the following
> > message:
> > > > > >
> > > > > > <soapenv:Envelope xmlns:soapenv="
> > > > > > http://schemas.xmlsoap.org/soap/envelope/">
> > > > > >    <soapenv:Body>
> > > > > >       <ns:echoIntArrayResponse xmlns:ns="
> > http://quickstart.samples/xsd
> > > > ">
> > > > > >           <ns:return>1</ns:return>
> > > > > >          <ns:return>2</ns:return>
> > > > > >          <ns:return>5</ns:return>
> > > > > >          <ns:return>8</ns:return>
> > > > > >          <ns:return>99</ns:return>
> > > > > >       </ns:echoIntArrayResponse>
> > > > > >    </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > > So for Axis 1.4, is there any configuration to make the
> namespace of
> > > > element
> > > > > > <item> right? Thanks a lot!
> > > > > >
> > > > > > Terry
> > > > > >
> > > > > >
> > > > > > FYI, WSDL file for the web service.
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <wsdl:definitions
> > > > > >  targetNamespace="http://math.samples/" xmlns:apachesoap="
> > > > > > http://xml.apache.org/xml-soap " xmlns:impl="
> http://math.samples/"
> > > > > > xmlns:intf="http://math.samples/" xmlns:tns1="
> > > > > > http://math.samples" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/"
> > > > > > xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd=
> > > > > > "http://www.w3.org/2001/XMLSchema ">
> > > > > > <!--WSDL created by Apache Axis version: 1.4
> > > > > > Built on Apr 22, 2006 (06:55:48 PDT)-->
> > > > > >
> > > > > >  <wsdl:types>
> > > > > >  <schema elementFormDefault="qualified"
> > > > > > targetNamespace="http://math.samples" xmlns=
> > > > > > "http://www.w3.org/2001/XMLSchema ">
> > > > > >  <element name=
> > > > > > "a">
> > > > > >  <complexType>
> > > > > >  <sequence>
> > > > > >  <element maxOccurs
> > > > > > ="unbounded" minOccurs="0" name=
> > > > > > "item" type="xsd:int"/>
> > > > > >  </sequence>
> > > > > >
> > > > > >
> > > > > >  </complexType>
> > > > > >  </element>
> > > > > >  </schema>
> > > > > >  <schema
> > > > > >  elementFormDefault="qualified" targetNamespace="
> > > > > > http://math.samples/" xmlns=" http://www.w3.org/2001/XMLSchema">
> > > > > >  <
> > > > > > element name="echoIntArrayReturn">
> > > > > >  <complexType>
> > > > > >  <
> > > > > > sequence>
> > > > > >  <element maxOccurs="unbounded"
> > > > > > minOccurs="0" name="item" type=
> > > > > > "xsd:int"/>
> > > > > >  </sequence>
> > > > > >
> > > > > >  </complexType>
> > > > > >  </
> > > > > > element>
> > > > > >  </schema>
> > > > > >  </wsdl:types>
> > > > > >
> > > > > >  <wsdl:message name=
> > > > > > "echoIntArrayResponse">
> > > > > >
> > > > > >  <wsdl:part element="impl:echoIntArrayReturn"
> > > > > > name="echoIntArrayReturn"/>
> > > > > >
> > > > > >  </wsdl:message>
> > > > > >
> > > > > >
> > > > > >  <wsdl:message name="echoIntArrayRequest">
> > > > > >
> > > > > >  <
> > > > > > wsdl:part element="tns1:a" name="a"
> > > > > > />
> > > > > >
> > > > > >  </wsdl:message>
> > > > > >
> > > > > >  <wsdl:portType name="Math"
> > > > > > >
> > > > > >
> > > > > >  <wsdl:operation name="echoIntArray" parameterOrder
> > > > > > ="a">
> > > > > >
> > > > > >  <wsdl:input message="impl:echoIntArrayRequest"
> > > > > > name="echoIntArrayRequest"/>
> > > > > >
> > > > > >  <
> > > > > > wsdl:output message="impl:echoIntArrayResponse"
> > > > name="echoIntArrayResponse"
> > > > > > />
> > > > > >
> > > > > >  </wsdl:operation>
> > > > > >
> > > > > >  </wsdl:portType>
> > > > > >
> > > > > >  <wsdl:binding
> > > > > >  name="MathSoapBinding" type="impl:Math">
> > > > > >
> > > > > >
> > > > > >  <wsdlsoap:binding style="document" transport=
> > > > > > " http://schemas.xmlsoap.org/soap/http"/>
> > > > > >
> > > > > >  <wsdl:operation
> > > > > >  name="echoIntArray">
> > > > > >
> > > > > >  <wsdlsoap:operation soapAction=
> > > > > > ""/>
> > > > > >
> > > > > >  <wsdl:input name="echoIntArrayRequest"
> > > > > > >
> > > > > >
> > > > > >  <wsdlsoap:body use="literal"/>
> > > > > >
> > > > > >
> > > > > >  </wsdl:input>
> > > > > >
> > > > > >  <wsdl:output name="echoIntArrayResponse"
> > > > > > >
> > > > > >
> > > > > >  <wsdlsoap:body use="literal"/>
> > > > > >
> > > > > >
> > > > > >  </wsdl:output>
> > > > > >
> > > > > >  </wsdl:operation>
> > > > > >
> > > > > >  </wsdl:binding>
> > > > > >
> > > > > >  <
> > > > > > wsdl:service name="MathService">
> > > > > >
> > > > > >  <wsdl:port
> > > > > >  binding="impl:MathSoapBinding" name="Math">
> > > > > >
> > > > > >  <
> > > > > > wsdlsoap:address location="
> http://localhost:8080/axis/services/Math
> > "
> > > > > > />
> > > > > >
> > > > > >  </wsdl:port>
> > > > > >
> > > > > >  </wsdl:service>
> > > > > >
> > > > > > </wsdl:definitions>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > >
> > >
> > >
> > >
> > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Namespace problem of Array element.

Posted by Anne Thomas Manes <at...@gmail.com>.
As I said, I think it must be something wrong in your implementation.
Please start from a clean slate by generating code from your WSDL
file.

Anne

On Nov 27, 2007 9:28 AM, Terry Zhou <zh...@gmail.com> wrote:
> Thanks Anne for your reply!
>
>  I have two question about you answer:
> 1.The same WSDL why axis2 behavior differs with Axis 1.4?
> 2.If it's qualified why not use " http://math.samples" as its namespace
> instead of empty?
>
> Regards,
> Terry
>
>
>
> On Nov 27, 2007 10:23 PM, Anne Thomas Manes <atmanes@gmail.com > wrote:
> >
> >
> >
> > You schema definition specifies elementFormDefault="qualified"
> > therefore Axis should qualify the "item" elements. Axis normally
> > handles this just fine, so I assume there's a problem in the way you
> > implemented your service. I suggest you start over by running
> > wsdl2java.
> >
> > Anne
> >
> >
> >
> >
> > On Nov 27, 2007 9:10 AM, Terry Zhou <zh...@gmail.com> wrote:
> > > Sorry, Anne, I just think this maybe an issue of Axis 1.4, developer may
> > > know more about it.
> > >
> > > Thanks,
> > > Terry
> > >
> > >
> > >
> > > On Nov 27, 2007 10:02 PM, Anne Thomas Manes < atmanes@gmail.com > wrote:
> > > >
> > > >
> > > >
> > > > Please send questions related to using Axis and Axis2 to the axis-user
> > > > list. The axis-dev list is for issues related to developing the Axis
> > > > and Axis2 frameworks themselves.
> > > >
> > > > Anne
> > > >
> > > >
> > > >
> > > >
> > > > On Nov 27, 2007 5:31 AM, Terry Zhou < zhouxc@gmail.com> wrote:
> > > > > Hi, all
> > > > >
> > > > > Is there any configuration to prevent the empty namespace
> generatation
> > > of
> > > > > array element for Axis1.4 when use basic type array with
> > > document/literal
> > > > > style? For example,
> > > > > The client soap request message is:
> > > > >
> > > > > <soapenv:Envelope
> > > xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ ">
> > > > >    <soapenv:Body>
> > > > >       <ns:echoIntArrayResponse xmlns:ns="
> > > http://quickstart.samples/xsd">
> > > > >          <ns:return>1</ns:return>
> > > > >          <ns:return>2</ns:return>
> > > > >          <ns:return>5</ns:return>
> > > > >          <ns:return>8</ns:return>
> > > > >          <ns:return>99</ns:return>
> > > > >       </ns:echoIntArrayResponse>
> > > > >    </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > >
> > > > > and axis serve side response:
> > > > >
> > > > > <soapenv:Envelope xmlns:soapenv="
> > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
> > > > >    <soapenv:Body>
> > > > >       <aReturn xmlns=" http://math.samples">
> > > > >          <item xmlns="">1</item>
> > > > >          <item xmlns="">2</item>
> > > > >          <item xmlns="">5</item>
> > > > >          <item xmlns="">8</item>
> > > > >          <item xmlns="">99</item>
> > > > >       </aReturn>
> > > > >    </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > > This won't interop with some web service client for the element
> <item>
> > > has a
> > > > > empty namespace instead of the default one(" http://math.samples ").
> I
> > > have
> > > > > also tested with Axis2-1.3, it responses OK with the following
> message:
> > > > >
> > > > > <soapenv:Envelope xmlns:soapenv="
> > > > > http://schemas.xmlsoap.org/soap/envelope/">
> > > > >    <soapenv:Body>
> > > > >       <ns:echoIntArrayResponse xmlns:ns="
> http://quickstart.samples/xsd
> > > ">
> > > > >           <ns:return>1</ns:return>
> > > > >          <ns:return>2</ns:return>
> > > > >          <ns:return>5</ns:return>
> > > > >          <ns:return>8</ns:return>
> > > > >          <ns:return>99</ns:return>
> > > > >       </ns:echoIntArrayResponse>
> > > > >    </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > > So for Axis 1.4, is there any configuration to make the namespace of
> > > element
> > > > > <item> right? Thanks a lot!
> > > > >
> > > > > Terry
> > > > >
> > > > >
> > > > > FYI, WSDL file for the web service.
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <wsdl:definitions
> > > > >  targetNamespace="http://math.samples/" xmlns:apachesoap="
> > > > > http://xml.apache.org/xml-soap " xmlns:impl="http://math.samples/"
> > > > > xmlns:intf="http://math.samples/" xmlns:tns1="
> > > > > http://math.samples" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > > xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
> > > > > "http://www.w3.org/2001/XMLSchema ">
> > > > > <!--WSDL created by Apache Axis version: 1.4
> > > > > Built on Apr 22, 2006 (06:55:48 PDT)-->
> > > > >
> > > > >  <wsdl:types>
> > > > >  <schema elementFormDefault="qualified"
> > > > > targetNamespace="http://math.samples" xmlns=
> > > > > "http://www.w3.org/2001/XMLSchema ">
> > > > >  <element name=
> > > > > "a">
> > > > >  <complexType>
> > > > >  <sequence>
> > > > >  <element maxOccurs
> > > > > ="unbounded" minOccurs="0" name=
> > > > > "item" type="xsd:int"/>
> > > > >  </sequence>
> > > > >
> > > > >
> > > > >  </complexType>
> > > > >  </element>
> > > > >  </schema>
> > > > >  <schema
> > > > >  elementFormDefault="qualified" targetNamespace="
> > > > > http://math.samples/" xmlns=" http://www.w3.org/2001/XMLSchema">
> > > > >  <
> > > > > element name="echoIntArrayReturn">
> > > > >  <complexType>
> > > > >  <
> > > > > sequence>
> > > > >  <element maxOccurs="unbounded"
> > > > > minOccurs="0" name="item" type=
> > > > > "xsd:int"/>
> > > > >  </sequence>
> > > > >
> > > > >  </complexType>
> > > > >  </
> > > > > element>
> > > > >  </schema>
> > > > >  </wsdl:types>
> > > > >
> > > > >  <wsdl:message name=
> > > > > "echoIntArrayResponse">
> > > > >
> > > > >  <wsdl:part element="impl:echoIntArrayReturn"
> > > > > name="echoIntArrayReturn"/>
> > > > >
> > > > >  </wsdl:message>
> > > > >
> > > > >
> > > > >  <wsdl:message name="echoIntArrayRequest">
> > > > >
> > > > >  <
> > > > > wsdl:part element="tns1:a" name="a"
> > > > > />
> > > > >
> > > > >  </wsdl:message>
> > > > >
> > > > >  <wsdl:portType name="Math"
> > > > > >
> > > > >
> > > > >  <wsdl:operation name="echoIntArray" parameterOrder
> > > > > ="a">
> > > > >
> > > > >  <wsdl:input message="impl:echoIntArrayRequest"
> > > > > name="echoIntArrayRequest"/>
> > > > >
> > > > >  <
> > > > > wsdl:output message="impl:echoIntArrayResponse"
> > > name="echoIntArrayResponse"
> > > > > />
> > > > >
> > > > >  </wsdl:operation>
> > > > >
> > > > >  </wsdl:portType>
> > > > >
> > > > >  <wsdl:binding
> > > > >  name="MathSoapBinding" type="impl:Math">
> > > > >
> > > > >
> > > > >  <wsdlsoap:binding style="document" transport=
> > > > > " http://schemas.xmlsoap.org/soap/http"/>
> > > > >
> > > > >  <wsdl:operation
> > > > >  name="echoIntArray">
> > > > >
> > > > >  <wsdlsoap:operation soapAction=
> > > > > ""/>
> > > > >
> > > > >  <wsdl:input name="echoIntArrayRequest"
> > > > > >
> > > > >
> > > > >  <wsdlsoap:body use="literal"/>
> > > > >
> > > > >
> > > > >  </wsdl:input>
> > > > >
> > > > >  <wsdl:output name="echoIntArrayResponse"
> > > > > >
> > > > >
> > > > >  <wsdlsoap:body use="literal"/>
> > > > >
> > > > >
> > > > >  </wsdl:output>
> > > > >
> > > > >  </wsdl:operation>
> > > > >
> > > > >  </wsdl:binding>
> > > > >
> > > > >  <
> > > > > wsdl:service name="MathService">
> > > > >
> > > > >  <wsdl:port
> > > > >  binding="impl:MathSoapBinding" name="Math">
> > > > >
> > > > >  <
> > > > > wsdlsoap:address location="http://localhost:8080/axis/services/Math
> "
> > > > > />
> > > > >
> > > > >  </wsdl:port>
> > > > >
> > > > >  </wsdl:service>
> > > > >
> > > > > </wsdl:definitions>
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> >
> >
> >
> >
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>

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


Re: Namespace problem of Array element.

Posted by Terry Zhou <zh...@gmail.com>.
Thanks Anne for your reply!

 I have two question about you answer:
1.The same WSDL why axis2 behavior differs with Axis 1.4?
2.If it's qualified why not use "http://math.samples" as its namespace
instead of empty?

Regards,
Terry

On Nov 27, 2007 10:23 PM, Anne Thomas Manes <at...@gmail.com> wrote:

> You schema definition specifies elementFormDefault="qualified"
> therefore Axis should qualify the "item" elements. Axis normally
> handles this just fine, so I assume there's a problem in the way you
> implemented your service. I suggest you start over by running
> wsdl2java.
>
> Anne
>
> On Nov 27, 2007 9:10 AM, Terry Zhou <zh...@gmail.com> wrote:
> > Sorry, Anne, I just think this maybe an issue of Axis 1.4, developer may
> > know more about it.
> >
> > Thanks,
> > Terry
> >
> >
> >
> > On Nov 27, 2007 10:02 PM, Anne Thomas Manes < atmanes@gmail.com> wrote:
> > >
> > >
> > >
> > > Please send questions related to using Axis and Axis2 to the axis-user
> > > list. The axis-dev list is for issues related to developing the Axis
> > > and Axis2 frameworks themselves.
> > >
> > > Anne
> > >
> > >
> > >
> > >
> > > On Nov 27, 2007 5:31 AM, Terry Zhou < zhouxc@gmail.com> wrote:
> > > > Hi, all
> > > >
> > > > Is there any configuration to prevent the empty namespace
> generatation
> > of
> > > > array element for Axis1.4 when use basic type array with
> > document/literal
> > > > style? For example,
> > > > The client soap request message is:
> > > >
> > > > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ ">
> > > >    <soapenv:Body>
> > > >       <ns:echoIntArrayResponse xmlns:ns="
> > http://quickstart.samples/xsd">
> > > >          <ns:return>1</ns:return>
> > > >          <ns:return>2</ns:return>
> > > >          <ns:return>5</ns:return>
> > > >          <ns:return>8</ns:return>
> > > >          <ns:return>99</ns:return>
> > > >       </ns:echoIntArrayResponse>
> > > >    </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > >
> > > > and axis serve side response:
> > > >
> > > > <soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > > >    <soapenv:Body>
> > > >       <aReturn xmlns=" http://math.samples">
> > > >          <item xmlns="">1</item>
> > > >          <item xmlns="">2</item>
> > > >          <item xmlns="">5</item>
> > > >          <item xmlns="">8</item>
> > > >          <item xmlns="">99</item>
> > > >       </aReturn>
> > > >    </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > This won't interop with some web service client for the element
> <item>
> > has a
> > > > empty namespace instead of the default one(" http://math.samples ").
> I
> > have
> > > > also tested with Axis2-1.3, it responses OK with the following
> message:
> > > >
> > > > <soapenv:Envelope xmlns:soapenv="
> > > > http://schemas.xmlsoap.org/soap/envelope/">
> > > >    <soapenv:Body>
> > > >       <ns:echoIntArrayResponse xmlns:ns="
> http://quickstart.samples/xsd
> > ">
> > > >           <ns:return>1</ns:return>
> > > >          <ns:return>2</ns:return>
> > > >          <ns:return>5</ns:return>
> > > >          <ns:return>8</ns:return>
> > > >          <ns:return>99</ns:return>
> > > >       </ns:echoIntArrayResponse>
> > > >    </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > So for Axis 1.4, is there any configuration to make the namespace of
> > element
> > > > <item> right? Thanks a lot!
> > > >
> > > > Terry
> > > >
> > > >
> > > > FYI, WSDL file for the web service.
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <wsdl:definitions
> > > >  targetNamespace="http://math.samples/" xmlns:apachesoap="
> > > > http://xml.apache.org/xml-soap " xmlns:impl="http://math.samples/"
> > > > xmlns:intf="http://math.samples/" xmlns:tns1="
> > > > http://math.samples" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
> > > > "http://www.w3.org/2001/XMLSchema ">
> > > > <!--WSDL created by Apache Axis version: 1.4
> > > > Built on Apr 22, 2006 (06:55:48 PDT)-->
> > > >
> > > >  <wsdl:types>
> > > >  <schema elementFormDefault="qualified"
> > > > targetNamespace="http://math.samples" xmlns=
> > > > "http://www.w3.org/2001/XMLSchema">
> > > >  <element name=
> > > > "a">
> > > >  <complexType>
> > > >  <sequence>
> > > >  <element maxOccurs
> > > > ="unbounded" minOccurs="0" name=
> > > > "item" type="xsd:int"/>
> > > >  </sequence>
> > > >
> > > >
> > > >  </complexType>
> > > >  </element>
> > > >  </schema>
> > > >  <schema
> > > >  elementFormDefault="qualified" targetNamespace="
> > > > http://math.samples/" xmlns="http://www.w3.org/2001/XMLSchema">
> > > >  <
> > > > element name="echoIntArrayReturn">
> > > >  <complexType>
> > > >  <
> > > > sequence>
> > > >  <element maxOccurs="unbounded"
> > > > minOccurs="0" name="item" type=
> > > > "xsd:int"/>
> > > >  </sequence>
> > > >
> > > >  </complexType>
> > > >  </
> > > > element>
> > > >  </schema>
> > > >  </wsdl:types>
> > > >
> > > >  <wsdl:message name=
> > > > "echoIntArrayResponse">
> > > >
> > > >  <wsdl:part element="impl:echoIntArrayReturn"
> > > > name="echoIntArrayReturn"/>
> > > >
> > > >  </wsdl:message>
> > > >
> > > >
> > > >  <wsdl:message name="echoIntArrayRequest">
> > > >
> > > >  <
> > > > wsdl:part element="tns1:a" name="a"
> > > > />
> > > >
> > > >  </wsdl:message>
> > > >
> > > >  <wsdl:portType name="Math"
> > > > >
> > > >
> > > >  <wsdl:operation name="echoIntArray" parameterOrder
> > > > ="a">
> > > >
> > > >  <wsdl:input message="impl:echoIntArrayRequest"
> > > > name="echoIntArrayRequest"/>
> > > >
> > > >  <
> > > > wsdl:output message="impl:echoIntArrayResponse"
> > name="echoIntArrayResponse"
> > > > />
> > > >
> > > >  </wsdl:operation>
> > > >
> > > >  </wsdl:portType>
> > > >
> > > >  <wsdl:binding
> > > >  name="MathSoapBinding" type="impl:Math">
> > > >
> > > >
> > > >  <wsdlsoap:binding style="document" transport=
> > > > " http://schemas.xmlsoap.org/soap/http"/>
> > > >
> > > >  <wsdl:operation
> > > >  name="echoIntArray">
> > > >
> > > >  <wsdlsoap:operation soapAction=
> > > > ""/>
> > > >
> > > >  <wsdl:input name="echoIntArrayRequest"
> > > > >
> > > >
> > > >  <wsdlsoap:body use="literal"/>
> > > >
> > > >
> > > >  </wsdl:input>
> > > >
> > > >  <wsdl:output name="echoIntArrayResponse"
> > > > >
> > > >
> > > >  <wsdlsoap:body use="literal"/>
> > > >
> > > >
> > > >  </wsdl:output>
> > > >
> > > >  </wsdl:operation>
> > > >
> > > >  </wsdl:binding>
> > > >
> > > >  <
> > > > wsdl:service name="MathService">
> > > >
> > > >  <wsdl:port
> > > >  binding="impl:MathSoapBinding" name="Math">
> > > >
> > > >  <
> > > > wsdlsoap:address location="http://localhost:8080/axis/services/Math"
> > > > />
> > > >
> > > >  </wsdl:port>
> > > >
> > > >  </wsdl:service>
> > > >
> > > > </wsdl:definitions>
> > > >
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Namespace problem of Array element.

Posted by Anne Thomas Manes <at...@gmail.com>.
You schema definition specifies elementFormDefault="qualified"
therefore Axis should qualify the "item" elements. Axis normally
handles this just fine, so I assume there's a problem in the way you
implemented your service. I suggest you start over by running
wsdl2java.

Anne

On Nov 27, 2007 9:10 AM, Terry Zhou <zh...@gmail.com> wrote:
> Sorry, Anne, I just think this maybe an issue of Axis 1.4, developer may
> know more about it.
>
> Thanks,
> Terry
>
>
>
> On Nov 27, 2007 10:02 PM, Anne Thomas Manes < atmanes@gmail.com> wrote:
> >
> >
> >
> > Please send questions related to using Axis and Axis2 to the axis-user
> > list. The axis-dev list is for issues related to developing the Axis
> > and Axis2 frameworks themselves.
> >
> > Anne
> >
> >
> >
> >
> > On Nov 27, 2007 5:31 AM, Terry Zhou < zhouxc@gmail.com> wrote:
> > > Hi, all
> > >
> > > Is there any configuration to prevent the empty namespace generatation
> of
> > > array element for Axis1.4 when use basic type array with
> document/literal
> > > style? For example,
> > > The client soap request message is:
> > >
> > > <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ ">
> > >    <soapenv:Body>
> > >       <ns:echoIntArrayResponse xmlns:ns="
> http://quickstart.samples/xsd">
> > >          <ns:return>1</ns:return>
> > >          <ns:return>2</ns:return>
> > >          <ns:return>5</ns:return>
> > >          <ns:return>8</ns:return>
> > >          <ns:return>99</ns:return>
> > >       </ns:echoIntArrayResponse>
> > >    </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > >
> > > and axis serve side response:
> > >
> > > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > >    <soapenv:Body>
> > >       <aReturn xmlns=" http://math.samples">
> > >          <item xmlns="">1</item>
> > >          <item xmlns="">2</item>
> > >          <item xmlns="">5</item>
> > >          <item xmlns="">8</item>
> > >          <item xmlns="">99</item>
> > >       </aReturn>
> > >    </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > This won't interop with some web service client for the element <item>
> has a
> > > empty namespace instead of the default one(" http://math.samples "). I
> have
> > > also tested with Axis2-1.3, it responses OK with the following message:
> > >
> > > <soapenv:Envelope xmlns:soapenv="
> > > http://schemas.xmlsoap.org/soap/envelope/">
> > >    <soapenv:Body>
> > >       <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd
> ">
> > >           <ns:return>1</ns:return>
> > >          <ns:return>2</ns:return>
> > >          <ns:return>5</ns:return>
> > >          <ns:return>8</ns:return>
> > >          <ns:return>99</ns:return>
> > >       </ns:echoIntArrayResponse>
> > >    </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > So for Axis 1.4, is there any configuration to make the namespace of
> element
> > > <item> right? Thanks a lot!
> > >
> > > Terry
> > >
> > >
> > > FYI, WSDL file for the web service.
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions
> > >  targetNamespace="http://math.samples/" xmlns:apachesoap="
> > > http://xml.apache.org/xml-soap " xmlns:impl="http://math.samples/"
> > > xmlns:intf="http://math.samples/" xmlns:tns1="
> > > http://math.samples" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
> > > "http://www.w3.org/2001/XMLSchema ">
> > > <!--WSDL created by Apache Axis version: 1.4
> > > Built on Apr 22, 2006 (06:55:48 PDT)-->
> > >
> > >  <wsdl:types>
> > >  <schema elementFormDefault="qualified"
> > > targetNamespace="http://math.samples" xmlns=
> > > "http://www.w3.org/2001/XMLSchema">
> > >  <element name=
> > > "a">
> > >  <complexType>
> > >  <sequence>
> > >  <element maxOccurs
> > > ="unbounded" minOccurs="0" name=
> > > "item" type="xsd:int"/>
> > >  </sequence>
> > >
> > >
> > >  </complexType>
> > >  </element>
> > >  </schema>
> > >  <schema
> > >  elementFormDefault="qualified" targetNamespace="
> > > http://math.samples/" xmlns="http://www.w3.org/2001/XMLSchema">
> > >  <
> > > element name="echoIntArrayReturn">
> > >  <complexType>
> > >  <
> > > sequence>
> > >  <element maxOccurs="unbounded"
> > > minOccurs="0" name="item" type=
> > > "xsd:int"/>
> > >  </sequence>
> > >
> > >  </complexType>
> > >  </
> > > element>
> > >  </schema>
> > >  </wsdl:types>
> > >
> > >  <wsdl:message name=
> > > "echoIntArrayResponse">
> > >
> > >  <wsdl:part element="impl:echoIntArrayReturn"
> > > name="echoIntArrayReturn"/>
> > >
> > >  </wsdl:message>
> > >
> > >
> > >  <wsdl:message name="echoIntArrayRequest">
> > >
> > >  <
> > > wsdl:part element="tns1:a" name="a"
> > > />
> > >
> > >  </wsdl:message>
> > >
> > >  <wsdl:portType name="Math"
> > > >
> > >
> > >  <wsdl:operation name="echoIntArray" parameterOrder
> > > ="a">
> > >
> > >  <wsdl:input message="impl:echoIntArrayRequest"
> > > name="echoIntArrayRequest"/>
> > >
> > >  <
> > > wsdl:output message="impl:echoIntArrayResponse"
> name="echoIntArrayResponse"
> > > />
> > >
> > >  </wsdl:operation>
> > >
> > >  </wsdl:portType>
> > >
> > >  <wsdl:binding
> > >  name="MathSoapBinding" type="impl:Math">
> > >
> > >
> > >  <wsdlsoap:binding style="document" transport=
> > > " http://schemas.xmlsoap.org/soap/http"/>
> > >
> > >  <wsdl:operation
> > >  name="echoIntArray">
> > >
> > >  <wsdlsoap:operation soapAction=
> > > ""/>
> > >
> > >  <wsdl:input name="echoIntArrayRequest"
> > > >
> > >
> > >  <wsdlsoap:body use="literal"/>
> > >
> > >
> > >  </wsdl:input>
> > >
> > >  <wsdl:output name="echoIntArrayResponse"
> > > >
> > >
> > >  <wsdlsoap:body use="literal"/>
> > >
> > >
> > >  </wsdl:output>
> > >
> > >  </wsdl:operation>
> > >
> > >  </wsdl:binding>
> > >
> > >  <
> > > wsdl:service name="MathService">
> > >
> > >  <wsdl:port
> > >  binding="impl:MathSoapBinding" name="Math">
> > >
> > >  <
> > > wsdlsoap:address location="http://localhost:8080/axis/services/Math "
> > > />
> > >
> > >  </wsdl:port>
> > >
> > >  </wsdl:service>
> > >
> > > </wsdl:definitions>
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>

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


Re: Namespace problem of Array element.

Posted by Terry Zhou <zh...@gmail.com>.
Sorry, Anne, I just think this maybe an issue of Axis 1.4, developer may
know more about it.

Thanks,
Terry

On Nov 27, 2007 10:02 PM, Anne Thomas Manes <at...@gmail.com> wrote:

> Please send questions related to using Axis and Axis2 to the axis-user
> list. The axis-dev list is for issues related to developing the Axis
> and Axis2 frameworks themselves.
>
> Anne
>
> On Nov 27, 2007 5:31 AM, Terry Zhou <zh...@gmail.com> wrote:
> > Hi, all
> >
> > Is there any configuration to prevent the empty namespace generatation
> of
> > array element for Axis1.4 when use basic type array with
> document/literal
> > style? For example,
> > The client soap request message is:
> >
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> >    <soapenv:Body>
> >       <ns:echoIntArrayResponse xmlns:ns=" http://quickstart.samples/xsd
> ">
> >          <ns:return>1</ns:return>
> >          <ns:return>2</ns:return>
> >          <ns:return>5</ns:return>
> >          <ns:return>8</ns:return>
> >          <ns:return>99</ns:return>
> >       </ns:echoIntArrayResponse>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> > and axis serve side response:
> >
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >    <soapenv:Body>
> >       <aReturn xmlns=" http://math.samples">
> >          <item xmlns="">1</item>
> >          <item xmlns="">2</item>
> >          <item xmlns="">5</item>
> >          <item xmlns="">8</item>
> >          <item xmlns="">99</item>
> >       </aReturn>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> > This won't interop with some web service client for the element <item>
> has a
> > empty namespace instead of the default one(" http://math.samples"). I
> have
> > also tested with Axis2-1.3, it responses OK with the following message:
> >
> > <soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/">
> >    <soapenv:Body>
> >       <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd">
> >           <ns:return>1</ns:return>
> >          <ns:return>2</ns:return>
> >          <ns:return>5</ns:return>
> >          <ns:return>8</ns:return>
> >          <ns:return>99</ns:return>
> >       </ns:echoIntArrayResponse>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> > So for Axis 1.4, is there any configuration to make the namespace of
> element
> > <item> right? Thanks a lot!
> >
> > Terry
> >
> >
> > FYI, WSDL file for the web service.
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions
> >  targetNamespace="http://math.samples/" xmlns:apachesoap="
> > http://xml.apache.org/xml-soap" xmlns:impl="http://math.samples/"
> > xmlns:intf="http://math.samples/" xmlns:tns1="
> > http://math.samples" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
> > "http://www.w3.org/2001/XMLSchema">
> > <!--WSDL created by Apache Axis version: 1.4
> > Built on Apr 22, 2006 (06:55:48 PDT)-->
> >
> >  <wsdl:types>
> >  <schema elementFormDefault="qualified"
> > targetNamespace="http://math.samples" xmlns=
> > "http://www.w3.org/2001/XMLSchema">
> >  <element name=
> > "a">
> >  <complexType>
> >  <sequence>
> >  <element maxOccurs
> > ="unbounded" minOccurs="0" name=
> > "item" type="xsd:int"/>
> >  </sequence>
> >
> >
> >  </complexType>
> >  </element>
> >  </schema>
> >  <schema
> >  elementFormDefault="qualified" targetNamespace="
> > http://math.samples/" xmlns="http://www.w3.org/2001/XMLSchema">
> >  <
> > element name="echoIntArrayReturn">
> >  <complexType>
> >  <
> > sequence>
> >  <element maxOccurs="unbounded"
> > minOccurs="0" name="item" type=
> > "xsd:int"/>
> >  </sequence>
> >
> >  </complexType>
> >  </
> > element>
> >  </schema>
> >  </wsdl:types>
> >
> >  <wsdl:message name=
> > "echoIntArrayResponse">
> >
> >  <wsdl:part element="impl:echoIntArrayReturn"
> > name="echoIntArrayReturn"/>
> >
> >  </wsdl:message>
> >
> >
> >  <wsdl:message name="echoIntArrayRequest">
> >
> >  <
> > wsdl:part element="tns1:a" name="a"
> > />
> >
> >  </wsdl:message>
> >
> >  <wsdl:portType name="Math"
> > >
> >
> >  <wsdl:operation name="echoIntArray" parameterOrder
> > ="a">
> >
> >  <wsdl:input message="impl:echoIntArrayRequest"
> > name="echoIntArrayRequest"/>
> >
> >  <
> > wsdl:output message="impl:echoIntArrayResponse"
> name="echoIntArrayResponse"
> > />
> >
> >  </wsdl:operation>
> >
> >  </wsdl:portType>
> >
> >  <wsdl:binding
> >  name="MathSoapBinding" type="impl:Math">
> >
> >
> >  <wsdlsoap:binding style="document" transport=
> > "http://schemas.xmlsoap.org/soap/http"/>
> >
> >  <wsdl:operation
> >  name="echoIntArray">
> >
> >  <wsdlsoap:operation soapAction=
> > ""/>
> >
> >  <wsdl:input name="echoIntArrayRequest"
> > >
> >
> >  <wsdlsoap:body use="literal"/>
> >
> >
> >  </wsdl:input>
> >
> >  <wsdl:output name="echoIntArrayResponse"
> > >
> >
> >  <wsdlsoap:body use="literal"/>
> >
> >
> >  </wsdl:output>
> >
> >  </wsdl:operation>
> >
> >  </wsdl:binding>
> >
> >  <
> > wsdl:service name="MathService">
> >
> >  <wsdl:port
> >  binding="impl:MathSoapBinding" name="Math">
> >
> >  <
> > wsdlsoap:address location="http://localhost:8080/axis/services/Math"
> > />
> >
> >  </wsdl:port>
> >
> >  </wsdl:service>
> >
> > </wsdl:definitions>
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Namespace problem of Array element.

Posted by Anne Thomas Manes <at...@gmail.com>.
Please send questions related to using Axis and Axis2 to the axis-user
list. The axis-dev list is for issues related to developing the Axis
and Axis2 frameworks themselves.

Anne

On Nov 27, 2007 5:31 AM, Terry Zhou <zh...@gmail.com> wrote:
> Hi, all
>
> Is there any configuration to prevent the empty namespace generatation of
> array element for Axis1.4 when use basic type array with document/literal
> style? For example,
> The client soap request message is:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:echoIntArrayResponse xmlns:ns=" http://quickstart.samples/xsd">
>          <ns:return>1</ns:return>
>          <ns:return>2</ns:return>
>          <ns:return>5</ns:return>
>          <ns:return>8</ns:return>
>          <ns:return>99</ns:return>
>       </ns:echoIntArrayResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
>
> and axis serve side response:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <soapenv:Body>
>       <aReturn xmlns=" http://math.samples">
>          <item xmlns="">1</item>
>          <item xmlns="">2</item>
>          <item xmlns="">5</item>
>          <item xmlns="">8</item>
>          <item xmlns="">99</item>
>       </aReturn>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> This won't interop with some web service client for the element <item> has a
> empty namespace instead of the default one(" http://math.samples"). I have
> also tested with Axis2-1.3, it responses OK with the following message:
>
> <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd">
>           <ns:return>1</ns:return>
>          <ns:return>2</ns:return>
>          <ns:return>5</ns:return>
>          <ns:return>8</ns:return>
>          <ns:return>99</ns:return>
>       </ns:echoIntArrayResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> So for Axis 1.4, is there any configuration to make the namespace of element
> <item> right? Thanks a lot!
>
> Terry
>
>
> FYI, WSDL file for the web service.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
>  targetNamespace="http://math.samples/" xmlns:apachesoap="
> http://xml.apache.org/xml-soap" xmlns:impl="http://math.samples/"
> xmlns:intf="http://math.samples/" xmlns:tns1="
> http://math.samples" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
> "http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.4
> Built on Apr 22, 2006 (06:55:48 PDT)-->
>
>  <wsdl:types>
>  <schema elementFormDefault="qualified"
> targetNamespace="http://math.samples" xmlns=
> "http://www.w3.org/2001/XMLSchema">
>  <element name=
> "a">
>  <complexType>
>  <sequence>
>  <element maxOccurs
> ="unbounded" minOccurs="0" name=
> "item" type="xsd:int"/>
>  </sequence>
>
>
>  </complexType>
>  </element>
>  </schema>
>  <schema
>  elementFormDefault="qualified" targetNamespace="
> http://math.samples/" xmlns="http://www.w3.org/2001/XMLSchema">
>  <
> element name="echoIntArrayReturn">
>  <complexType>
>  <
> sequence>
>  <element maxOccurs="unbounded"
> minOccurs="0" name="item" type=
> "xsd:int"/>
>  </sequence>
>
>  </complexType>
>  </
> element>
>  </schema>
>  </wsdl:types>
>
>  <wsdl:message name=
> "echoIntArrayResponse">
>
>  <wsdl:part element="impl:echoIntArrayReturn"
> name="echoIntArrayReturn"/>
>
>  </wsdl:message>
>
>
>  <wsdl:message name="echoIntArrayRequest">
>
>  <
> wsdl:part element="tns1:a" name="a"
> />
>
>  </wsdl:message>
>
>  <wsdl:portType name="Math"
> >
>
>  <wsdl:operation name="echoIntArray" parameterOrder
> ="a">
>
>  <wsdl:input message="impl:echoIntArrayRequest"
> name="echoIntArrayRequest"/>
>
>  <
> wsdl:output message="impl:echoIntArrayResponse" name="echoIntArrayResponse"
> />
>
>  </wsdl:operation>
>
>  </wsdl:portType>
>
>  <wsdl:binding
>  name="MathSoapBinding" type="impl:Math">
>
>
>  <wsdlsoap:binding style="document" transport=
> "http://schemas.xmlsoap.org/soap/http"/>
>
>  <wsdl:operation
>  name="echoIntArray">
>
>  <wsdlsoap:operation soapAction=
> ""/>
>
>  <wsdl:input name="echoIntArrayRequest"
> >
>
>  <wsdlsoap:body use="literal"/>
>
>
>  </wsdl:input>
>
>  <wsdl:output name="echoIntArrayResponse"
> >
>
>  <wsdlsoap:body use="literal"/>
>
>
>  </wsdl:output>
>
>  </wsdl:operation>
>
>  </wsdl:binding>
>
>  <
> wsdl:service name="MathService">
>
>  <wsdl:port
>  binding="impl:MathSoapBinding" name="Math">
>
>  <
> wsdlsoap:address location="http://localhost:8080/axis/services/Math"
> />
>
>  </wsdl:port>
>
>  </wsdl:service>
>
> </wsdl:definitions>
>
>
>
>

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