IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Silverlight Discussion :

error: Failed to generate code for the service reference


Sujet :

Silverlight

  1. #1
    Membre du Club
    Étudiant
    Inscrit en
    Février 2009
    Messages
    55
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2009
    Messages : 55
    Points : 49
    Points
    49
    Par défaut error: Failed to generate code for the service reference
    bonjour,
    dans une application BussinesApplication , dès que je rajoute une opération à un service , le code pour la référence ne se génère pas !

    une erreur :

    Custom tool error: Failed to generate code for the service reference 'constructionOffre'. Please check other error and warning messages for details. C:\Users\FLY\Documents\Visual Studio 2010\Projects\FCApplication\FCApplication\Service References\constructionOffre\Reference.svcmap
    et des warnings :

    Warning 1 Custom tool warning: Cannot import wsdl:portType
    Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
    Error: Exception has been thrown by the target of an invocation.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='creerProposition']

    Warning 2 Custom tool warning: Cannot import wsdl:binding
    Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
    XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='creerProposition']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='CustomBinding_creerProposition']

    Warning 3 Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='CustomBinding_creerProposition']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='creerProposition']/wsdl:port[@name='CustomBinding_creerProposition']

    Warning 4 Custom tool warning: No endpoints compatible with Silverlight 4 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.

    Warning 5 Custom tool warning: Exception has been thrown by the target of an invocation.
    y a bien la balise endPoint pour mes service dans le web config

    l'erreur m'envoie vers ce fichier Reference.svcmap:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
     
    <?xml version="1.0" encoding="utf-8"?>
    <ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="d0727088-12bc-4dba-9f49-26ec39f35bd4" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
      <ClientOptions>
        <GenerateAsynchronousMethods>true</GenerateAsynchronousMethods>
        <EnableDataBinding>true</EnableDataBinding>
        <ExcludedTypes />
        <ImportXmlTypes>false</ImportXmlTypes>
        <GenerateInternalTypes>false</GenerateInternalTypes>
        <GenerateMessageContracts>false</GenerateMessageContracts>
        <NamespaceMappings />
        <CollectionMappings>
          <CollectionMapping TypeName="System.Collections.ObjectModel.ObservableCollection`1" Category="List" />
        </CollectionMappings>
        <GenerateSerializableTypes>false</GenerateSerializableTypes>
        <Serializer>Auto</Serializer>
        <UseSerializerForFaults>true</UseSerializerForFaults>
        <ReferenceAllAssemblies>true</ReferenceAllAssemblies>
        <ReferencedAssemblies />
        <ReferencedDataContractTypes />
        <ServiceContractMappings />
      </ClientOptions>
      <MetadataSources>
        <MetadataSource Address="http://localhost:50987/Services/ajouterFormationService.svc" Protocol="http" SourceId="1" />
      </MetadataSources>
      <Metadata>
        <MetadataFile FileName="ajouterFormationService.disco" MetadataType="Disco" ID="fa6d20a7-5456-4f1b-aca8-61138401ac8f" SourceId="1" SourceUrl="http://localhost:50987/Services/ajouterFormationService.svc?disco" />
        <MetadataFile FileName="ajouterFormationService.wsdl" MetadataType="Wsdl" ID="0d499805-4996-400c-9d18-50f0cbd46df0" SourceId="1" SourceUrl="http://localhost:50987/Services/ajouterFormationService.svc?wsdl" />
        <MetadataFile FileName="ajouterFormationService1.wsdl" MetadataType="Wsdl" ID="7c89cf34-33ff-4a08-a3fd-842388333afb" SourceId="1" SourceUrl="http://localhost:50987/Services/ajouterFormationService.svc?wsdl=wsdl0" />
        <MetadataFile FileName="ajouterFormationService.xsd" MetadataType="Schema" ID="e07e250a-e51c-4322-b1d6-714043637e5d" SourceId="1" SourceUrl="http://localhost:50987/Services/ajouterFormationService.svc?xsd=xsd0" />
      </Metadata>
      <Extensions>
        <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
        <ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
      </Extensions>
    </ReferenceGroup>
    le port d'exécution de mon programme est le mm que de référence des service!!

    où est le problème ?

    merci de m'aider

  2. #2
    Membre du Club
    Étudiant
    Inscrit en
    Février 2009
    Messages
    55
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2009
    Messages : 55
    Points : 49
    Points
    49
    Par défaut une réponse
    voilà ce que j'ai fait , je ne peux pas expliquer comment , mais ça marche !

    clique droit sur la référence > Confugure Service Reference ...
    puis vous choisissez : Reuse types in specified referenced assemblies
    et vous cochez une (moi system.windows) puis OK

    voilà

  3. #3
    Membre actif
    Inscrit en
    Mai 2004
    Messages
    297
    Détails du profil
    Informations forums :
    Inscription : Mai 2004
    Messages : 297
    Points : 207
    Points
    207
    Par défaut
    Merci bien même problème et même resolution sans explication ...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Error 404: Resource not found for the segment
    Par jkamelin dans le forum Microsoft Dynamics CRM
    Réponses: 4
    Dernier message: 07/02/2018, 10h01
  2. Réponses: 11
    Dernier message: 19/08/2010, 12h47
  3. Custom tool error: Failed to generate code.
    Par jkamelin dans le forum C#
    Réponses: 2
    Dernier message: 15/09/2009, 18h18
  4. [DEBUG] Found No Interfaces. Generating Code for Types
    Par Battosaiii dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 18/08/2006, 15h26

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo