Mono's WCF support isn't fully-featured and some things may not work properly. If this is a brand new service, I'd suggest looking at ServiceStack <http://servicestack.net/> which works very well on Mono (and its developers officially support Mono).
On Fri, Dec 21, 2012 at 7:18 PM, Wang Song <[email protected]> wrote: > hi, > i am new to mono wcf, and i came across some problems about my code. > recent, i use ruby-savon to get data from wcf host on mono. > > and this is my ruby code: > * client = Savon::Client.new do* > * wsdl.document="http://localhost:9000/MonoWcf/MonoSevice/wsdl"* > * end* > * > * > * puts client.wsdl.soap_actions* > * response = client.request :get_data* > * > * > and this this puts : > ruby -KU -- '/home/charlot/Documents/Aptana Studio 3 > Workspace/rubyfun/soap/savon.rb' > W, [2012-12-21T02:20:05.484988 #10221] WARN -- : HTTPI executes HTTP GET > using the httpclient adapter > get_data > get_data_using_data_contract > D, [2012-12-21T02:20:05.566730 #10221] DEBUG -- : SOAP request: > http://localhost:9000/MonoWcf/MonoSevice/soap > D, [2012-12-21T02:20:05.567166 #10221] DEBUG -- : SOAPAction: " > http://localhost:9000/IMonoService/GetData", Content-Type: > text/xml;charset=UTF-8, Content-Length: 293 > D, [2012-12-21T02:20:05.567517 #10221] DEBUG -- : <?xml version="1.0" > encoding="UTF-8"?><env:Envelope xmlns:xsd=" > http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ > XMLSchema-instance" xmlns:wsdl="http://tempuri.org/" xmlns:env=" > http://schemas.xmlsoap.org/soap/envelope/ > "><env:Body><GetData></GetData></env:Body></env:Envelope> > W, [2012-12-21T02:20:05.567991 #10221] WARN -- : HTTPI executes HTTP POST > using the httpclient adapter > D, [2012-12-21T02:20:05.571580 #10221] DEBUG -- : SOAP response (status > 415): > D, [2012-12-21T02:20:05.572267 #10221] DEBUG -- : > /usr/local/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/response.rb:108:in > `raise_errors': Savon::HTTP::Error > from > /usr/local/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/response.rb:18:in > `initialize' > from > /usr/local/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request.rb:35:in > `new' > from > /usr/local/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request.rb:35:in > `response' > from > /usr/local/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:86:in > `request' > from /home/charlot/Documents/Aptana Studio 3 > Workspace/rubyfun/soap/savon.rb:19:in `dosoap' > from /home/charlot/Documents/Aptana Studio 3 > Workspace/rubyfun/soap/savon.rb:25:in `<main>' > > and this is the mono-wcf wsdl : > > <definitions name="service" targetNamespace="http://tempuri.org/"> > <import location=" > http://localhost:9000/MonoWcf/MonoSevice/wsdl?wsdl=wsdl0" namespace=" > http://localhost:9000"/> > <types/> > <binding name="BasicHttpBinding_IMonoService" type="i0:IMonoService"> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> > <operation name="GetData"> > <soap:operation soapAction="http://localhost:9000/IMonoService/GetData" > style="document"/> > <input> > <soap:body use="literal"/> > </input> > <output> > <soap:body use="literal"/> > </output> > </operation> > <operation name="GetDataUsingDataContract"> > <soap:operation soapAction=" > http://localhost:9000/IMonoService/GetDataUsingDataContract" > style="document"/> > <input> > <soap:body use="literal"/> > </input> > <output> > <soap:body use="literal"/> > </output> > </operation> > </binding> > <service name="service"> > <port name="BasicHttpBinding_IMonoService" > binding="tns:BasicHttpBinding_IMonoService"> > <soap:address location="http://localhost:9000/MonoWcf/MonoSevice/soap"/> > </port> > </service> > </definitions> > > but when i host wcf in windows(7), it really get the data. > and this window-wcf wsdl : > <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc=" > http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12=" > http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://localhost:9000" > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp=" > http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap=" > http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw=" > http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc=" > http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10=" > http://www.w3.org/2005/08/addressing" xmlns:wsx=" > http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam=" > http://www.w3.org/2007/05/addressing/metadata" name="MonoService" > targetNamespace="http://localhost:9000"> > <wsdl:types> > <xsd:schema targetNamespace="http://localhost:9000/Imports"> > <xsd:import schemaLocation=" > http://localhost:9000/MonoWcf/MonoSevice/wsdl?xsd=xsd0" namespace=" > http://localhost:9000"/> > <xsd:import schemaLocation=" > http://localhost:9000/MonoWcf/MonoSevice/wsdl?xsd=xsd1" namespace=" > http://schemas.microsoft.com/2003/10/Serialization/"/> > <xsd:import schemaLocation=" > http://localhost:9000/MonoWcf/MonoSevice/wsdl?xsd=xsd2" namespace=" > http://schemas.datacontract.org/2004/07/MonoWcf"/> > </xsd:schema> > </wsdl:types> > <wsdl:message name="IMonoService_GetData_InputMessage"> > <wsdl:part name="parameters" element="tns:GetData"/> > </wsdl:message> > <wsdl:message name="IMonoService_GetData_OutputMessage"> > <wsdl:part name="parameters" element="tns:GetDataResponse"/> > </wsdl:message> > <wsdl:message name="IMonoService_GetDataUsingDataContract_InputMessage"> > <wsdl:part name="parameters" element="tns:GetDataUsingDataContract"/> > </wsdl:message> > <wsdl:message name="IMonoService_GetDataUsingDataContract_OutputMessage"> > <wsdl:part name="parameters" > element="tns:GetDataUsingDataContractResponse"/> > </wsdl:message> > <wsdl:portType name="IMonoService"> > <wsdl:operation name="GetData"> > <wsdl:input wsaw:Action="http://localhost:9000/IMonoService/GetData" > message="tns:IMonoService_GetData_InputMessage"/> > <wsdl:output wsaw:Action=" > http://localhost:9000/IMonoService/GetDataResponse" > message="tns:IMonoService_GetData_OutputMessage"/> > </wsdl:operation> > <wsdl:operation name="GetDataUsingDataContract"> > <wsdl:input wsaw:Action=" > http://localhost:9000/IMonoService/GetDataUsingDataContract" > message="tns:IMonoService_GetDataUsingDataContract_InputMessage"/> > <wsdl:output wsaw:Action=" > http://localhost:9000/IMonoService/GetDataUsingDataContractResponse" > message="tns:IMonoService_GetDataUsingDataContract_OutputMessage"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="soap" type="tns:IMonoService"> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="GetData"> > <soap:operation soapAction="http://localhost:9000/IMonoService/GetData" > style="document"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="GetDataUsingDataContract"> > <soap:operation soapAction=" > http://localhost:9000/IMonoService/GetDataUsingDataContract" > style="document"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="MonoService"> > <wsdl:port name="soap" binding="tns:soap"> > <soap:address location="http://localhost:9000/MonoWcf/MonoSevice/soap"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > my os is: ubuntu 12 > mono version: > Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2) > Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. > www.mono-project.com > TLS: __thread > SIGSEGV: altstack > Notifications: epoll > Architecture: x86 > Disabled: none > Misc: softdebug > LLVM: supported, not enabled. > GC: Included Boehm (with typed GC and Parallel Mark) > > really thanks your help! > > from mueven > shanghai.china > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > >
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
