Ho un servizio WCF esistente che funziona. Ho aggiunto un riferimento in Visual Studio 2010 per la mia app per Windows Phone. Il riferimento si presenta e vedo i metodi quando ne controllo le proprietà. Il servizio utilizza basicHttpBinding. Sembra che la classe proxy non sia mai stata generata. Non posso fare riferimento a esso (sì - Sto controllando il corretto spazio dei nomi)Classe proxy non disponibile per Windows Phone 7 Riferimento al servizio WCF
Sono consapevole dell'utilità SlSvcUtil.exe - ma che si suppone non essere più necessario. Qualche idea sul motivo per cui la mia classe proxy non viene generata ma il riferimento al servizio esiste?
Grazie!
EDIT: file WSDL è la seguente:
<?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>
Se si seleziona l'opzione "Progetto -> Mostra tutti i file" quando si seleziona il progetto WP7 e si espande l'icona di riferimento del servizio, viene visualizzato il file reference.cs? – carlosfigueira
no, solo i file wdsl, disco, svcinfo, svcmap e xsd. –
C'è qualcosa sotto il file svcmap (IIRC il file .cs è elencato sotto quello)? In caso contrario, c'è qualche avviso/errore su VS quando aggiungi il riferimento? In caso contrario, potrebbe valere la pena provare a utilizzare slsvcutil per generare un file, anche se solo per scoprire se emette eventuali errori/avvertenze. – carlosfigueira