473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

soap and c#, problem with generated code

I generated a class file by using wsdl.exe and a wsdl-file.
Now one of the top elements in the result xml is optional which gives me some problems. In the generated code I have this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://abc/xyz", ResponseNamespace="http://abc/xyz")]
  3. [return: System.Xml.Serialization.SoapElementAttribute("wmInternalErrorMsg")]
  4. public string wsInnehavFond(__innehavFondInput[] innehavFondInput, out string Status, out string KundID, out __innehavFondOutput[] innehavFondOutput) {
  5. object[] results = this.Invoke("wsInnehavFond", new object[] {
  6. innehavFondInput}); 
  7. Status = ((string)(results[1]));
  8. KundID = ((string)(results[2]));
  9. innehavFondOutput = ((__innehavFondOutput[])(results[3]));
  10. return ((string)(results[0]));
  11. }
  12.  
if the "innehavFondOutput" element is missing then this method fails (exception: "Cannot assign object of type System.String to an object of type __innehavFondOutput[]."}
If the element is there, however, this works like a charm.

Any idea what I should do??
Aug 10 '06 #1
0 1016

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Leonid | last post by:
Hello, Please help me to resolve next problem: I have Web service installed on the network and I can communicate with it via WSDL file from several applications including VC++6 application...
7
by: Brian P | last post by:
I am working on a new program that uses a SOAP interface. I have written a few of these before, but this time it is giving me trouble. I suspect there is a problem with on the SOAP handler side,...
4
by: Jit Prasad | last post by:
I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front end writen in VB.NET. The proxy class submits a soap request and gets a soap response. When I migrated the front-end...
0
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.