axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kordes, Paul" <>
Subject RE: .Net unbounded element deserialization error
Date Thu, 05 Jun 2003 15:18:27 GMT
That is definitely a possibility for the future.  Unfortunately, this is for
a release product that currently only supports RPC/encoded.  I know this is
a simple fix.  I just can't put my finger on it...

-----Original Message-----
From: Armstrong, Jason []
Sent: Thursday, June 05, 2003 11:12 AM
To: ''
Subject: RE: .Net unbounded element deserialization error


I seem to remember having all kinds of problems with arrays when using
RPC/encoded services with .NET (unfortunately I don't remember all the
details, I think I'm mentally blocking out those bad experiences).  If you
switch over to using document/literal all you need to do is the following...

<xsd:element name="FooList" type="Foo" maxOccurs="unbounded"/>
<xsd:complexType name="Foo">
	<xsd:attribute name="fooStuff" type="xsd:string" use="required"/>
	<xsd:attribute name="moreFooStuff" type="xsd:string"
	<xsd:attribute name="anotherPieceOfFoo" type="xsd:string"

I'll look to see if I have any notes on the RPC/encoded issues we ran into.

Jason S. Armstrong
Applications Manager | Management Science Associates, Inc.

-----Original Message-----
From: Kordes, Paul []
Sent: Thursday, June 05, 2003 10:21 AM
To: ''
Subject: .Net unbounded element deserialization error
Importance: High

Help anyone ...

I'm testing interoperability of my webservice with a .NET Client (Visual
Basic).  I have deployed my webservice such that we have our own custom
wsdl.  Basically we wrap the entire input and output in one javebean object
each.  In this case, there is no input, and the output contains an array.
Rather than use a soaparray, we have simply designated a single element of
the output object with a maxoccurs=unbounded.  That single element is a
complex type that has 3 elements itself.  This works fine in the java world,
however, when I use the .NET client, I get the following error ...

Unhandled Exception: System.InvalidOperationException: There is an error in
XML document (10, 15). ---> System.InvalidCastException: Cannot assign
object of type testWSAccept.useengc0007065.Struct1 to an object of type

I don't understand why it is hitting this error.  Below is the wsdl.  It
does contain one artifical wsdl:type, namely Struct1Array that is defined
but not used anywhere.  This is leftover from when we were using SoapArrays
earlier.  Any help would be VERY appreciated.  I'm absolutely stuck.

Paul Kordes

<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="urn:vignette"
xmlns:apachesoap="" xmlns:impl="urn:vignette"
  <schema targetNamespace="urn:vignette"
   <import namespace=""/>
   <complexType name="Struct1">
     <element name="Param1" type="xsd:string"/>
     <element name="Param2" type="xsd:string"/>
     <element name="Param3" type="xsd:string"/>
   <complexType name="testTableResponse">
     <element maxOccurs="unbounded" name="Output1" type="impl:Struct1"/>
   <complexType name="Struct1Array">
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Struct1[]"/>
 <wsdl:message name="testTableRequest"/>
 <wsdl:message name="testTableResponse">
  <wsdl:part name="outputs" type="intf:testTableResponse"/>
 <wsdl:portType name="accept">
  <wsdl:operation name="testTable">
   <wsdl:input message="intf:testTableRequest" name="testTableRequest"/>
   <wsdl:output message="intf:testTableResponse" name="testTableResponse"/>
 <wsdl:binding name="acceptSoapBinding" type="intf:accept">
  <wsdlsoap:binding style="rpc"
  <wsdl:operation name="testTable">
   <wsdlsoap:operation soapAction=""/>
   <wsdl:input name="testTableRequest">
    <wsdlsoap:body encodingStyle=""
namespace="urn:vignette" use="encoded"/>
   <wsdl:output name="testTableResponse">
    <wsdlsoap:body encodingStyle=""
namespace="urn:vignette" use="encoded"/>
 <wsdl:service name="accept">
  <wsdl:port binding="intf:acceptSoapBinding" name="accept">

View raw message