Sunil Rawat

Sunil Rawat

  • NA
  • 25
  • 11.8k

URI formats are not supported

Apr 2 2015 9:22 AM

I am implementing webservices API. I am sending request in xml form in which some credentials coming from database and on the response of my request I am getting xml form feedback. I am using SOMee server for testing when i am running my program i am getting an error "URI formats are not supported". Please help me to resolve my query. For referenece i am pasting my code.

 if (oDataSet.Tables[0].Rows.Count > 0)
{
XmlWriter oXmlWriter = XmlWriter.Create("http://impertosolutions.somee.com//MobileAPI_XML//MobileBookingRequest.xml");

oXmlWriter.WriteStartDocument();

oXmlWriter.WriteStartElement("ReprintRequest");
oXmlWriter.WriteStartElement("UserTrackID");
oXmlWriter.WriteString(oDataSet.Tables[0].Rows[0]["OrderId"].ToString());
oXmlWriter.WriteEndElement();
oXmlWriter.WriteEndDocument();

oXmlWriter.Close();
XmlDocument oXmlDocument= new XmlDocument();
oXmlDocument.Load("http://impertosolutions.somee.com//MobileAPI_XML//MobileBookingRequest.xml");
StringWriter oStringWriter= new StringWriter();
XmlTextWriter oXmlTextWriter= new XmlTextWriter(oStringWriter);
oXmlDocument.WriteTo(oXmlTextWriter);
Response.ContentType="text/xml";
lstrInput = oXmlDocument.OuterXml;
lobjServ.REPRINT(lobjSec, lstrInput, ref lstrOutput, ref lstrError);
}

Answers (4)