| John Smith 2006-04-11, 8:11 am |
|
I've tried importing WSDL file in VS 8.0 and it failed (as I describer few
topics below this one). Now I wish to call web service without having WSDL
file and without importing it. This is Java example:
Document doc1 = parseXmlFile("C:/request.xml", true, false);
SOAPBodyElement[] input = new SOAPBodyElement[1];
input[0] = new SOAPBodyElement(doc1.getDocumentElement());
Options opts = new Options(args);
opts.setDefaultURL("http://www.example.com/SomeService/");
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new URL(opts.getURL()) );
Vector elems = (Vector) call.invoke( input );
SOAPBodyElement elem = null ;
Element e = null ;
elem = (SOAPBodyElement) elems.get(0);
e = elem.getAsDOM();
String str = XMLUtils.ElementToString(e);
its SOAP handling class taked XML document or XML element in constructor and
send it to some URL.
Does .Net have something like that? Plaese show me some example.
|