Discussion:
[Mono-list] WCF Exception
James Darbyshire
2011-06-12 12:09:23 UTC
Permalink
Hi all,

I am getting the following exception when I try to consume a WCF service
hosted in mono 2.10.2
Addressing Version 'AddressingNone (
http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not support
adding WS-Addressing headers.

Is there a way around this error?

Thanks,

JD
--
Regards,

James Darbyshire
***@gmail.com
James Darbyshire
2011-06-12 12:14:20 UTC
Permalink
This is my <serviceModel>:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Post by James Darbyshire
Hi all,
I am getting the following exception when I try to consume a WCF service
hosted in mono 2.10.2
Addressing Version 'AddressingNone (
http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not support
adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
--
Regards,

James Darbyshire
***@gmail.com
James Darbyshire
2011-06-12 12:31:04 UTC
Permalink
Further info, my client is binding using basicHttp
Post by James Darbyshire
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Post by James Darbyshire
Hi all,
I am getting the following exception when I try to consume a WCF service
hosted in mono 2.10.2
Addressing Version 'AddressingNone (
http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not
support adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
--
Regards,
James Darbyshire
--
Regards,

James Darbyshire
***@gmail.com
Atsushi Eno
2011-06-12 13:00:50 UTC
Permalink
Hi,

Without the actual code for client and server I cannot tell if your code
is correct and what is the problem for sure, if any. If it is you who
are trying to actually add WS-Addressing headers, then it really won't
work since WSAddressing is really None for BasicHttpBinding.

Atsushi Eno
Post by James Darbyshire
Hi all,
I am getting the following exception when I try to consume a WCF
service hosted in mono 2.10.2
Addressing Version 'AddressingNone
(http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not
support adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
_______________________________________________
http://lists.ximian.com/mailman/listinfo/mono-list
James Darbyshire
2011-06-12 13:27:07 UTC
Permalink
Hi Atsushi,

It turns out the problem was an unhandled exception because I was including
an NHibernate Linfu dll not included in the bin folder - my bad. I saw this
when I looked at the response in Fiddler.
Circular reference of an object in the object graph was found
I have a DTO which has '[DataContract(IsReference = true)]' set which, on
Windows, stops problems with circular references.

Is this available on mono?

The class is a user, which references RoleDTO, which has a List<UserDTO> on
it.

[DataContract(IsReference = true)]
public partial class UserDTO
{
[DataMember]
public RoleDTO Role
{
get;
set;
}
}

[DataContract(IsReference = true)]
public partial class RoleDTO
{
[DataMember]
public List<UserDTO> Users
{
get;
set;
}
}

Regards,

James
Hi,
Without the actual code for client and server I cannot tell if your code is
correct and what is the problem for sure, if any. If it is you who are
trying to actually add WS-Addressing headers, then it really won't work
since WSAddressing is really None for BasicHttpBinding.
Atsushi Eno
Hi all,
I am getting the following exception when I try to consume a WCF service
hosted in mono 2.10.2
Addressing Version 'AddressingNone (
http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not
support adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
_______________________________________________
http://lists.ximian.com/mailman/listinfo/mono-list
--
Regards,

James Darbyshire
***@gmail.com
James Darbyshire
2011-06-13 01:20:33 UTC
Permalink
Post by James Darbyshire
<faultcode xmlns:a="
http://schemas.microsoft.com/ws/2005/05/addressing/none
">a:InternalServiceFault</faultcode>

This must be where the Addressing=none comes from. Is this the default
behaviour for WCF on mono?

James
Post by James Darbyshire
Hi Atsushi,
It turns out the problem was an unhandled exception because I was including
an NHibernate Linfu dll not included in the bin folder - my bad. I saw this
when I looked at the response in Fiddler.
Circular reference of an object in the object graph was found
I have a DTO which has '[DataContract(IsReference = true)]' set which, on
Windows, stops problems with circular references.
Is this available on mono?
The class is a user, which references RoleDTO, which has a List<UserDTO> on
it.
[DataContract(IsReference = true)]
public partial class UserDTO
{
[DataMember]
public RoleDTO Role
{
get;
set;
}
}
[DataContract(IsReference = true)]
public partial class RoleDTO
{
[DataMember]
public List<UserDTO> Users
{
get;
set;
}
}
Regards,
James
Hi,
Without the actual code for client and server I cannot tell if your code
is correct and what is the problem for sure, if any. If it is you who are
trying to actually add WS-Addressing headers, then it really won't work
since WSAddressing is really None for BasicHttpBinding.
Atsushi Eno
Hi all,
I am getting the following exception when I try to consume a WCF service
hosted in mono 2.10.2
Addressing Version 'AddressingNone (
http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not
support adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
_______________________________________________
http://lists.ximian.com/mailman/listinfo/mono-list
--
Regards,
James Darbyshire
--
Regards,

James Darbyshire
***@gmail.com
Atsushi Eno
2011-06-13 07:17:08 UTC
Permalink
Hi James,

IsReference property on DataContractAttribute also works on mono. I
verified this by running the example below with your DTO types:

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml;

public class TESt
{
public static void Main (string [] args)
{
var o = new UserDTO ();
var r = new RoleDTO ();
r.Users = new List<UserDTO> ();
r.Users.Add (o);
o.Role = r;
var ds = new DataContractSerializer (r.GetType ());
using (var xw = XmlWriter.Create (Console.Out))
ds.WriteObject (xw, r);
}
}

As for the fault, I cannot guess what throws it without the actual
failing code.

Atsushi Eno
Post by James Darbyshire
Hi Atsushi,
It turns out the problem was an unhandled exception because I was
including an NHibernate Linfu dll not included in the bin folder - my
bad. I saw this when I looked at the response in Fiddler.
Circular reference of an object in the object graph was found
I have a DTO which has '[DataContract(IsReference = true)]' set which,
on Windows, stops problems with circular references.
Is this available on mono?
The class is a user, which references RoleDTO, which has a
List<UserDTO> on it.
[DataContract(IsReference = true)]
public partial class UserDTO
{
[DataMember]
public RoleDTO Role
{
get;
set;
}
}
[DataContract(IsReference = true)]
public partial class RoleDTO
{
[DataMember]
public List<UserDTO> Users
{
get;
set;
}
}
Regards,
James
On 12 June 2011 23:00, Atsushi Eno
Hi,
Without the actual code for client and server I cannot tell if
your code is correct and what is the problem for sure, if any. If
it is you who are trying to actually add WS-Addressing headers,
then it really won't work since WSAddressing is really None for
BasicHttpBinding.
Atsushi Eno
Hi all,
I am getting the following exception when I try to consume a
WCF service hosted in mono 2.10.2
Addressing Version 'AddressingNone
(http://schemas.microsoft.com/ws/2005/05/addressing/none)'
does not support adding WS-Addressing headers.
Is there a way around this error?
Thanks,
JD
--
Regards,
James Darbyshire
_______________________________________________
http://lists.ximian.com/mailman/listinfo/mono-list
--
Regards,
James Darbyshire
Loading...