15,890,579 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Ramya singam (Top 5 by date)
Ramya singam
21-Feb-13 5:40am
View
no..I have used the web service like
string url = "http://localhost:9716/PersonService.svc/DeleteRole";
req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/xml; charset=utf-8";
req.Timeout = 30000;
req.Headers.Add("SOAPAction", url);
req.Accept = "application/xml";
var xmlDoc = new XmlDocument { XmlResolver = null };
xmlDoc.Load(Server.MapPath("AssignRole.xml"));
string sXml = xmlDoc.InnerXml;
req.ContentLength = sXml.Length;
var sw = new StreamWriter(req.GetRequestStream());
sw.Write(sXml);
sw.Close();
res = (HttpWebResponse)req.GetResponse();
Stream responseStream = res.GetResponseStream();
var streamReader = new StreamReader(responseStream);
//Read the response into an xml document
var soapResonseXmlDocument = new XmlDocument();
soapResonseXmlDocument.LoadXml(streamReader.ReadToEnd());
lblMessage.Text = soapResonseXmlDocument.InnerXml;
Ramya singam
20-Feb-13 4:36am
View
what bindings we have to set for client. i have given bindings only in service web.config file and hosted that service in IIS. i did not set any bindings in client.
Regards,
Ramya.
Ramya singam
8-Feb-13 2:39am
View
Oh..I have solved myself...any way thank you
Ramya singam
8-Feb-13 1:59am
View
i have fixed the above issue by retuning string xml from service.but i have another problem while converting xmlstring into dataset, the dataset retuns null..
i don't know why it is retuning null.please help me
i am sharing my service method code and consuming code...
DataSet dsBuildSQL = new DataSet();
StringBuilder sbSQL;
StringWriter swSQL;
string XMLformat;
sbSQL = new StringBuilder();
swSQL = new StringWriter(sbSQL);
dsBuildSQL.Merge(DTtemp, true, MissingSchemaAction.AddWithKey);
dsBuildSQL.Tables[0].TableName = "Table";
foreach (DataColumn col in dsBuildSQL.Tables[0].Columns)
{
col.ColumnMapping = MappingType.Attribute;
}
dsBuildSQL.WriteXml(swSQL, XmlWriteMode.IgnoreSchema);
XMLformat = sbSQL.ToString();
return XMLformat;
//.Net application code
StringReader xmlReader = new StringReader(soapResonseXmlDocument.InnerXml);
DataSet ds = new DataSet();
ds.ReadXml(xmlReader);
gvView.DataSource = ds.Tables[0];
gvView.DataBind();
Ramya singam
7-Feb-13 7:51am
View
This is my code...
HttpWebRequest req = null;
HttpWebResponse res = null;
try
{
const string url = "http://localhost:4567/PersonServiceImpl.svc/auth";
req = (HttpWebRequest) WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/xml; charset=utf-8";
req.Timeout = 30000;
req.Headers.Add("SOAPAction", url);
var xmlDoc = new XmlDocument {XmlResolver = null};
xmlDoc.Load(Server.MapPath("PostData.xml"));
string sXml = xmlDoc.InnerXml;
req.ContentLength = sXml.Length;
var sw = new StreamWriter(req.GetRequestStream());
sw.Write(sXml);
sw.Close();
res = (HttpWebResponse) req.GetResponse(); //I got Error here
Stream responseStream = res.GetResponseStream();
var streamReader = new StreamReader(responseStream);
//Read the response into an xml document
var soapResonseXmlDocument = new XmlDocument();
soapResonseXmlDocument.LoadXml(streamReader.ReadToEnd());
//return only the xml representing the response details (inner request)
TextBox1.Text = soapResonseXmlDocument.InnerXml;
//Response.Write(soapResonseXMLDocument.InnerXml);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}