Reading WSDL for Remoting (MetaData.ConvertSchemaStreamT­oCodeSourceStream)

M

Mike Lee

Getting Exception: "Root element is missing"

I'm trying to use remoting to build an assembly based on a given wsdl.
I've pieced together how to do this based on docs and some hints on
msdn. Although doesn't seem like anyone has posted a walkthrough
anywhere. I use HttpWebRequest for security purposes since we have
anonymous shut off on our web services.


When I output the stream to string I notice backslashes in front of all

the quotes and carriage return newlines at various points. I've used
Altova's XML Spy to validate, but i would not say it was well formed
till I removed all the CRNLs and backslashes. I tried to do the same
in the code but still got the same exception. ANy help, tips, pointer
would be great. I've posted the base code below:


System.Net.HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(WsdlUrl);
request.Credentials = CredentialCache.DefaultCredentials;


HttpWebResponse response = (HttpWebResponse)request.GetResponse();
receiveStream = response.GetResponseStream();


MetaData.ConvertSchemaStreamToCodeSourceStream(true, path + "tmp",
receiveStream, fileList);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top