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 Kiran Kumar <kk...@objectwave.com> on 2006/03/08 16:39:07 UTC

Re: in Arrays -

Hi,

As per the definition of type'ArrayHB24ILISTA1' is not 'Array'.. You have to define array of your complex type (ArrayHB24ILISTA1).. It would be something like this :

	<xsd:complexType name="LISTA1Type">
		<xsd:sequence>
			<xsd:element name="item" type="transactionHB24:ArrayHB24ILISTA1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

       <xsd:element name="LISTA1" type="LISTA1Type" />


Name of the your complex type (ArrayHB24ILISTA1) is confusing..Its not an array.. its just a complex type.

Kiran


-----Original Message-----
From: Pedro Alves [mailto:pedro@neraka.no-ip.org]
Sent: Wed 3/8/2006 9:13 AM
To: axis-user@ws.apache.org
Subject: [SPAM-HDR] - Re: <item> in Arrays - Email has different SMTP TO: and MIME TO: fields in the email addresses
 
On Wed, Mar 08, 2006 at 09:23:25AM -0500, Anne Thomas Manes wrote:
> What is the type definition for transactionHB24:ArrayHB24ILISTA1?
> 
> Anne

Here is the definition:

      <complexType name="ArrayHB24ILISTA1">
        <sequence>
          <element name="ACCAO" nillable="true" type="string" />
          <element name="CTCANAL_L" nillable="true" type="string" />
          <element name="CKNUMCTA" nillable="true" type="string" />
          <element name="MAXMOV" nillable="true" type="string" />
          <element name="ZORDEM3_L" nillable="true" type="string" />
          <element name="CKBALCAO" nillable="true" type="string" />
          <element name="DESCR1" nillable="true" type="string" />
          <element name="IVISIVEL" nillable="true" type="string" />
          <element name="CPRODMISL" nillable="true" type="string" />
        </sequence>
      </complexType>


As far as I know, axis is doing the right thing - I use it on the client
side. The server is a weblogic 6.1 server.

On another webservice, the response from the server is: (ArrayHB24ILISTA1
is similar to the one I wrote above)

          <LISTA1 xmlns:bean="java:com.altitude.tp.transactions.transactionOP58" xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bean:ArrayOP58OLISTA1[18]">
            <item xmlns:bean="java:com.altitude.tp.transactions.transactionOP58" xsi:type="bean:ArrayOP58OLISTA1">
              <GDESMOV xsi:type="xsd:string">Imp Selo TRF-190</GDESMOV>
              <ZCHQ xsi:type="xsd:string">0</ZCHQ>
              <DEBITO1 xsi:type="xsd:string">0.00</DEBITO1>
            </item>
          </LISTA1>

Axis can handle this response ok, so thats why I hope to have some kind of
engine option to allow me form a request like this.


Thanks for the help!


> 
> On 3/8/06, Pedro Alves <pedro@neraka.no-ip.org > wrote:
> 
> 
> 
>     Hi.
> 
>     I have a wsdl that has this element in the request:
> 
>     <element name="LISTA1" nillable="true"
>     type="transactionHB24:ArrayHB24ILISTA1" maxOccurs="unbounded" />
> 
> 
>     When I invoke the ws, the soap has the form:
> 
>     <...>
>         <LISTA1>...</LISTA1>
>         <LISTA1>...</LISTA1>
>         <LISTA1>...</LISTA1>
>         <LISTA1>...</LISTA1>
>     <...>
> 
>     But the other side throws an exception. I think the other side is expecting
> 
>     <...>
>         <LISTA1>
>             <item>...</item>
>             <item>...</item>
>         </LISTA1>
>     <...>
> 
>     I know that axis can handle this kind of semantics because It can parse
>     correctly when the other side returns a response like this (on other
>     webservice).
> 
>     How can I force the request to have this form?
> 
> 
>     Thanks
> 
> 
>     --
>     Pedro Alves
> 
> 

-- 
Pedro Alves
pedro.alves@zmail.pt


------------------------------------------------

