Bug 13426 - Specifying Data Contract namespace not working
Summary: Specifying Data Contract namespace not working
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-07-23 22:09 UTC by Shane van Wyk
Modified: 2013-07-23 22:09 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Shane van Wyk 2013-07-23 22:09:17 UTC
Part or System.Runtime.Serialization.

Small Problem, When I run my ServiceStack API application on my windows machine the namespaces appear correctly as i state them to be. But when i run the service on a Linux machine off mod_mono. Then those namespaces gets overridden by something else. Please see my code below:

DTO

namespace API_ESERVICES_NOTIFICATION
{
[DataContract(Namespace = "urn:com.example:service:20130308")]
public class GetAccountNotification
{
    [DataMember]
    public GetAccountResponseTO getAccountResponse {
        get;
        set;
    }
}
}

Windows Generated SOAP11 xml

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <GetAccountNotification xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:com.example:service:20130308">
          <getAccountResponse xmlns:d2p1="urn:com.example:service:entity:20130308">

Linux Mod_Mono

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <GetAccountNotification xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_ESERVICES_NOTIFICATION">
          <getAccountResponse xmlns:d2p1="http://schemas.datacontract.org/2004/07/API_ESERVICES_NOTIFICATION.Model">


In the DTO you can see I specified the namespace. In windows it works and it Lunux it doesn't. It is supposed to be 
urn:com.example:service:entity:20130308 and urn:com.example:service:20130308, and not http://schemas.datacontract.org/2004/07/API_ESERVICES_NOTIFICATION.Model.

I posted a question on stack overflow and have been told it is a bug in the mono framework. On windows I'm using MonoDevelop 4.0 (Xamarin Studio) and it runs of xsp4 or IIS standard 4.0. So not sure if i'm actually using mod_mono on windows machine. 

Link to StackOverdflow Question: http://stackoverflow.com/questions/17542802/servicestack-namespace-change-not-working

Note You need to log in before you can comment on or make changes to this bug.