473,387 Members | 1,619 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,387 software developers and data experts.

SOAP Web service HELP

Hi,

can someone help me on following issues:-

i have a WebReference1 in my C# NET projects, and after i refererence, i can simply DOT OUT a function and pass in parameter. However I facing some problem. let see below:

the function in my webreference CS file is like below:
public Result function1(
string loginname,
string serviceid,
string myurl,
[System.Xml.Serialization.XmlArrayItemAttribute("co ntent")] Content[] contents) { object[] results = this.Invoke("function1", new object[] {
loginname,
serviceid,
url,
contents});
return ((Result)(results[0]));


THEN, in my NET project, i can webreference it and use the function

it is function1(stiring loginname, string serviceid, string myurl, webreference.Content[ ] contents)

my question is how i pass in value for webreference.Content[ ] contents???

can someone help me?

this is my current code how to use it

string loginname= "john";
string serviceid = "service";
string myurl = "url";
WebReference.Content mycontent = new Webreference.Content();

mycontent.member1="xxx";
mycontent.member2="xxx";

then i dot the function

webreference.function1(loginname,serviceid,myurl,m ycontent)

error -> it said Cannot convert from my project 'mycontent' to webreference.Content[ ] contents.

error in last param i passed.

please help
Nov 12 '08 #1
1 956
Plater
7,872 Expert 4TB
mycontent is a single instance of that class, the function wants you to pass in an array

Try this:
webreference.function1(loginname,serviceid,myurl, new webreference.Content[ ]{mycontent})
Nov 12 '08 #2

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

Similar topics

0
by: Cleo | last post by:
Hi, I am trying to call a WebService Method written in Weblogic from VB.NET and I am getting the following error. I am using SOAP Caal s from VB.NET. Please find the wsdl file and my code. ...
4
by: Jonathan [sbrodolo] | last post by:
Hi there, I am using a LOTUS/DOMINO Web Service in my ASP.Net application and I am having quite a lot of problems. I have managed to solve most of them but this one it really is giving me terrible...
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...
31
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our...
31
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.