locked
SILVERLIGHT / BLEND CONNEXION WITH WCF SERVICE RRS feed

  • Question

  • I'm trying to obtain informations which are provided by an WCF existing service in a SilverLight project.
    This WCF Service expose his data through a basicHttpBinding, like Microsoft documentation said (Thank to you, Mr Chuck Hays)
    To create a proxy inside this project, I added a service reference by Visual Web Developer's option. But i cannot do that and i have the error message below :

    "Une erreur s'est produite lors du téléchargement de 'http://localhost:6070/OperationsWebMCA'.
    La demande a échoué avec l'état HTTP 400 : Bad Request.
    Metadata contient une référence qui ne peut pas être résolue: 'http://localhost:6070/OperationsWebMCA'.
    Le type de contenu application/soap+xml; charset=utf-8 n'a pas été pris en charge
    par le service
    http://localhost:6070/OperationsWebMCA.
    Les liaisons du client et du service peuvent ne pas être en correspondance.
    Le serveur distant a retourné une erreur : (415) Cannot process the message
    because the content type 'application/soap+xml;
    charset=utf-8' was not the expected type 'text/xml;
    charset=utf-8'..
    If the service is defined in the current solution,
    try building the solution and adding the service reference again."


    Is someone can help me ?

     Thank a lot,

     BSharp34

    Saturday, May 8, 2010 6:43 AM

All replies

  • From an auto-translation of your error above, it looks like the proxy is not configured to match the web service.  Is the web service running on your local machine or elsewhere?  What do the WCF bindings look like on the server side?

     

    Since WCF is not our specialty, you may get better answers in a forum dedicated to Silverlight or WCF.

    Monday, May 10, 2010 6:25 PM
    Moderator
  • Thank for your answers.

    The WCF service is running on local machine.
    I used an app.config to expose the binding :

    <?

     

    xml version="1.0" encoding ="utf-8" ?>
    <
    configuration>
    <
    system.serviceModel>
    <
    services>
    ...

    <service name="CommunicationWebMCA.OperationsWebMCA">
    <
    endpoint
    address="http://localhost:6070/OperationsWebMCA"
    binding="basicHttpBinding"
    contract="InterfaceWebMCA.IAccesWebMCA" />
    </
    service>
    ...
    </services>
    </system.serviceModel>
    </configuration>

    If you have an idea ...
    I 'll follow your advice and will try ask some help to specialised WCF's forums.

    Thank a lot,
    BSharp34

    Monday, May 10, 2010 6:49 PM