Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
OstroSoft Winsock Component
 OstroSoft Forums : OstroSoft Winsock Component
Subject Topic: unable to send data successfully Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jimatqsi
Newbie
Newbie
Avatar

Joined: 21 June 2010
Location: United States
Online Status: Offline
Posts: 2
Posted: 21 June 2010 at 10:08pm | IP Logged Quote jimatqsi

I'm trying to get away from MSWinsck, so I installed
Ostrosoft. Using Ostrosoft control, the server connects
but refuses to accept the xml data I am sending,
returning an error description of "Data at the root
level is invalid. Line 1, position 1". So from the first
byte it doesn't like what it sees.

The same xml data is accepted by the Winsck control. All
I am changing when I switch controls is the name of the
control being used, and the method used to disconnect.

What could be the problem?

Thanks.

__________________
--
Jim
Back to Top View jimatqsi's Profile Search for other posts by jimatqsi Visit jimatqsi's Homepage
 
igor
Admin Group
Admin Group


Joined: 20 July 2005
Location: United States
Online Status: Offline
Posts: 252
Posted: 22 June 2010 at 4:13pm | IP Logged Quote igor

Looks like you are not retrieving all data
Create a class level variable, and concatenate it in OnDataArrival event
Then retrieve the entire string value on OnClose event

Back to Top View igor's Profile Search for other posts by igor Visit igor's Homepage
 
jimatqsi
Newbie
Newbie
Avatar

Joined: 21 June 2010
Location: United States
Online Status: Offline
Posts: 2
Posted: 23 June 2010 at 10:11pm | IP Logged Quote jimatqsi

Igor, I am not retrieving any data, I am only sending data.
A server program is to be receiving what I am sending. The
server program is replying with the error that I mentioned
in post #1.

Jim

__________________
--
Jim
Back to Top View jimatqsi's Profile Search for other posts by jimatqsi Visit jimatqsi's Homepage
 
igor
Admin Group
Admin Group


Joined: 20 July 2005
Location: United States
Online Status: Offline
Posts: 252
Posted: 29 June 2010 at 4:51pm | IP Logged Quote igor

Jim, have you tried sending smaller chunk of XML? Just to make sure it's not a problem with sending buffer size.

Also, try replacing hard returns (CR+LF) in your XML with soft returns (LF). Server my treat hard return as end-of-data command and will stop accepting data before entire XML is sent
Back to Top View igor's Profile Search for other posts by igor Visit igor's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.92
Copyright ©2001-2004 Web Wiz Guide