2010-11-19 4 views
0

私はSpring.netのWebサービスをセットアップしようとしていますが、私は理解できないエラーメッセージを受け取り続けています。Spring.net Webサービスを動作させるにはどうすればよいですか?

エラー:

​​

コード:

public interface IBoundaryService { 
     XmlDocument GetAllBounds(); 
    } 

    public class BoundaryService :IBoundaryService 
    { 
     public virtual IBoundaryDao BoundaryDao { get; set; } 

     public virtual XmlDocument GetAllBounds() 
     { 
      XmlDocument xmlDoc = new XmlDocument(); 
      xmlDoc.LoadXml("<test>ok</test>"); 
      return xmlDoc; 
     } 
    } 

構成:

<object name="BoundaryService" type="StudentRegistration.Services.BoundaryService, StudentRegistration" 
     abstract="true"> 
    </object> 

    <object id="BoundaryExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web"> 
    <property name="TargetName" value="BoundaryService"/> 
    <property name="Namespace" value="http://fake/services"/> 
    <property name="Description" value="something"/> 
    <property name="MemberAttributes"> 
     <dictionary> 
     <entry key="GetAllBounds"> 
      <object type="System.Web.Services.WebMethodAttribute, System.Web.Services"> 
      <property name="Description" value="something."/> 
      <property name="MessageName" value="GetAllBounds"/> 
      </object> 
     </entry> 
     </dictionary> 
    </property> 
    </object> 

私はこれをクリアするために何を試してみてください?

答えて

2

xml宣言でSpring.NETのリファレンスが間違っています(私は数日前に同じ問題が発生しました)。

<object name="BoundaryService" 
     type="StudentRegistration.Services.BoundaryService, StudentRegistration" 
     abstract="true" /> 

あなたがエクスポートされますSpring.Web.Services.WebServiceExporterオブジェクトを使用してWebサービスのように宣言されなければならないとしてエクスポートPONO持っているとき、あなたが実際.asmxサービス

を持っている時には、上記の宣言が適用されます。

<object id="BoundaryService" 
     type="StudentRegistration.Services.BoundaryService, StudentRegistration" 
/> 

WebServiceExporterのtargetプロパティは、宣言されたオブジェクトのidに適用されます。抽象部分は、Spring.NETが生成する役割を担うため、必須ではありません。ウェブサービス。 (あなたの現在のCFGと)あなたの公開サービス名が(..)/BoundaryExporter.asmx

編集されることを

注:名を使用して、標準の.asmx Webサービスの 設定文タイプ属性は、少なくとも、壊れているように見えます春バージョン用1.3.0.20349

関連する問題