New Message on dotNET User Group Hyd

how to import xsd inside wsdl @ runtime - urgent help required

Reply
  Reply to Sender   Recommend Message 3 in Discussion
From: johnsonsmithy2k2

When you create the Web service proxy that uses Typed DataSet, the Typed DataSet does not correctly import secondary schemas. Instead of using the expected secondary schema, the returned schema imports a schema with an arbitrary name such as _app1.xsd. Because of an incorrect secondary schema name, the tools such as WSDL.exe or Microsoft Visual Studio .NET cannot correctly create a proxy for the Web service. Also, the returned XML cannot be serialized back to a corresponding Typed DataSet instance. If you try to do this, the result is an XmlSchemaException.
 
To work around this problem, return the Typed DataSet that you want as an XmlElement in your WebMethod. In your client, you can explicitly load the returned XML to an instance of the Typed DataSet that you want. The following code is an example for WebMethod:
[WebMethod]
public System.Xml.XmlElement GetTypedDataSet ()
{
// Create an instance of Typed DataSet.
MyTypedDataSet myDs = new MyTypedDataSet ();

// Add some data to the DataSet.
System.Data.SqlClient.SqlConnection myCn =new System.Data.SqlClient.SqlConnection("Persist Security Info=False;User ID=<username>;Password=<password>;Initial Catalog=pubs;Data Source=SQLServer;Packet Size=4096");
myCn.Open();
System.Data.SqlClient.SqlDataAdapter myDa = new System.Data.SqlClient.SqlDataAdapter("Select * from Employee", myCn);
myDa.Fill(myDs, myDs.Tables[1].TableName);

// Return the DataSet as an XmlElement.
System.Xml.XmlDataDocument xdd = new System.Xml.XmlDataDocument (myDs);
System.Xml.XmlElement docElem = xdd.DocumentElement;
return docElem ;
}
 
 
If you still not clear with this.. please see the following URL.
 
I hope, this will solve ur problem
thanx,
Smith

View other groups in this category.

Click her
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to