Consume Web scripts in Dot net

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2009 02:30 AM
Hi,
I am using the .net framework 3.5. I tried to consume the web scripts using dot net web services.
When I tried to add the path in the Addd web reference, It shows me the error as below
"The HTML document does not contain Web service discovery"
It seems that the web script which I am trying to use is in the HTML format. I tried to convert in WSDL, but it throws an error.
Please share me the steps and the snapshots or links (if possible), to solve this issue.
Thanks in advance.
Regards
Arun
I am using the .net framework 3.5. I tried to consume the web scripts using dot net web services.
When I tried to add the path in the Addd web reference, It shows me the error as below

"The HTML document does not contain Web service discovery"
It seems that the web script which I am trying to use is in the HTML format. I tried to convert in WSDL, but it throws an error.
Please share me the steps and the snapshots or links (if possible), to solve this issue.
Thanks in advance.
Regards
Arun
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2009 04:06 AM
Web scripts are REST based web services. You can't use Visual Studio to add them as web references.
You are going to have to fetch it yourself and parse it;
You are going to have to fetch it yourself and parse it;
var request = WebRequest.Create(requestUri); using (var response = request.GetResponse()) { using (var responseStream = response.GetResponseStream()) { // parse the result and do something with it return result; } }

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2009 12:47 AM
Hi,
Thanks for your reply.
When I tried to access the http://localhost:8080/alfresco/service/index/uri/api/people/{userName} in the code replied.
I returns me an error "The remote server returned an error: (401) Unauthorized"
The server is tomcat server running as a remote.
I am using the below code in the dot net windows application (Framework 3.5)
HttpWebRequest request = WebRequest.Create("http://localhost:8080/alfresco/service/index/uri/api/people/{userName}") as HttpWebRequest;
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
StreamReader Rdr = new StreamReader(response.GetResponseStream());
MessageBox.Show(Rdr.ReadToEnd());
}
Please reslove me this error and share the steps to pass the credentials.
Regards
Arun
Thanks for your reply.
When I tried to access the http://localhost:8080/alfresco/service/index/uri/api/people/{userName} in the code replied.
I returns me an error "The remote server returned an error: (401) Unauthorized"
The server is tomcat server running as a remote.
I am using the below code in the dot net windows application (Framework 3.5)
HttpWebRequest request = WebRequest.Create("http://localhost:8080/alfresco/service/index/uri/api/people/{userName}") as HttpWebRequest;
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
StreamReader Rdr = new StreamReader(response.GetResponseStream());
MessageBox.Show(Rdr.ReadToEnd());
}
Please reslove me this error and share the steps to pass the credentials.
Regards
Arun
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2009 09:45 AM
Use HTTP Basic authentication in the request header.
Thanks,
Mike
Thanks,
Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:14 AM
Hi,
Thanks for the reply.
I am trying to use Dot net Framework 3.5 by which I would like to write web services for creating a folder, storing and update the documents etc.
I downloaded the Alfresco version 3.1.
My question is
1. Does Alfresco v3.1 supports WSDL?
2. Which version should be used to support WSDL for writing dot net web services?
3. Could you plesae share the link to download the version supporting Dot net web services?
Please guide me the steps to be followed for consuming the WSDL from ALFRESCO to my web services.
Thanks,
Arun
Thanks for the reply.
I am trying to use Dot net Framework 3.5 by which I would like to write web services for creating a folder, storing and update the documents etc.
I downloaded the Alfresco version 3.1.
My question is
1. Does Alfresco v3.1 supports WSDL?
2. Which version should be used to support WSDL for writing dot net web services?
3. Could you plesae share the link to download the version supporting Dot net web services?
Please guide me the steps to be followed for consuming the WSDL from ALFRESCO to my web services.
Thanks,
Arun
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2010 02:11 PM
At this time your best chance to getting code working in .NET is to download the Alfresco toolkit.
It does not use WCF/Framework 3.5 but this is your best chance. It uses WSE 1.0
I have run into too many issues with the Alfresco wsdl under the VS 2008/ 3.5 framework.
It will not properly generate a working proxy.
Go to Alfresco Forge and download the .NET toolkit.
It does not use WCF/Framework 3.5 but this is your best chance. It uses WSE 1.0
I have run into too many issues with the Alfresco wsdl under the VS 2008/ 3.5 framework.
It will not properly generate a working proxy.
Go to Alfresco Forge and download the .NET toolkit.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 07:06 AM
Alfresco forge's .net toolkit will only support webservices, but if we want to access say share's blog feature using .net 3.5/wcf, how we could achieve that ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 07:13 AM
Web Scripts are bog standard HTTP. WCF is aimed at Web Services and won't help.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 07:17 AM
You need to learn the http-protocol and how to use it under .Net. When you have that knowleadge it is easy to call webscripts. Unfortunally I havn't seen any good tools to simulate mulipart-forms in .Net, as example.
