XML pasrsing error



  • when I am connecting to my service from android application, I am getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni



  • As said in the error message, your xml is invalid.

    On 19 August 2015 07:36:11 CEST, unnivm notifications@github.com wrote:

    when I am connecting to my service from android application, I am
    getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus
    xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the
    complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"
    xmlns:cal="urn:ietf:params:xml:ns:caldav"
    xmlns:cs="http://calendarserver.org/ns/"
    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1
    200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/613

    --
    Sent from my phone. Please excuse my brevity.



  • Hi Markus,

    I am not sure why the xml is invalid in this context. I would appreciate if
    you can give some direction what mistake I am doing while constructing XML.
    Currently I am developing a small Carddav server in Java and can be
    integrated with other web applications.

    Thanks,
    Unni

    On Wed, Aug 19, 2015 at 2:23 PM, Markus Unterwaditzer <
    notifications@github.com> wrote:

    As said in the error message, your xml is invalid.

    On 19 August 2015 07:36:11 CEST, unnivm notifications@github.com wrote:

    when I am connecting to my service from android application, I am
    getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus
    xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the
    complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"
    xmlns:cal="urn:ietf:params:xml:ns:caldav"
    xmlns:cs="http://calendarserver.org/ns/"

    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1
    200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/613

    --
    Sent from my phone. Please excuse my brevity.


    Reply to this email directly or view it on GitHub
    https://github.com/bitfireAT/davdroid/issues/613#issuecomment-132498196.

    --

    If not played, Free Sudoku Android Game
    https://play.google.com/store/apps/details?id=com.gamerfan.sudoku



  • Hi Markus,

    I forgot to update you one more thing that the same XML is working with my
    java test code

    Serializer serializer = new Persister();
    try {
    String content = "<?xml version="1.0" encoding="utf-8" ?><d:multistatus
    xmlns:d="DAV:" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="
    http://calendarserver.org/ns/"
    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1
    200 OK</d:status></d:propstat></d:response></d:multistatus>";
    ByteArrayInputStream bais = new ByteArrayInputStream(content.getBytes());
    DavMultistatus multiStatus = serializer.read(DavMultistatus.class, bais,
    false);
    System.out.println(multiStatus.response);
    } catch (Exception e) {
    e.printStackTrace();
    }

    Thanks,
    Unni

    On Wed, Aug 19, 2015 at 3:52 PM, unni mana unnivm@gmail.com wrote:

    Hi Markus,

    I am not sure why the xml is invalid in this context. I would appreciate
    if you can give some direction what mistake I am doing while constructing
    XML. Currently I am developing a small Carddav server in Java and can be
    integrated with other web applications.

    Thanks,
    Unni

    On Wed, Aug 19, 2015 at 2:23 PM, Markus Unterwaditzer <
    notifications@github.com> wrote:

    As said in the error message, your xml is invalid.

    On 19 August 2015 07:36:11 CEST, unnivm notifications@github.com wrote:

    when I am connecting to my service from android application, I am
    getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus
    xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the
    complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"
    xmlns:cal="urn:ietf:params:xml:ns:caldav"
    xmlns:cs="http://calendarserver.org/ns/"

    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1
    200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/613

    --
    Sent from my phone. Please excuse my brevity.


    Reply to this email directly or view it on GitHub
    https://github.com/bitfireAT/davdroid/issues/613#issuecomment-132498196
    .

    --

    If not played, Free Sudoku Android Game
    https://play.google.com/store/apps/details?id=com.gamerfan.sudoku

    --

    If not played, Free Sudoku Android Game
    https://play.google.com/store/apps/details?id=com.gamerfan.sudoku



  • Your Content-Length header seems off though.

    On 19 August 2015 12:22:24 CEST, unnivm notifications@github.com wrote:

    Hi Markus,

    I am not sure why the xml is invalid in this context. I would
    appreciate if
    you can give some direction what mistake I am doing while constructing
    XML.
    Currently I am developing a small Carddav server in Java and can be
    integrated with other web applications.

    Thanks,
    Unni

    On Wed, Aug 19, 2015 at 2:23 PM, Markus Unterwaditzer <
    notifications@github.com> wrote:

    As said in the error message, your xml is invalid.

    On 19 August 2015 07:36:11 CEST, unnivm notifications@github.com
    wrote:

    when I am connecting to my service from android application, I am
    getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus
    xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the
    complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"
    xmlns:cal="urn:ietf:params:xml:ns:caldav"
    xmlns:cs="http://calendarserver.org/ns/"

    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1

    200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/613

    --
    Sent from my phone. Please excuse my brevity.


    Reply to this email directly or view it on GitHub

    https://github.com/bitfireAT/davdroid/issues/613#issuecomment-132498196.

    --
    Sent from my phone. Please excuse my brevity.



  • thank you Markus,

    Now it is working and I am getting the message "Principal URL found from
    initial context path: /bt/admin/

    Yours Sincerely,
    Unni

    On Wed, Aug 19, 2015 at 4:04 PM, Markus Unterwaditzer <
    notifications@github.com> wrote:

    Your Content-Length header seems off though.

    On 19 August 2015 12:22:24 CEST, unnivm notifications@github.com wrote:

    Hi Markus,

    I am not sure why the xml is invalid in this context. I would
    appreciate if
    you can give some direction what mistake I am doing while constructing
    XML.
    Currently I am developing a small Carddav server in Java and can be
    integrated with other web applications.

    Thanks,
    Unni

    On Wed, Aug 19, 2015 at 2:23 PM, Markus Unterwaditzer <
    notifications@github.com> wrote:

    As said in the error message, your xml is invalid.

    On 19 August 2015 07:36:11 CEST, unnivm notifications@github.com
    wrote:

    when I am connecting to my service from android application, I am
    getting always XMLParsing error:
    "Unexpected end of file (position:START_TAG <d:multistatus
    xmlns:d=>@1:126 in java:io:InputStreamReader"

    This is my response xml for current user principal: Below is the
    complete response body with xml

    HTTP/1.1 207 Multi-Status
    Date: Wed Aug 19 10:36:59 IST 2015.
    Server: Test
    DAV:1, 3, extended=mkcol, addressbook
    Content-Length: 125
    Content-Type: text/xml; charset=iso-8859-1

    <?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"
    xmlns:cal="urn:ietf:params:xml:ns:caldav"
    xmlns:cs="http://calendarserver.org/ns/"

    xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:propstat><d:prop><d:current-user-principal><d:href>/bt/admin/</d:href></d:current-user-principal></d:prop><d:status>HTTP/1.1

    200 OK</d:status></d:propstat></d:response></d:multistatus>

    Please let me know what mistake I am doing here.

    Thanks
    Unni


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/613

    --
    Sent from my phone. Please excuse my brevity.


    Reply to this email directly or view it on GitHub

    <https://github.com/bitfireAT/davdroid/issues/613#issuecomment-132498196
    .

    --
    Sent from my phone. Please excuse my brevity.


    Reply to this email directly or view it on GitHub
    https://github.com/bitfireAT/davdroid/issues/613#issuecomment-132534053.

    --

    If not played, Free Sudoku Android Game
    https://play.google.com/store/apps/details?id=com.gamerfan.sudoku



  • I think this can be closed @devvv4ever


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.