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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:38:31+00:00 2026-05-27T22:38:31+00:00

I’m trying to call a WCF Service from XCODE that has an Object as

  • 0

I’m trying to call a WCF Service from XCODE that has an Object as parameter instead of string or long. I’m always using a couple of services wish have simple Parameter like string or long and they work perfectly. But when I using the Object as Parameter I can get to the C# Service on my Windows Box but the Parameter is always a new C# object with no values in it.
The Object I’am using looks like this one:

[DataContract]
public class MobileComplaint
{
    [DataMember]
    public long MobileComplaintID { get; set; }
    [DataMember]
    public string CaseNo { get; set; }
    [DataMember]
    public DateTime CreationDate { get; set; }
    [DataMember]
    public string CreationUser { get; set; }
    [DataMember]
    public string DaysSinceLastChange { get; set; }
    [DataMember]
    public string State { get; set; }
}

The Function looks like this one:

[OperationContract]
MobileComplaint Save(long UserID, MobileComplaint mc);

For the normal Functions I use Messages that looks like this one:

     <?xml version="1.0" encoding="UTF-8"?>
 <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
 <SOAP-ENV:Body> 
 <OpenComplaint xmlns="http://tempuri.org/"> 
 <MobileComplaintID>3</MobileComplaintID> 
 </OpenComplaint> 
 </SOAP-ENV:Body> 
 </SOAP-ENV:Envelope>

The Question is now how do I have to write Parameter for this Message!

Second Question is it necessary to add all parameter for the object or is it ok when I just fill those I need.

THX for help

I always tried the following two:

<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
<SOAP-ENV:Body> 
<Save xmlns="http://tempuri.org/"> 
 <UserID>229001</UserID> 
<mc xmlns:a="http://schemas.datacontract.org/2004/07/Ibs.MobileDefectDetection.Vo" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
<a:MobileComplaintID>29292</MobileComplaintID> 
</mc> 
</Save> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>



<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
<SOAP-ENV:Body> 
<Save xmlns="http://tempuri.org/"> 
 <UserID>229001</UserID> 
<mc> 
<MobileComplaintID>29292</MobileComplaintID> 
</mc> 
</Save> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

OK I had I typo in it:

29292

29292
I missed the “a:”

Now he fills in some of the Properties in the Object but not all!

Does anyone has Idea how this can happen?

  • 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-27T22:38:32+00:00Added an answer on May 27, 2026 at 10:38 pm

    I found it out my self! When you are in a pure .NET Environment the order of the Properties is regardless. But when you go from Xcode to C# the order must be correct. I added now the Order Property to all my DataMember Attributes in the DataContract and followed that order in xcode

    [DataMember(Order=1)]
    

    Michael

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
i got an object with contents of html markup in it, for example: string

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.