Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pass txtComputer.Text to class file Pin
epfuller20-Jun-05 6:04
epfuller20-Jun-05 6:04 
QuestionHow can I use WH_MOUSE_LL with Windows 98? Pin
Begoña17-Jun-05 4:44
Begoña17-Jun-05 4:44 
AnswerRe: How can I use WH_MOUSE_LL with Windows 98? Pin
Dave Kreskowiak17-Jun-05 5:44
mveDave Kreskowiak17-Jun-05 5:44 
GeneralMy new article Pin
Ahmed Erarslan17-Jun-05 4:29
Ahmed Erarslan17-Jun-05 4:29 
GeneralInterface Problem Pin
Anonymous17-Jun-05 3:11
Anonymous17-Jun-05 3:11 
GeneralRe: Interface Problem Pin
J4amieC17-Jun-05 3:18
J4amieC17-Jun-05 3:18 
GeneralCompiler for native code - Open-source project challenge! Pin
Anonymous17-Jun-05 3:05
Anonymous17-Jun-05 3:05 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Roger Alsing17-Jun-05 4:15
Roger Alsing17-Jun-05 4:15 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Daniel Turini17-Jun-05 8:27
Daniel Turini17-Jun-05 8:27 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Roger Alsing17-Jun-05 10:51
Roger Alsing17-Jun-05 10:51 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Daniel Turini20-Jun-05 4:40
Daniel Turini20-Jun-05 4:40 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
DavidNohejl17-Jun-05 13:59
DavidNohejl17-Jun-05 13:59 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Daniel Turini17-Jun-05 22:37
Daniel Turini17-Jun-05 22:37 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
DavidNohejl18-Jun-05 2:26
DavidNohejl18-Jun-05 2:26 
GeneralRe: Compiler for native code - Open-source project challenge! Pin
Daniel Turini18-Jun-05 4:01
Daniel Turini18-Jun-05 4:01 
GeneralTo maintain hyperlinks while converting from smart doc to pdf Pin
Member 188835217-Jun-05 3:00
Member 188835217-Jun-05 3:00 
Generalc++ to c# and marshalling Pin
savage_16-Jun-05 23:41
savage_16-Jun-05 23:41 
GeneralRe: c++ to c# and marshalling Pin
tom_dx17-Jun-05 2:20
tom_dx17-Jun-05 2:20 
GeneralSize Of a Managed Object Pin
Andre Trollip16-Jun-05 20:58
Andre Trollip16-Jun-05 20:58 
GeneralRe: Size Of a Managed Object Pin
S. Senthil Kumar16-Jun-05 23:51
S. Senthil Kumar16-Jun-05 23:51 
GeneralRe: Size Of a Managed Object Pin
Andre Trollip17-Jun-05 0:30
Andre Trollip17-Jun-05 0:30 
GeneralRe: Size Of a Managed Object Pin
DavidNohejl17-Jun-05 3:40
DavidNohejl17-Jun-05 3:40 
GeneralInstaller CustomAction in managed code Pin
mav.northwind16-Jun-05 20:49
mav.northwind16-Jun-05 20:49 
Generalon using dataset Pin
ppp00116-Jun-05 19:05
ppp00116-Jun-05 19:05 
GeneralWeb Service - Query Pin
Sumit Domyan16-Jun-05 18:56
Sumit Domyan16-Jun-05 18:56 
Hi 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("<HelloWorld xmlns=""http://tempuri.com/TestWebService/MyService/"" />")
        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

    <SoapMethod("http://tempuri.com/TestWebService/MyService/HelloWorld")> _
    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

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.