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);
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);