I am not able to install sound card drivers for Windows 2003 server in IBM Thinkcenter A50 Sumit Domyan
Sumit Domyan
Posts
-
Windows 2003 sound card drivers -
How to call web service dynamically?Just look at the ConnectBtn_Click sub & MyHTTPClass. Rest is not of your use. Thanks Sumit Domyan
-
How to call web service dynamically?Hi there, You can use WSE. WSE supports both a one-way messaging model with the SoapSender and SoapReceiver classes and a request/response pair model using the SoapClient and SoapService classes, you can take a look at Sending and Receiving SOAP Messages [^]for more information. So in this case, you may consider using the SoapClient to send the message and receive the response, the sample code looks something like Option Explicit On Option Strict On Imports System.Net.Dns Imports System.Net Imports System.IO Imports System.Threading Imports System.Xml Imports System.Web.Services Imports System.Text Imports System.Text.RegularExpressions Imports System.Globalization Imports Microsoft.Web.Services2 Imports Microsoft.Web.Services2.Messaging Imports Microsoft.Web.Services2.Addressing Imports System.Security Public Class LoadTesterForm Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents TestReport As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents WebServiceURLTextBox As System.Windows.Forms.TextBox Friend WithEvents ConnectBtn As System.Windows.Forms.Button Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents MethodTextBox As
-
Maintaining session for Web Services between SOAP requestsHi All I am sending a receiving data using SOAP Envelope. Now i want to maintain session between my SOAP requests. How to maintain session for Web Services between SOAP requests? Thanks Sumit Domyan
-
SOAP Envelope - Passing parameters to WebService MethodHi Thanks a lot for your help, My application is working right now. Can you help me in maintaining session for a web service? My question is? How to maintain session for Web Services between SOAP requests? Thanks Sumit Domyan
-
SOAP Envelope - Passing parameters to WebService MethodHow can i set the namespace in the body? Sumit Domyan
-
SOAP Envelope - Passing parameters to WebService MethodHi All I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and a list of methods with parameters, he wants to execute and I have to get the results. I have some solution to this problem. Right now i am using WSE to solve this problem. My code is:
Dim env As SoapEnvelope Dim epr As EndpointReference Dim client As MyHttpClient Dim rs As SoapEnvelope Dim bodyResponse As String env = New SoapEnvelope env.Context.Addressing.Action = New Action("http://tempuri.com/TestWebService/MyService/HelloWorld") env.CreateBody() env.Body.InnerXml = String.Format("{0}{1}", "Test", "User") epr = New EndpointReference(New Uri("http://localhost/TestWebService/MyService.asmx")) client = New MyHttpClient(epr) rs = client.Hello_World(env) bodyResponse = rs.Body.OuterXml TestReport.Text = bodyResponse Imports System.Xml Imports Microsoft.Web.Services2 Imports Microsoft.Web.Services2.Addressing Imports Microsoft.Web.Services2.Messaging Imports System.Web Public Class MyHttpClient Inherits SoapClient Public msg As String = String.Empty Public LoadTesterForm As LoadTesterForm = Nothing Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub _ Public Function Hello_World(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml Hello_World = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) MyBase.FilterMessage(envelope) End Sub End Class Web Service Method is: _ Public Function HelloWorld(ByVal first_name As String, ByVal last_name As String) As String Return "Hello " + first_name + " " + last_name + "!" End Function
This code works fine, if there are no parameters accepted by web method HelloWorld. When i pass parameters, it returns the same result. Am i doing anything wrong while passing -
Compiling VB.NET Code at runtimeHi Can you please answer my one more question? I am passing parameters through soap, but i am not getting the exact result back.
Dim env As SoapEnvelope Dim epr As EndpointReference Dim client As MyHttpClient Dim rs As SoapEnvelope Dim bodyResponse As String Dim web\_namespace As String Dim web\_uri As String Dim web\_method As String Dim action As String Dim inner\_xml As String web\_method = MethodTextBox.Text.Trim web\_uri = WebServiceURLTextBox.Text.Trim web\_namespace = NamespaceTextBox.Text.Trim If web\_namespace.EndsWith("/") = False Then web\_namespace += "/" End If action = web\_namespace & web\_method inner\_xml = "<" & web\_method & " xmlns=""" & web\_namespace & """" & " >TestUser" env = New SoapEnvelope env.Context.Addressing.Action = New Action(action) env.CreateBody() env.Body.InnerXml = String.Format(inner\_xml) epr = New EndpointReference(New Uri(web\_uri)) client = New MyHttpClient(epr) client.WebAction = action rs = client.TestWebRequest(env) bodyResponse = rs.Body.OuterXml TestReport.Text = bodyResponse End Sub
End Class
Option Explicit On
Option Strict OnImports System.Xml
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports System.WebPublic Class MyHttpClient
Inherits SoapClientFriend intWebAction As String WriteOnly Property WebAction() As String Set(ByVal Value As String) intWebAction = Value End Set End Property Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub '"http://tempuri.com/TestWebService/MyService/HelloWorld")> \_ \_ Public Function TestWebRequest(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope Dim msg As String response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml TestWebRequest = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) MyBase.FilterMessage(envelope)
-
Web Service - QueryHi All I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and a list of methods with parameters, he wants to execute and I have to get the results. I have some solution to this problem. Right now i am using WSE to solve this problem. My code is:
Dim env As SoapEnvelope Dim epr As EndpointReference Dim client As MyHttpClient Dim rs As SoapEnvelope Dim bodyResponse As String env = New SoapEnvelope env.Context.Addressing.Action = New Action("http://tempuri.com/TestWebService/MyService/HelloWorld") env.CreateBody() **env.Body.InnerXml = String.Format("")** epr = New EndpointReference(New Uri("http://localhost/TestWebService/MyService.asmx")) client = New MyHttpClient(epr) rs = client.Hello_World(env) bodyResponse = rs.Body.OuterXml TestReport.Text = bodyResponse Imports System.Xml Imports Microsoft.Web.Services2 Imports Microsoft.Web.Services2.Addressing Imports Microsoft.Web.Services2.Messaging Imports System.Web Public Class MyHttpClient Inherits SoapClient Public msg As String = String.Empty Public LoadTesterForm As LoadTesterForm = Nothing Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub _ Public Function Hello_World(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml Hello_World = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) MyBase.FilterMessage(envelope) End Sub End Class
I am getting the response back with this code. Main problem is env.Body.InnerXml, Here we need to specify all the parameters & method name as XML. But i dont have parameter names. One solution to this problem might be i can generate proxy class at runtime. Can anybody guide me to the right direction? Thanks a lot Sumit Domyan Sumit Domyan -
Web Service - QueryHi All I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and a list of methods with parameters, he wants to execute and I have to get the results. I have some solution to this problem. Right now i am using WSE to solve this problem. My code is:
Dim env As SoapEnvelope Dim epr As EndpointReference Dim client As MyHttpClient Dim rs As SoapEnvelope Dim bodyResponse As String env = New SoapEnvelope env.Context.Addressing.Action = New Action("http://tempuri.com/TestWebService/MyService/HelloWorld") env.CreateBody() ** env.Body.InnerXml = String.Format("")** epr = New EndpointReference(New Uri("http://localhost/TestWebService/MyService.asmx")) client = New MyHttpClient(epr) rs = client.Hello\_World(env) bodyResponse = rs.Body.OuterXml TestReport.Text = bodyResponse
Imports System.Xml
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports System.WebPublic Class MyHttpClient
Inherits SoapClientPublic msg As String = String.Empty Public LoadTesterForm As LoadTesterForm = Nothing Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub \_ Public Function Hello\_World(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml Hello\_World = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) MyBase.FilterMessage(envelope) End Sub
End Class
I am getting the response back with this code. Main problem is env.Body.InnerXml, Here we need to specify all the parameters & method name as XML. But i dont have parameter names. One solution to this problem might be i can generate proxy class at runtime. Can anybody guide me to the right direction? Thanks a lot Sumit Domyan
-
Compiling C# Code at runtimeHi All Can i compile C# code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan
-
Compiling VB.NET Code at runtimeHi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan
-
Web Service - QueryIs this the only solution for getting response back. As i told you earlier, I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and the method he wants to execute and I have to get the results. Here we are building the full XML for a method, which i cannot do. Because i dont know what parameters a methods takes. User will give us following information:
WebService URI Method name with parameters: HelloWorld("Cristian","Ronaldo")
No other information, we can ask from user. Thanks a lot Sumit Domyan -
Web Service - QueryMy code is working fine now. Now i want to pass parameter in my HelloWorld web method. How can we pass parameters using SOAPEnvelope. Thanks for your kind help. Sumit Domyan
-
Web Service - QueryBut still i am getting the same error. Sumit Domyan
-
Web Service - QueryMy code is something like that: ------------------------------------------------------------------ Dim env As SoapEnvelope = New SoapEnvelope env.Context.Addressing.Action = New Action("http://analec.com/TestWebService/MyService/HelloWorld") env.CreateBody() env.Body.InnerXml = String.Format("") Dim epr As EndpointReference = New EndpointReference(New Uri("soap.tcp://localhost/TestWebService:80/MyService.asmx")) Dim client As MyHttpClient = New MyHttpClient(epr) Dim rs As SoapEnvelope = client.HelloWorld(env) Dim bodyResponse As String = rs.Body.OuterXml ------------------------------------------------------------------ ------------------------------------------------------------------ Option Explicit On Option Strict On Imports System.Xml Imports Microsoft.Web.Services2 Imports Microsoft.Web.Services2.Addressing Imports Microsoft.Web.Services2.Messaging Imports System.Web Public Class MyHttpClient Inherits SoapClient Public msg As String = String.Empty Public LoadTesterForm As LoadTesterForm = Nothing Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub _ Public Function HelloWorld(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml LoadTesterForm.TestReport.Text = msg HelloWorld = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) End Sub End Class ------------------------------------------------------------------ After executing this code i am getting an error message: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR MESSAGE: An unhandled exception of type 'Microsoft.Web.Services2.AsynchronousOperationException' occurred in microsoft.web.services2.dll Additional information: WSE101: An asynchronous operation raised an exception. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I think this something related to authentication. Do you have any idea? Thanks Sumit Domyan
-
Web Service - QueryThanks a lot for your reply. My code for sending a request through SOAPSender is working fine now. But i am not getting any response back. Can you please tell me how get response through SOAPReceiver. Sumit Domyan
-
Web Service - QueryHi All I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and the method he wants to execute and I have to get the results. I have some solution to this problem. Right now i am using WSE to solve this problem. My code is: Dim uriMe As Uri = New Uri("soap.tcp://localhost/TestWebService:80/MyService.asmx") Dim epMe As EndpointReference = New EndpointReference(uriMe) Dim receive As ReceiveData = New ReceiveData Dim sSend As SoapSender Dim env As SoapEnvelope Dim uriTo As Uri Dim epTo As EndpointReference receive.LoadTesterForm = Me SoapReceivers.Add(epMe, receive) sSend = New SoapSender env = New SoapEnvelope env.CreateBody() env.Context.Addressing.ReplyTo = New ReplyTo(uriMe) uriTo = New Uri(WebServiceURLTextBox.Text.Trim) epTo = New EndpointReference(uriTo) 'env.SetBodyObject("dosomething") 'env.Context.Addressing.To = New To(epTo.Address) env.Context.Addressing.Action = New Action("soap.tcp://localhost/TestWebService:80/MyService.asmx/HelloWorld") '"URI:http://localhost/TestWebService/MyService.asmx/HelloWorld") sSend.Destination = epTo ' CType(epTo, Microsoft.Web.Services2.Addressing.EndpointReference)() Try sSend.Send(env) Catch ex As Exception End Try Now i am getting an error with SOAP Action. What should we pass in a SOAP Action. If you could help me in this, that would be great. Waiting for reply, Thanks and Regards, Sumit Domyan
-
Web Service - QueryHi All I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and the method he wants to execute and I have to get the results. If any one could help me in this, that would be great. Waiting for reply, Sumit Domyan
-
List of Active Computers on NetworkHow would i get a list of all Active Computers on a network? All I need are the computer names. Method that i am currently using lists all computers even if they're not currently connected to the network. Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://CORP") Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry) Dim resEnt As SearchResult mySearcher.Filter = ("(objectClass=computer)") TotalNodesLabel.Text = "Total computers: " + mySearcher.FindAll.Count.ToString For Each resEnt In mySearcher.FindAll() If IsNothing(resEnt) = False Then ListOfNodesListBox.Items.Add(resEnt.GetDirectoryEntry().Name.ToString()) End If Next I was hoping to get a list of active computers, this method lists all computers even if they're not currently connected to the network. Thanks Sumit Domyan