nanoterabeta
asked on
"There is an error in XML document (1, 431)" what does it mean???
i write a perl code as a web service client using SOAP::Lite, it works fine in most cases.
When the server throw out the messege: "There is an error in XML document (1, 431)"
and the inner explanation is "Input string was not in a correct format"
what i want to know is what (1,431) means ??
according to the answer, can experts identify where i format it incorrectly ???
my exact XML document sent to the server is:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1" >
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-24854782 ">
<wsu:Created>2008-04-04T09 :43:45Z</w su:Created >
<wsu:Expires>2008-04-04T09 :43:45Z</w su:Expires ></wsu:Tim estamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-3105 6583">
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">pass</wsse:Passwor d>
<wsse:Username>USER</wsse: Username>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<SetAccumulatorValue xmlns="http://mywebsite.com/soap">
<request>
<SubscriberId>912345678</S ubscriberI d><Identit y/>
<Accumulator>ACC_Recharge< /Accumulat or>
<AccumulatorValue>a</Accum ulatorValu e>
</request>
</SetAccumulatorValue>
</soapenv:Body>
</soapenv:Envelope>
When the server throw out the messege: "There is an error in XML document (1, 431)"
and the inner explanation is "Input string was not in a correct format"
what i want to know is what (1,431) means ??
according to the answer, can experts identify where i format it incorrectly ???
my exact XML document sent to the server is:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1"
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-24854782
<wsu:Created>2008-04-04T09
<wsu:Expires>2008-04-04T09
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-3105
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">pass</wsse:Passwor
<wsse:Username>USER</wsse:
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<SetAccumulatorValue xmlns="http://mywebsite.com/soap">
<request>
<SubscriberId>912345678</S
<Accumulator>ACC_Recharge<
<AccumulatorValue>a</Accum
</request>
</SetAccumulatorValue>
</soapenv:Body>
</soapenv:Envelope>
The (1,431) means the error is on line 1, character 431. I don't see any problems with the XML you posted though.
ASKER
hey genius,
1. my XML is formated correctly, the problem is with input string only, i'm asking what string causes the problem.
2. you said line 1, character 431, so:
2.1 what is the first line and where the second line begins ?
2.2 each tag makes a line or the whole XML document makes a line ?
2.3. do you have any docs to reference that your answer right ?
1. my XML is formated correctly, the problem is with input string only, i'm asking what string causes the problem.
2. you said line 1, character 431, so:
2.1 what is the first line and where the second line begins ?
2.2 each tag makes a line or the whole XML document makes a line ?
2.3. do you have any docs to reference that your answer right ?
The lines end with the new line character, \n. Unless you've set $/ to something different.
I didn't see anything in the documentation that states that this error is for (line,character), but have found out through experience.
I didn't see anything in the documentation that states that this error is for (line,character), but have found out through experience.
ASKER
thanks, so you don't know what a "line" is in a XML document either.
hope that the answer will come from those who know.
hope that the answer will come from those who know.
Unless you've set $/, a line ends with the new line character, which is "\n", ascii character 10.
In an XML document, there could be a newline almost anywhere, and it still be a valid document.
In an XML document, there could be a newline almost anywhere, and it still be a valid document.
ASKER
2.1 what is the first line and where the second line begins ?
If the XML you posted is what you are referring to, then the first line is:
<?xml version="1.0" encoding="UTF-8"?>
And the second line is:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?xml version="1.0" encoding="UTF-8"?>
And the second line is:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
to shivaspk: thanks for your post, i'll study what you suggested
i can make sure it is not a null request error,
if there is one, there will be a response like "empty request error...'
to adam314: so what is the character 431 you've mentioned in the first line ???
i can make sure it is not a null request error,
if there is one, there will be a response like "empty request error...'
to adam314: so what is the character 431 you've mentioned in the first line ???
The xml you posted doesn't have a 431 character on the first line. Is the XML you posted exactly what is causing errors?
ASKER
yeah, it exactly causes errors, genius
I don't see an error with the syntax of the XML. There might be an error with the content though.
ASKER
yeah, this is what i'm asking
nanoterabeta, I fell that the error is not coming for this message, can you check the exact message when you got that error.
ASKER
this is the exact XML document which causes the error,
maybe the server parsed and identified the error before sent back the error message
maybe the server parsed and identified the error before sent back the error message
ASKER
don't pay attention to Adam314 genius because
<?xml version="1.0" encoding="UTF-8"?>
can not be the first line
i even met the error message that says
There is an error in XML document (1, 1158)
or even bigger
he only spams the forum the get statistics
<?xml version="1.0" encoding="UTF-8"?>
can not be the first line
i even met the error message that says
There is an error in XML document (1, 1158)
or even bigger
he only spams the forum the get statistics
ASKER
Adam314 is a forum spammer