krishna chava
Forum Replies Created
-
AuthorPosts
-
krishna chavaParticipant
Thank you Jesse, It worked for me.
1 more question, can you let me know how to reduce the resolution?
Right now i am getting the fax with very good resolution. Thanks for the immediate responses.
krishna chavaParticipantI fixed the issue. Thanks for your help,
Its the issue in xml file
Instead of <organization> i have created my xml with <Organization>.
I never expected a small difference in the case will error.
Hope this will help other users.
Right now i am able to send plain text with the help of your sample.
Can any one provide me any sample to fax a pdf that i have on my server machine. I will be gr8 ful if i get sample of xml for this one. i tried changing xml tags as below… bug giving error 400.
<attachment>
<location>C:Krishnaxml files</location>
<name>mypdffile.pdf</name>
<content_type>application/pdf</content_type>
krishna chavaParticipantI am trying to implement the functionality in a webapplication using vb.net. But i am getting the below error:
The RemoteServer returned an error:(400) Bad Request.
I used the same xml file and below is my code: Can any one of you please help me in this issue…
Dim url As String = “http://10.0.0.250/ffws/v1/ofax”
‘Dim request As HttpWebRequest = DirectCast(Net.WebRequest.Create(url), HttpWebRequest)
Dim request As HttpWebRequest
request = HttpWebRequest.Create(“http://10.0.0.280/ffws/v1/ofax”)
request.Credentials = New NetworkCredential(“userid”, “xyz”)
request.Method = “POST”
request.ContentType = “text/xml”
Dim fileSize As New FileInfo(“C:Userskrishnadocumentsvisual studio 2010ProjectsWebApplication5WebApplication5schedule.xml”)
Dim len As Integer = CInt(fileSize.Length)
Dim textIn As New StreamReader(New FileStream(“C:Userskrishnadocumentsvisual studio 2010ProjectsWebApplication5WebApplication5schedule.xml”, FileMode.Open, FileAccess.Read))
Dim TextLines As String = textIn.ReadToEnd()
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(TextLines)
‘request.ContentLength = len
request.ContentLength = byteArray.Length
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
textIn.Close()
dataStream.Close()
Dim response As HttpWebResponse = request.GetResponse()
‘Console.WriteLine(DirectCast(response, HttpWebResponse).StatusDescription)
‘ Label1.Text = (DirectCast(response, HttpWebResponse).StatusDescription)
Dim data As Stream = response.GetResponseStream()
Dim reader As New StreamReader(data)
Dim responseFromServer As String = reader.ReadToEnd()
‘Label2.Text = responseFromServer
reader.Close()
data.Close()
response.Close()
I will be gr8full if i get a solution for this.
Thank you,
Krishna.
krishna chavaParticipantThank your very much for the code.
-
AuthorPosts