-1

I am currently using restlet fw to access WCF Data Service. I have copied code from restlet support sites but it is not working and giving me error " Can't get metadata for http://xx.xx.xx/xxService.svc/$metadata--Communication Error[1001]...!

I will appreciate any help with this. Thanks in advance!

Jerome Louvel
  • 2,882
  • 18
  • 19
Avin
  • 301
  • 1
  • 3
  • 12

1 Answers1

0

Here is what I did that worked for me. In the WCF Service interface:

    [OperationContract,WebGet]    
    string Operation1();

WCF Service implementation class

    string Operation1()
    {
     return "Some text";    
    }

In the Java Android client

    URL url = new URL("http://xx.xx.xx/xxService.svc/Operation1");
    HttpURLConnection conn =(HttpURLConnection) url.openConnection();
    if (conn.getResponseCode() != 200) 
    throw new IOException(conn.getResponseMessage();
    }
nnyamhon
  • 155
  • 1
  • 10