This e-mail, and any attachments thereto, is confidential and is intended only for the individual(s) named.  If you are not the intended recipient, please let us know by e-mail reply and delete it from your system; do not copy/save this e-mail or disclose its contents to anyone.  E-mail transmissions cannot be guaranteed to be secure or error-free as the transmission could be interrupted, corrupted, lost, destroyed, altered, arrive late or contain viruses.  ObjectWave does not accept liability for any errors or omissions in the contents of this e-mail which arise as a result of e-mail transmission.  The views expressed in this e-mail do not necessarily reflect those of ObjectWave or its affiliates.

------------------------------------------------



Re: in Arrays

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Wed, Mar 08, 2006 at 09:39:07AM -0600, Kiran Kumar wrote:
> Hi,
> 
> As per the definition of type'ArrayHB24ILISTA1' is not 'Array'.. You have to define array of your complex type (ArrayHB24ILISTA1).. It would be something like this :
> 
> 	<xsd:complexType name="LISTA1Type">
> 		<xsd:sequence>
> 			<xsd:element name="item" type="transactionHB24:ArrayHB24ILISTA1" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 
>        <xsd:element name="LISTA1" type="LISTA1Type" />
> 
> 
> Name of the your complex type (ArrayHB24ILISTA1) is confusing..Its not an array.. its just a complex type.
> 
> Kiran
> 


But what puzzles me is that this output

 
           <LISTA1 xmlns:bean="java:com.altitude.tp.transactions.transactionOP58" xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bean:ArrayOP58OLISTA1[18]">
             <item xmlns:bean="java:com.altitude.tp.transactions.transactionOP58" xsi:type="bean:ArrayOP58OLISTA1">
               <GDESMOV xsi:type="xsd:string">Imp Selo TRF-190</GDESMOV>
               <ZCHQ xsi:type="xsd:string">0</ZCHQ>
               <DEBITO1 xsi:type="xsd:string">0.00</DEBITO1>
             </item>
           </LISTA1>
 

is generated after this wsdl:

      <complexType name="ResultBeanOP58">
        <sequence>
          <element name="CEMPRESA" nillable="true" type="string" />
          <element name="LISTA1" nillable="true" type="transactionOP58:ArrayOP58OLISTA1" maxOccurs="unbounded" />
          <element name="ZINDEURO" nillable="true" type="string" />
        </sequence>
      </complexType>
      <complexType name="ArrayOP58OLISTA1">
        <sequence>
          <element name="CREDITO" nillable="true" type="string" />
          <element name="DDIAOP" nillable="true" type="string" />
          <element name="DEBITO1" nillable="true" type="string" />
        </sequence>


I really cannot tell any differences


Pedro


> > On 3/8/06, Pedro Alves <pedro@neraka.no-ip.org > wrote:
> > 
> > 
> > 
> >     Hi.
> > 
> >     I have a wsdl that has this element in the request:
> > 
> >     <element name="LISTA1" nillable="true"
> >     type="transactionHB24:ArrayHB24ILISTA1" maxOccurs="unbounded" />
> > 
> > 
> >     When I invoke the ws, the soap has the form:
> > 
> >     <...>
> >         <LISTA1>...</LISTA1>
> >         <LISTA1>...</LISTA1>
> >         <LISTA1>...</LISTA1>
> >         <LISTA1>...</LISTA1>
> >     <...>
> > 
> >     But the other side throws an exception. I think the other side is expecting
> > 
> >     <...>
> >         <LISTA1>
> >             <item>...</item>
> >             <item>...</item>
> >         </LISTA1>
> >     <...>
> > 
> >     I know that axis can handle this kind of semantics because It can parse
> >     correctly when the other side returns a response like this (on other
> >     webservice).
> > 
> >     How can I force the request to have this form?
> > 
> > 
> >     Thanks
> > 
> > 
> >     --
> >     Pedro Alves
> > 
> > 
> 
> -- 
> Pedro Alves
> pedro.alves@zmail.pt
> 
> 
> ------------------------------------------------
> 
> This e-mail, and any attachments thereto, is confidential and is intended only for the individual(s) named.  If you are not the intended recipient, please let us know by e-mail reply and delete it from your system; do not copy/save this e-mail or disclose its contents to anyone.  E-mail transmissions cannot be guaranteed to be secure or error-free as the transmission could be interrupted, corrupted, lost, destroyed, altered, arrive late or contain viruses.  ObjectWave does not accept liability for any errors or omissions in the contents of this e-mail which arise as a result of e-mail transmission.  The views expressed in this e-mail do not necessarily reflect those of ObjectWave or its affiliates.
> 
> ------------------------------------------------
> 
> 



