Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2005

Tip: Looking for answers? Try searching our database.

Using System.Net.WebClient to access Web Service. Please help.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Barrido - 04 Aug 2005 06:51 GMT
Greetings! I have a project that needs to access a web service. My problem
is this web service is provided via
CGI. I cannot do a "Web Reference" to it to add in my dotnet project. I'm
planning to use instead the System.Net.WebClient
to HTTP POST to this Web Service so I can retrieve any return values from
it. The code bellow is what the CGI web service expect to receive from my
end. How do I "HTTP POST" this to http://localhost/sb/myServer.cgi using
System.Net.WebClient? Please help. Thanks in advance! :-)

SOAP::Transport::HTTP::Client::send_receive: POST
http://localhost/sb/myServer.cgi
Accept: text/xml
Accept: multipart/*
Content-Length: 447
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:myWS#createsessioncmd"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAPENV="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAPENV:
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
       <namesp1:createsessioncmd xmlns:namesp1="urn:myWS"/>
</SOAP-ENV:Body>
</SOAPENV:
Envelope>
Andy Fish - 04 Aug 2005 08:09 GMT
surely the whole point of web services is that you can access them
regardless of the technology provided to provide them? providing the service
implements SOAP there should be nothing to stop you adding a web reference

> Greetings! I have a project that needs to access a web service. My problem
> is this web service is provided via
[quoted text clipped - 23 lines]
> </SOAPENV:
> Envelope>
Michael Barrido - 04 Aug 2005 09:41 GMT
All i get when i try to "Web Reference" is

"The request failed with HTTP status 411: Length Required." :-(

> surely the whole point of web services is that you can access them
> regardless of the technology provided to provide them? providing the
[quoted text clipped - 29 lines]
>> </SOAPENV:
>> Envelope>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.