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 7940525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:24:54+00:00 2026-06-03T23:24:54+00:00

I’m attempting to consume a SOAP service in a Silverlight 5 application and I’m

  • 0

I’m attempting to consume a SOAP service in a Silverlight 5 application and I’m completely lost. This is my first Silverlight app and only my second time using web services in a .NET application.

In a separate .NET application, the only way I was able to get it to work was by adding the WSDL as a Web Reference; the application would not build when I added it as a Service Reference. In talking to the WSDL provider, I discovered that the WSDL was compiled using the .NET 2.0 framework…hence the need to add it as a Web Reference.

From the research I’ve done thus far, I see that Silverlight doesn’t support adding a Web Reference. So I tried adding it to the hosting ASP.NET application as a Web Reference then started the server.

Back in my Silverlight app, I selected the option to add a Service Reference and pointed to the WSDL file now at http://localhost:55265/Web%20References/THINKWebService/SLWebSvc_734_Upgrade.wsdl. Visual Studio seemed to pick it up just fine and generate the proxies.

Here’s where I start to get stuck. If my research is correct, a WCF reference was created and should be used in that manner. I’ve never used WCF so I did some reading on how to send/receive requests and this is the best code I’ve come up with, based on examples in the MSDN library (I inserted it into a button click event so I would know exactly when the code was executing):

private void Button1Click(object sender, RoutedEventArgs e)
{
  var client = new ThinkSoapClient();
  var userLoginData = new user_login_data {login = "foo", password = "bar"};
  var customerIdentifier = new customer_identifier {customer_id = 6677070};
  // the debugger halts on this next line and
  // references the "dsn"...it's the 4th argument
  client.CustomerLoginInfoSelectAsync(userLoginData, customerIdentifier, "", "myDSN");
  // I'm not sure if this next line is even needed
  client.CustomerLoginInfoSelectCompleted += CustomerLoginInfoSelectCallback;
  MessageBox.Show(string.Format("CustomerLoginInfoSelectAsync({0},{1})", userLoginData, customerIdentifier));
}

// here's the callback method
static void CustomerLoginInfoSelectCallback(object sender, CustomerLoginInfoSelectCompletedEventArgs e)
{
  MessageBox.Show(string.Format("CustomerLoginInfoSelect Result: {0}", e.Result));
}

As I mentioned in the code above, the debugger halts when executing the client.CustomerLoginInfoSelectAsync method. Here’s the error message: XmlSerializer attribute System.Xml.Serialization.XmlAttributeAttribute is not valid in dsn. Only XmlElement, XmlArray, XmlArrayItem and XmlAnyElement attributes are supported when IsWrapped is true.

From the research I’ve done, I think this error is being caused because the the SOAP action element contains an attribute dsn (not sure, though, if I would be getting this error if the sub-elements also had attributes).

I did a find/replace for IsWrapped=true to IsWrapped=false in Reference.cs but I got the same error but the last word was false instead of true.

I’m not sure if I’m making any sense as to what I’m after, so here’s what the generated XML should look like in case it helps:

...
  <customer_login_info_select_request dsn="myDSN">
    <user_login_data>
      <login>foo</login>
      <password>bar</password>
    </user_login_data>
    <customer_identifier>
      <customer_id>6677070</customer_id>
    </customer_identifier>
    <login/> <!--corresponds to the empty string in the call to CustomerLoginInfoSelectAsync-->
  </customer_login_info_select_request>
...

So at this point, I’m completely lost. Any insights would be greatly appreciated. If there’s any other info I can provide, please let me know.

  • 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-06-03T23:24:56+00:00Added an answer on June 3, 2026 at 11:24 pm

    While possible the normal solution would be to assume it is “just another data source” and use the Web reference on your Server side instead to provide data (and to provide insulation against future changes).

    Silverlight App <=> Silverlight Web Services <= External/Legacy Web Service
    

    Keep your Silverlight app slim and let the server do any heavy lifting for you.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I want to show the soap response to UIWebview.. my soap response is, <p><img

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.