-- 
Pedro Alves
pedro.alves@zmail.pt

Re: in Arrays -

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Wed, Mar 08, 2006 at 09:39:07AM -0600, Kiran Kumar wrote:
> Hi,
> 
> As per the definition of type'ArrayHB24ILISTA1' is not 'Array'.. You have to define array of your complex type (ArrayHB24ILISTA1).. It would be something like this :
> 
> 	<xsd:complexType name="LISTA1Type">
> 		<xsd:sequence>
> 			<xsd:element name="item" type="transactionHB24:ArrayHB24ILISTA1" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 
>        <xsd:element name="LISTA1" type="LISTA1Type" />
> 
> 
> Name of the your complex type (ArrayHB24ILISTA1) is confusing..Its not an array.. its just a complex type.
> 

Reopening this subject:

I followed your suggestion. My wsdl now reads:

      <complexType name="ArrayHB24ILISTA1Stub">
        <sequence>
          <element name="item" nillable="true" maxOccurs="unbounded" type="transactionHB24:ArrayHB24ILISTA1" />
        </sequence>
      </complexType>
      <complexType name="RequestBeanHB24">
        <sequence>
          <element name="cancelTrxId" nillable="true" type="string" />
          <element name="LISTA1" nillable="true" type="transactionHB24:ArrayHB24ILISTA1Stub" />
        </sequence>
      </complexType>

But the output is still:

      <arg0 xmlns:ns2="java:com.altitude.tp.transactions.transactionHB24" xsi:type="ns2:RequestBeanHB24">
        <cancelTrxId xsi:type="xsd:string" xsi:nil="true"/>
        <LISTA1 xsi:type="ns2:ArrayHB24ILISTA1">
          <ACCAO xsi:type="xsd:string" xsi:nil="true"/>
          <CTCANAL_L xsi:type="xsd:string" xsi:nil="true"/>
        </LISTA1>
        <LISTA1 xsi:type="ns2:ArrayHB24ILISTA1">
          <ACCAO xsi:type="xsd:string" xsi:nil="true"/>
          <CTCANAL_L xsi:type="xsd:string" xsi:nil="true"/>
        </LISTA1>
        <codAmbiente xsi:type="xsd:string" xsi:nil="true"/>
        <autorizacoes xsi:type="xsd:string" xsi:nil="true"/>
      </arg0>


The other side (a desperately outdated weblogic...) requires a form like:

      <arg0 xmlns:ns2="java:com.altitude.tp.transactions.transactionHB24" xsi:type="ns2:RequestBeanHB24">
        <cancelTrxId xsi:type="xsd:string" xsi:nil="true"/>
        <LISTA1 xsi:type="ns2:ArrayHB24ILISTA1[2]">
            <item xsi:type="ns2:ArrayHB24ILISTA1">
              <ACCAO xsi:type="xsd:string" xsi:nil="true"/>
              <CTCANAL_L xsi:type="xsd:string" xsi:nil="true"/>
            </item>
            <item xsi:type="ns2:ArrayHB24ILISTA1">
              <ACCAO xsi:type="xsd:string" xsi:nil="true"/>
              <CTCANAL_L xsi:type="xsd:string" xsi:nil="true"/>
            </item>
        </LISTA1>
        <codAmbiente xsi:type="xsd:string" xsi:nil="true"/>
        <autorizacoes xsi:type="xsd:string" xsi:nil="true"/>
      </arg0>


How can I force axis to send the request in this form? (even if I have to
change the wsdl).

Thanks

-- 
Pedro Alves
pedro.alves@zmail.pt