Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2005

Tip: Looking for answers? Try searching our database.

Axis / .net interop problem with array types - no solutions work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luch - 19 Dec 2005 02:13 GMT
I've seen many postings/solutions on this, but none have worked for me.

I have a Java method which returns an custom array type that I published
using Apache Axis 1.3. With a Java client, it is fine. But a C# 2005 client
errors out.  I was hoping someone can try it and let me know what is wrong
(or what is wrong with the WSDL)? The WSDL's are:

http://weblogs.trax.aero/WebModuleTraxInterface/services/AC_In_Out_Service_Maste
r_Service?wsdl

The queryRecords function - It returns an array type.

or
http://weblogs.trax.aero/WebModuleTraxInterface/services/Defect_Report_Service?wsdl
Also the queryRecords function... It returns a class which contains inside
an array type.

I've gotten other functions that return classes to work fine... it is only
when it returns an array of them that it fails, and it only fails on a .net
client.

This is the error:
System.InvalidOperationException was unhandled
 Message="There is an error in XML document (1, 365007)."
 Source="System.Xml"
 StackTrace:
      at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
      at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle)
      at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
      at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
      at
WindowsApplication1.aero.trax.weblogs2.AC_In_Out_Service_Master_ServiceService.queryRecords

-
Replace nospam with gmail for e-mail.
reez - 20 Dec 2005 14:06 GMT
Hi Luch,

I have encoutered errors like this before. What is happening is there
are some control characters in the XML response that is causing it to
get "confused" which makes no sense (took me three days to figure this
out). Marking your instance vars as CDATA will not help.

In my situation, the application that i was pulling data from made a
call to a dll to get a username. However this was assigned to a
CharArray. When the username was smaller than the length of the
CharArray it padded it with control characters e.g. line feeds,
carriage returns, not sure what it was really. So what i did was i
manually updated the data and edited the code to trim the extra
characters off.

While this might not be your case, you might want to start look at
this...basically your XML output is in error and it's a data problem.
Marking the fields as CDATA is not going to help.

you might want to consider getting web service studio. While you cannot
see everything it is a useful testing tool.

Take care and good luck.
Reeza

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.