Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all,

I got a webservice from a third party.They have assigned a URL.(Not wsdl nor asmx). Sample url:http://100.100.100.100/services/spm

If i give the url in browser, it shows.

Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here..


Now all i need is to access the service in the given url. They alredy got my ip address for authendication puprose. I am using asp.net c#

Now, How can i call the Webservice in that URL?
Could anybody give some idea? Please let me know, if you need more information.

Thanks in advance.
Posted

1 solution

Hi,

ITs possible using MSXML terminology


XML
Hi,

Yes it is possible with msxml. The below code is a complete working code where you have to replace with values that u want.

strDetail = "XMLHTTP"
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
With objXMLHTTP
    strDetail = "POST"
    .Open "POST", mstrMethod, False

    strXML = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
    "<soap:Envelope" & _
    " xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""" & _
    " xmlns:xsd=""http://www.w3.org/2001/XMLSchema""" & _
    " xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/""" & _
    " xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
    "<soap:Body soap:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"" >" & _
    "<MethodName xmlns="" http://webservicenamespace/Service/"">" & _
    "<argument1>" arg "</argument1>" & _
    "<argument2>" agr1 "</argument2>" & _
    "</MethodName >" & _
    "</soap:Body>" & _
    "</soap:Envelope>"

    strDetail = "SET REQUEST HEADER"
    .setRequestHeader "Content-Type", "text/xml"
    .setRequestHeader "encoded", "true"
    .setRequestHeader "encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/"
    .setRequestHeader "SOAPAction", mstrMethod

    strDetail = "SEND XML"
    .send (strXML)

    strDetail = "RESPONSE"
    strResponse = .responseText
    strDetail = "loadXML"
    objDom.loadXML strResponse

End With
strDetail = "RETURN VALUE"
Set objNode = objDom.getElementsByTagName("return")

Reply Quote
 
Share this answer
 
Comments
thirisangu 26-Oct-12 5:45am    
Thanks for your replay. There was some problem in our request message.
Now everything is okay. :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900