Calling web services with out WSDL

Hai experts,
 Here am facing a difficult scenario..We have a client.
we need to call his web services to our biztalk orchestration.
He provided only proxy class, he hasn't provided "WSDL".
Now he is asking us to call his methods.How can we
call his methods with out knowing WSDL?
Do u guys have any ideas?thanks in advance..
Needed Urgently
sandydv85Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sandydv85Author Commented:
I can't understand the logic,is there any other links to elaborate it?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
sandydv85Author Commented:
I have gone through both the sites before,please give me any  ideas.
using httpwebrequest how can i call my methods that are present
in my proxy class.am having proxy class but no ( asmx location and wsdl file)
0
 
masterpassCommented:
am having proxy class but no ( asmx location --------> you mean you don't have a URL to call the web service ?
0
 
sandydv85Author Commented:
yes exactly..
0
 
sandydv85Author Commented:
here am having proxy class,how can i call my own proxy class?
I dont know where user credentials are located.How can i?
0
 
Alfred A.Commented:
Have you tried using a SOAP Client Class to send a message directly to a web service?  Check the code below.  I hope this helps.

Example:

SOAP Client Class and a ReturnResponse function:



<SoapServiceAttribute("urn:Sample")> _
Public Class SOAPServiceClient
    Inherits SoapClient

    Public Sub New(ByVal [to] As Uri)
        MyBase.New([to])
    End Sub 'New

    Public Delegate Function SendFunctionHandler(ByVal messsage As SoapEnvelope) As SoapEnvelope

    Private ResponseHandler As SendFunctionHandler = AddressOf SendFunction

    ' This method represents a web service operation for sending a SOAP message
    <SoapMethod("")> _
    Public Function SendYourMessage(ByVal message As SoapEnvelope) As SoapEnvelope
        'Return CType(MyBase.SendRequestResponse("SampleAsyncResponseService", message).GetBodyObject(GetType(String), SoapServiceAttribute.TargetNamespace), String)
        Dim AsyncResult1 As System.IAsyncResult
        AsyncResult1 = ResponseHandler.BeginInvoke(message, Nothing, Nothing)

        While Not AsyncResult1.IsCompleted
            System.Threading.Thread.Sleep(1)
        End While

        Return ResponseHandler.EndInvoke(AsyncResult1)

    End Function

    <SoapMethod("")> _
    Public Function SendFunction(ByVal message As SoapEnvelope) As SoapEnvelope
        'Return CType(MyBase.SendRequestResponse("SampleAsyncResponseService", message).GetBodyObject(GetType(String), SoapServiceAttribute.TargetNamespace), String)
        Return CType(MyBase.SendRequestResponse("SampleAsyncResponseService", message), SoapEnvelope)
    End Function
End Class


SOAP Client Class Instantiation:


Private Function ReturnYourResponse(ByVal SEnv As Sample.Envelope) As String
        Try
           
            Dim proxy As New SOAPServiceClient(New Uri("http://whateveristhisnotASMX/webservice"))
        
            Dim Env As New SoapEnvelope
            Env.SetBodyObject(SEnv)

            Dim myContext As SoapContext = Env.Context
            Dim token As New UsernameToken("username", "password", PasswordOption.SendPlainText)
            myContext.Security.Actor = "http://schemas.xmlsoap.org/soap/actor/next"
            myContext.Security.MustUnderstand = False
            myContext.Security.Tokens.Add(token)
            Env.Context = myContext

            Dim ReturnedSoapEnv As SoapEnvelope = proxy.SendFunction(Env)

            Return ConvertXmlToString(ReturnedSoapEnv.Body)  
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function

Open in new window

0
 
sandydv85Author Commented:
Hai actually i was not clear with my requirement..thanks for wasting u r time
0
 
sandydv85Author Commented:
I was not fully clear about my requirement..
0
All Courses

From novice to tech pro — start learning today.