2011-05-26 15 views
7

私は既存のWCFサービスを使用しています。 Visual Studio 2010でWindows Phoneアプリのリファレンスを追加しました。参照が表示され、そのプロパティをチェックアウトするときにメソッドが表示されます。サービスはbasicHttpBindingを使用しています。プロキシクラスは決して生成されないようです。私はそれを参照することはできません(はい - 私は適切な名前空間をチェックしています)Windows Phone 7ではプロキシクラスが使用できません。WCFサービスへの参照

私はSlSvcUtil.exeユーティリティを知っていますが、これはもう必要ないはずです。なぜ私のプロキシクラスは生成されていないが、サービス参照はそこにあるのですか?

ありがとうございます!

 
<?xml version="1.0" encoding="utf-8"?> 
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 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" name="ProjectManager" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> 
    <wsdl:types> 
    <xsd:schema targetNamespace="http://tempuri.org/Imports"> 
     <xsd:import schemaLocation="http://somesite/ProjectManager/ProjectManager.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
     <xsd:import schemaLocation="http://somesite/ProjectManager/ProjectManager.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
     <xsd:import schemaLocation="http://somesite/ProjectManager/ProjectManager.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/ProjectManager" /> 
    </xsd:schema> 
    </wsdl:types> 
    <wsdl:message name="IProjectManagerService_GetProjectList_InputMessage"> 
    <wsdl:part name="parameters" element="tns:GetProjectList" /> 
    </wsdl:message> 
    <wsdl:message name="IProjectManagerService_GetProjectList_OutputMessage"> 
    <wsdl:part name="parameters" element="tns:GetProjectListResponse" /> 
    </wsdl:message> 
    <wsdl:message name="IProjectManagerService_GetProjectFiles_InputMessage"> 
    <wsdl:part name="parameters" element="tns:GetProjectFiles" /> 
    </wsdl:message> 
    <wsdl:message name="IProjectManagerService_GetProjectFiles_OutputMessage"> 
    <wsdl:part name="parameters" element="tns:GetProjectFilesResponse" /> 
    </wsdl:message> 
    <wsdl:portType name="IProjectManagerService"> 
    <wsdl:operation name="GetProjectList"> 
     <wsdl:input wsaw:Action="http://tempuri.org/IProjectManagerService/GetProjectList" message="tns:IProjectManagerService_GetProjectList_InputMessage" /> 
     <wsdl:output wsaw:Action="http://tempuri.org/IProjectManagerService/GetProjectListResponse" message="tns:IProjectManagerService_GetProjectList_OutputMessage" /> 
    </wsdl:operation> 
    <wsdl:operation name="GetProjectFiles"> 
     <wsdl:input wsaw:Action="http://tempuri.org/IProjectManagerService/GetProjectFiles" message="tns:IProjectManagerService_GetProjectFiles_InputMessage" /> 
     <wsdl:output wsaw:Action="http://tempuri.org/IProjectManagerService/GetProjectFilesResponse" message="tns:IProjectManagerService_GetProjectFiles_OutputMessage" /> 
    </wsdl:operation> 
    </wsdl:portType> 
    <wsdl:binding name="BasicHttpBinding_IProjectManagerService" type="tns:IProjectManagerService"> 
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
    <wsdl:operation name="GetProjectList"> 
     <soap:operation soapAction="http://tempuri.org/IProjectManagerService/GetProjectList" style="document" /> 
     <wsdl:input> 
     <soap:body use="literal" /> 
     </wsdl:input> 
     <wsdl:output> 
     <soap:body use="literal" /> 
     </wsdl:output> 
    </wsdl:operation> 
    <wsdl:operation name="GetProjectFiles"> 
     <soap:operation soapAction="http://tempuri.org/IProjectManagerService/GetProjectFiles" 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="ProjectManager"> 
    <wsdl:port name="BasicHttpBinding_IProjectManagerService" binding="tns:BasicHttpBinding_IProjectManagerService"> 
     <soap:address location="http://somesite/ProjectManager/ProjectManager.svc" /> 
    </wsdl:port> 
    </wsdl:service> 
</wsdl:definitions> 
+0

WP7プロジェクトを選択するときに "プロジェクト - >すべてのファイルを表示"オプションを選択し、サービス参照アイコンを展開すると、reference.csファイルが表示されますか? – carlosfigueira

+0

いいえ、wdsl、disco、svcinfo、svcmap、およびxsdファイルのみです。 –

+0

svcmapファイルの下に何か(IIRC .csファイルがその下にリストされています)がありますか?そうでない場合は、参照を追加するとVSに警告/エラーが表示されますか?そうでなければ、slsvcutilを使用してファイルを生成しようとする価値があります。エラー/警告を出すかどうかを調べるだけです。 – carlosfigueira

答えて

1

奇妙なことに、1か月後には、他のインストールでは動作しませんでした。その可能性が最近の再起動は '固定'しかし、私も前に再起動したと思った - 誰が知っている。いずれにせよその働き。

+0

悲しいことに、もう一度私のために働いていません。 – CuiPengFei

2

これは私に起こった:

EDIT:次のようにWSDLファイルがあります。

原因は不明です。

私にとっては、Visual Studioを終了して、サービスを右クリックして右クリックし、[サービス参照の更新]をクリックしてください。

+0

ya ..前にすべてを試しました:) –

+0

これはちょうど私のために働いたものです。 – Jermismo

1

この問題がありました。
もう一度別の名前でサービスを追加すると、私の問題が1〜2回解決されました。
Slsvcは毎回動作し、TFSにチェックインするときにはうまく動作します。 TFS関連のものかどうかは不明です。

+0

これも過去に試してみました。 slsvc私は、IDEが極端な場合を除いてこのようにしなければならないと私は考えていました。この場合は非常に基本的です。 –

2

私はまったく同じ問題を抱えています。そして「Windows Phone Developer Tools Fix」をインストールすることで問題は解決しました。 http://download.microsoft.com/download/6/D/6/6D66958D-891B-4C0E-BC32-2DFC41917B11/VS10-KB2486994-x86.exe

幸運:

は、ここで修正プログラムをダウンロードするためのリンクです!

+1

hmm ..私は試してみる - 私はこれが既にインストールされていると思ったが、私は確認します。ありがとう! –

+0

あなたはどのバージョンのVSを使用していますか?プロフェッショナル? – CuiPengFei

+1

アルティメット - 問題は面白いほどに解決しました。この解決策はあなたのために働いていたので+1します。 –

関連する問題