Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7248767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:11:02+00:00 2026-05-28T22:11:02+00:00

My web service takes string [][] as a parameter, but when I call webservice

  • 0

My web service takes string [][] as a parameter, but when I call webservice method it gives error:

cannot convert from ‘string[][]’ to ‘ServiceReference1.ArrayOfString[]

//strItems1 is the array
string [][] strItems1 = new string[m_Inputs][];
for (int i =0; i < m_Inputs; i++)
    strItems1[i] = new string[2];

for (int i =0; i < m_Inputs; i++)
{
    strItems1[i][0] = "test";
    strItems1[i][1] = "test 1";
}
oS.CostFromStringArray(strItems1, oDB.EscapeString(STZ.Text), Total); //web service method on which i am getting error

It’s just a string table that is always going to be string[n][2], i also tried using multi-dimensional arrays but wsdl gave error that use jagged arrays instead.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:11:03+00:00Added an answer on May 28, 2026 at 10:11 pm

    Web Service type was of data type array, used a list<> and before passing it in to web service method do a list<>.ToArray() for soap to be able to serialize it.
    You can also change the web service data type. Right Click on service refrence > Configure Service > Data Type Fields

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Web Service(.ASMX) code that takes a String Array as a parameter
My code calls a Web service method which takes a few minutes to perform
I am consuming a webservice and one of the methods takes a String parameter.
I'm trying to regex-out a hash given in a string from a web-service response.
I have a web service in ASP.NET a simple one but the web method
I have a webservice with a method that takes a parameter of abstract base
Imagine a web service with a method that returns a Customer object, that takes
I have a web service which takes a DateTime as a parameter. If a
I'd like to return a list through a web service that takes a string
I have a web service that takes a byte[] and saves it. This works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.