-
Web Service - Query
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 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks