Click here to Skip to main content
15,904,655 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Error occurs when using OdbcDataAdapter FILL command Pin
Dave Kreskowiak21-Oct-08 3:56
mveDave Kreskowiak21-Oct-08 3:56 
GeneralRe: Error occurs when using OdbcDataAdapter FILL command Pin
John Wadleigh21-Oct-08 4:31
John Wadleigh21-Oct-08 4:31 
GeneralRe: Error occurs when using OdbcDataAdapter FILL command Pin
Dave Kreskowiak21-Oct-08 5:39
mveDave Kreskowiak21-Oct-08 5:39 
GeneralRe: Error occurs when using OdbcDataAdapter FILL command Pin
John Wadleigh21-Oct-08 6:29
John Wadleigh21-Oct-08 6:29 
Questionhow to use cache memory in vb.net Pin
Vineet Swami20-Oct-08 20:52
Vineet Swami20-Oct-08 20:52 
AnswerRe: how to use cache memory in vb.net Pin
Sathesh Sakthivel20-Oct-08 22:03
Sathesh Sakthivel20-Oct-08 22:03 
AnswerRe: how to use cache memory in vb.net Pin
Dave Kreskowiak21-Oct-08 3:47
mveDave Kreskowiak21-Oct-08 3:47 
Questionweb services with no ASMX or WSDL Pin
tryingtofindanamethatsnotused20-Oct-08 15:40
tryingtofindanamethatsnotused20-Oct-08 15:40 
I am using VB.NET.

I am new to web services, and have been given the instruction that I am to send an XML document via HTTPS POST and receive a response XML document. The web service address I have been given has no ASMX file, WSDL file or DISCO, so from what I can gather I cannot use dot.NET's built in web service controls. The address I have been given to post these calls to, is in is the following format:
https://www.server.com/WebService
(I have replaced the real server name)

I swear I have read the entire internet on the topic.

I have a couple of questions

1) can it be done with a web service address formatted such as the above (no ASMX WSDL)?? (I presume it must)

2) Are any of the approaches I have attempted below valid / should work?

3) I keep receiving an error "unable to connect to the remote server", are my issues all their fault? (I doubt it) and if not, what am I doing wrong? How can I do this?

Approaches I have tried include:
(don't get too caught up with the fact some are incomplete or some of the data or calls look silly, I'm really trying to illustrate the techniques that have failed)

Dim oRequest As HttpWebRequest = WebRequest.Create("https://www.server.com/WebService")
Dim oStream As Stream = oRequest.GetRequestStream
Dim oXML As Xml.XmlTextWriter = New Xml.XmlTextWriter(oStream, Encoding.GetEncoding("UTF-8"))


address = New Uri("https://www.server.com/WebService")
request = DirectCast(WebRequest.Create(address), HttpWebRequest)
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"


<WebServiceBinding("SomeBindingName", "SomeBindingNS")> _
Public Class CustomProxy
    Inherits SoapHttpClientProtocol

    <SoapRpcMethod(Action:="urn:AstroIntf-IAstro#GetSunriseInfo", RequestNamespace:="run:AstroIntf-IAstro")> _
        Public Function GetSunriseInfo(ByVal Latitude As Double, ByVal Longitude As Double, _
                                       ByVal Year As Integer, ByVal Month As Integer, ByVal Day As Integer, _
                                       ByVal TimeBiasMinutes As Integer) As String
        Me.Url = "https://www.server.com/WebService"
        Dim ret() As Object
        ret = Me.Invoke("GetSunriseInfo", _
                      New Object() _
                      {Latitude, Longitude, Year, Month, Day, TimeBiasMinutes})
        Return CType(ret(0), String)
    End Function
End Class


Dim oClient As New WebClient
Dim oStream As Stream = oClient.OpenWrite("https://www.server.com/WebService", "POST")
Dim oWriter As StreamWriter = New StreamWriter(oStream)
oWriter.WriteLine("Hello world")
oWriter.Close()


and good old fashioned html:
<form target="_blank" action='http://www.server.com/WebService' method="POST"> 
<table>
  <tr>
    <td>Enter something:</td>
    <td><input type="text" size="30" name="test1" /></td>
  </tr>
  <tr>
    <td></td>
    <td align="right"> <input type="submit" value="Submit" /></td>
  </tr>
</table>
</form>

QuestionTCPListener Pin
Subjugate20-Oct-08 14:31
Subjugate20-Oct-08 14:31 
AnswerRe: TCPListener Pin
Scott Barbour21-Oct-08 8:18
Scott Barbour21-Oct-08 8:18 
QuestionMaxLength for text field in propertygrid Pin
nickbartels20-Oct-08 7:44
nickbartels20-Oct-08 7:44 
AnswerRe: MaxLength for text field in propertygrid Pin
Jon_Boy20-Oct-08 8:40
Jon_Boy20-Oct-08 8:40 
Questionspecifying path to a file on another computer on the network Pin
Dbase20-Oct-08 7:00
Dbase20-Oct-08 7:00 
AnswerRe: specifying path to a file on another computer on the network Pin
nlarson1120-Oct-08 7:13
nlarson1120-Oct-08 7:13 
Question[Message Deleted] Pin
Vineet Swami20-Oct-08 1:29
Vineet Swami20-Oct-08 1:29 
AnswerRe: How to use cache memory Pin
N a v a n e e t h20-Oct-08 1:37
N a v a n e e t h20-Oct-08 1:37 
GeneralRe: How to use cache memory Pin
Vineet Swami20-Oct-08 1:52
Vineet Swami20-Oct-08 1:52 
AnswerRe: How to use cache memory Pin
MikeMarq20-Oct-08 2:28
MikeMarq20-Oct-08 2:28 
GeneralRe: How to use cache memory Pin
elektrowolf20-Oct-08 3:21
elektrowolf20-Oct-08 3:21 
AnswerRe: How to use cache memory Pin
Ashfield20-Oct-08 3:22
Ashfield20-Oct-08 3:22 
Questionsend email using CDO 1.2.1 Pin
mohammed zarqa20-Oct-08 1:09
mohammed zarqa20-Oct-08 1:09 
AnswerRe: send email using CDO 1.2.1 Pin
Thomas Stockwell20-Oct-08 2:10
professionalThomas Stockwell20-Oct-08 2:10 
GeneralRe: send email using CDO 1.2.1 [modified] Pin
mohammed zarqa20-Oct-08 3:29
mohammed zarqa20-Oct-08 3:29 
AnswerRe: send email using CDO 1.2.1 Pin
Wendelius21-Oct-08 8:03
mentorWendelius21-Oct-08 8:03 
QuestionApplication.LocalUserAppDataPath Pin
JR21220-Oct-08 0:52
JR21220-Oct-08 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.