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 Kuldeep Malhotra <Ku...@becta.org.uk> on 2005/10/26 12:28:20 UTC

.net java InvalidCastException

Hi i am using apache axis to write web services but when .net calls my
service it gives the following error.

System.InvalidCastException: Cannot assign object of type
SystemWebService.d31504.organisationdetails to an object of type
SystemWebService.d31504.organisationdetails[].

 

here is the part of my wsdl

 

 

   <complexType name="OrganisationList">

     <sequence>

                        <element name="id" nillable="true"
type="xsd:string"/>     

                        <!--<element name="arrayorganisationDetails"
minOccurs="0" maxOccurs="1" nillable="true"
type="tns1:arroyorganisationdetails" />  -->

                        <element name="arrayorganisationDetails"
nillable="true" minOccurs="0" maxOccurs="1"
type="tns1:ArrayOfString1"/>      

                        

     </sequence>

   </complexType>

 

            <complexType name="ArrayOfString1">

            <sequence>

            <element minOccurs="0" maxOccurs="unbounded"
name="orgstring"  nillable="true" type="becta:organisationdetails" />

            </sequence>

            </complexType>

 

i am not sure is this the right place to ask my question , any one help.


Re: .net java InvalidCastException

Posted by Anne Thomas Manes <at...@gmail.com>.
We need more information ...
Either provide the entire WSDL, or provide all pertinent parts that apply to
the operation (all types and messages plus the portType and binding)

Anne

On 10/26/05, Kuldeep Malhotra <Ku...@becta.org.uk> wrote:
>
>  Hi i am using apache axis to write web services but when .net calls my
> service it gives the following error.
>
> System.InvalidCastException: Cannot assign object of type
> SystemWebService.d31504.organisationdetails to an object of type
> SystemWebService.d31504.organisationdetails[].
>
>  here is the part of my wsdl
>
>   <complexType name="OrganisationList">
>
> <sequence>
>
> <element name="id" nillable="true" type="xsd:string"/>
>
> <!--<element name="arrayorganisationDetails" minOccurs="0" maxOccurs="1"
> nillable="true" type="tns1:arroyorganisationdetails" /> -->
>
> <element name="arrayorganisationDetails" nillable="true" minOccurs="0"
> maxOccurs="1" type="tns1:ArrayOfString1"/>
>
>  </sequence>
>
> </complexType>
>
>  <complexType name="ArrayOfString1">
>
> <sequence>
>
> <element minOccurs="0" maxOccurs="unbounded" name="orgstring"
> nillable="true" type="becta:organisationdetails" />
>
> </sequence>
>
> </complexType>
>
>  i am not sure is this the right place to ask my question , any one help.
>