For Programmers: Free Programming Magazines  


Home > Archive > C# > April 2006 > Reading WSDL for Remoting (MetaData.ConvertSchemaStreamToCodeSourceStream)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reading WSDL for Remoting (MetaData.ConvertSchemaStreamToCodeSourceStream)
mikelee516@gmail.com

2006-04-25, 7:09 pm

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(tr
ue, path + "tmp",
receiveStream, fileList);

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com