|
 |
aspx thread: Re: Using webservice made in Sun's Java Web Service Developer Pack v.
1.0. in .NET
Message #1 by "Christian Engberg" <engbergchristian@h...> on Tue, 14 Jan 2003 14:53:39
|
|
> This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C21C59.22C247E0
Content-Type: text/plain;
charset="iso-8859-1"
We recently had to switch to a new content provider using these and we've
run into a bit of a problem with their webservice. Maybe this will make
sense to some of you ? I hope some of you can provide some hints, if you
need more info feel free to mail me. All I did was add the webservice as a
web reference and excute the lookupsubscribers method.
Object cannot be stored in an array of this type.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Object cannot be stored in
an array of this type.
Source Error:
Line 37: [return:
System.Xml.Serialization.SoapElementAttribute("result")]
Line 38: public SubscriberResult lookupSubscribers(Question
Question_1) {
Line 39: object[] results = this.Invoke("lookupSubscribers",
new
object[] {
Line 40: Question_1});
Line 41: return ((SubscriberResult)(results[0]));
Source File: c:\inetpub\wwwroot\oplysningen.jubii.dk\web
references\navnebogen\reference.cs Line: 39
Stack Trace:
[InvalidCastException: Object cannot be stored in an array of this type.]
System.Array.InternalSetValue(Object value, Int32 index1, Int32 index2,
Int32 index3) +0
System.Array.SetValue(Object value, Int32 index)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencedElements
()
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read
7_
lookupSubscribersResponse()
[InvalidOperationException: There is an error in XML document (2, 2752).]
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse
(SoapClient
Message message, WebResponse response, Stream responseStream)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
oplysningen.jubii.dk.Navnebogen.Navnebogen.lookupSubscribers(Question
Question_1) in c:\inetpub\wwwroot\oplysningen.jubii.dk\web
references\navnebogen\reference.cs:39
oplysningen.jubii.dk.result.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\oplysningen.jubii.dk\result.aspx.cs:98
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
_____
Version Information: Microsoft .NET Framework Version:1.0.3705.209;
ASP.NET
Version:1.0.3705.0
Message #2 by "Christian Engberg" <engbergchristian@h...> on Tue, 14 Jan 2003 14:56:25
|
|
Hi.
We've run into the same problem as described below. Did you ever find the
solution?
Sincerely
/CE
> This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C21C59.22C247E0
Content-Type: text/plain;
charset="iso-8859-1"
We recently had to switch to a new content provider using these and we've
run into a bit of a problem with their webservice. Maybe this will make
sense to some of you ? I hope some of you can provide some hints, if you
need more info feel free to mail me. All I did was add the webservice as a
web reference and excute the lookupsubscribers method.
Object cannot be stored in an array of this type.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Object cannot be stored in
an array of this type.
Source Error:
Line 37: [return:
System.Xml.Serialization.SoapElementAttribute("result")]
Line 38: public SubscriberResult lookupSubscribers(Question
Question_1) {
Line 39: object[] results = this.Invoke("lookupSubscribers",
new
object[] {
Line 40: Question_1});
Line 41: return ((SubscriberResult)(results[0]));
Source File: c:\inetpub\wwwroot\oplysningen.jubii.dk\web
references\navnebogen\reference.cs Line: 39
Stack Trace:
[InvalidCastException: Object cannot be stored in an array of this type.]
System.Array.InternalSetValue(Object value, Int32 index1, Int32 index2,
Int32 index3) +0
System.Array.SetValue(Object value, Int32 index)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadArray()
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement
(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
System.Xml.Serialization.XmlSerializationReader.ReadReferencedElements
()
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read
7_
lookupSubscribersResponse()
[InvalidOperationException: There is an error in XML document (2, 2752).]
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse
(SoapClient
Message message, WebResponse response, Stream responseStream)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
oplysningen.jubii.dk.Navnebogen.Navnebogen.lookupSubscribers(Question
Question_1) in c:\inetpub\wwwroot\oplysningen.jubii.dk\web
references\navnebogen\reference.cs:39
oplysningen.jubii.dk.result.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\oplysningen.jubii.dk\result.aspx.cs:98
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
_____
Version Information: Microsoft .NET Framework Version:1.0.3705.209;
ASP.NET
Version:1.0.3705.0
|
|
 |