Skip to content

XMPP BOSH HttpBinding fails on CreateSession ("Response acknowledgement invalid.") #14

@andfussel

Description

@andfussel

hi
sorry if i am wrong here... i'm new to github.

i try to create a windows-client app to connect with cisco finesse. its noti system is based on XMPP/BOSH. when i try to use the XmppClient with XmppCredentials including UriEndpoint it always ends up with a exception while connecting (in OnConnectionError-handler): "Response acknowledgement invalid."

i've had a closer look at https://github.com/PeterWaher/IoTGateway/blob/master/Networking/Waher.Networking.XMPP.BOSH/HttpBinding.cs:
in CreateSession() when building the XML-body the rid is calculated like this:
Xml.Append((this.rid++).ToString());
this will result in first reading rid and writing it to xml and then rid will be count up. so the local rid will be one bigger than the rid in xml-body.
after responding th "ack"-flag is checked;

case "ack":
	if (!long.TryParse(Attr.Value, out long l) ||
		l != this.rid)
	{
		throw new Exception("Response acknowledgement invalid.");
	}

and its of cause not equal to rid :(

not sure if i am missing some thing, or its simply a typo (should be ++rid)

don't grill me if i completely misunderstood your code or XMPP/BOSH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions