久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

嘗試使用 Smackx pubsub 獲取節(jié)點(diǎn)時(shí)未找到項(xiàng)目(404

item-not-found(404) when trying to get a node using Smackx pubsub(嘗試使用 Smackx pubsub 獲取節(jié)點(diǎn)時(shí)未找到項(xiàng)目(404))
本文介紹了嘗試使用 Smackx pubsub 獲取節(jié)點(diǎn)時(shí)未找到項(xiàng)目(404)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在嘗試使用最新的 Smackx 中繼來獲取并訂閱一個(gè) pubsub 節(jié)點(diǎn).但是,openfire 只是向我發(fā)送了一個(gè)錯(cuò)誤:找不到項(xiàng)目 (404).

I'm trying to use the latest Smackx trunk to get and then subscribe to a pubsub node. However, openfire just sends me a back an error: item not found (404).

我正在從 ColdFusion 實(shí)例化 java 對(duì)象,所以我的代碼片段可能看起來很有趣,但也許有人能告訴我我忘記了什么.

I am instantiating the java objects from ColdFusion, so my code snippets might look funny but maybe someone will be able to tell me what I've forgotten.

這是我創(chuàng)建節(jié)點(diǎn)的方式:

Here's how I create the node:

    ftype = createObject("java", "org.jivesoftware.smackx.pubsub.FormType");
    cform = createObject("java", "org.jivesoftware.smackx.pubsub.ConfigureForm").init(ftype.submit);
    cform.setPersistentItems(true);
    cform.setDeliverPayloads(true);
    caccess = createObject("java", "org.jivesoftware.smackx.pubsub.AccessModel");
    cform.setAccessModel(caccess.open);
    cpublish = createObject("java", "org.jivesoftware.smackx.pubsub.PublishModel");
    cform.setPublishModel(cpublish.open);
    cform.setMaxItems(99);

    manager = createObject("java", "org.jivesoftware.smackx.pubsub.PubSubManager").init(XMPPConnection);

    myNode = manager.createNode("subber", cform);

這就是我試圖達(dá)到它的方式(在不同的代碼部分中):

And here's how I am trying to get to it (in a different section of code):

    manager = createObject("java", "org.jivesoftware.smackx.pubsub.PubSubManager").init(XMPPConnection);
    myNode = manager.getNode("subber");

創(chuàng)建節(jié)點(diǎn)后,我似乎可以像這樣發(fā)布到它:

Immediately upon creating the node I seem to be able to publish to it like so:

    payload = createObject("java", "org.jivesoftware.smackx.pubsub.SimplePayload").init("book","pubsub:test:book","<book xmlns='pubsub:test:book'><title>Lord of the Rings</title></book>");
    item = createObject("java", "org.jivesoftware.smackx.pubsub.Item").init(payload);
    myNode.publish(item);

但是,導(dǎo)致我的代碼出錯(cuò)的是 getNode() 調(diào)用.

However, it is the getNode() call that is causing my code to error.

我已經(jīng)通過檢查我的 openfire 服務(wù)器使用的數(shù)據(jù)庫來驗(yàn)證正在創(chuàng)建節(jié)點(diǎn).我可以在那里看到它們,正確地歸因于葉節(jié)點(diǎn)等.

I have verified that the nodes are being created by checking the DB used by my openfire server. I can see them in there, properly attributed as leaf nodes, etc.

有什么建議嗎?還有其他人在用 XMPP 和 ColdFusion 做任何事情嗎?我在使用 CF 發(fā)送和接收消息方面取得了巨大成功,而 Smack 還沒有讓 pubsub 工作:)

Any advice? Anyone else out there doing anything with XMPP and ColdFusion? I have had great success sending and receiving messages with CF and Smack just haven't had the pubsub working yet :)

謝謝!

推薦答案

已回答:

PubSubManager 類還有第二個(gè)方法,它接受兩個(gè)參數(shù),一個(gè)連接和一個(gè) to 參數(shù).顯然 Openfire 需要這個(gè) to 參數(shù),經(jīng)過一些實(shí)驗(yàn),我發(fā)現(xiàn)它可以使用 pubsub.your.xmpp.address

There is a second method on the PubSubManager class that accepts two arguments, a connection and a to parameter. Apparently Openfire requires this to parameter and after some experimenting i discovered that it works using pubsub.your.xmpp.address

manager = createObject("java", "org.jivesoftware.smackx.pubsub.PubSubManager").init(XMPPConnection,"pubsub.127.0.0.1");

這篇關(guān)于嘗試使用 Smackx pubsub 獲取節(jié)點(diǎn)時(shí)未找到項(xiàng)目(404)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動(dòng)生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對(duì)象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 欧美a级成人淫片免费看 | 日韩一区二区三区四区 | 亚洲欧美精品 | 黄色免费在线视频 | 国产精品毛片久久久久久久 | 香蕉成人 | www.一级片| 中国女人真人一级毛片 | 亚洲一级特黄 | 国产精品久久久久久中文字 | 精品国产欧美一区二区三区成人 | 天堂中文在线视频 | 亚洲成人免费av | 激情丁香婷婷 | 一区二区三区在线看 | 国产一区二区在线播放 | 四虎在线播放 | av网站免费在线观看 | 精品国产99 | 久久黄色大片 | 国产成人精品一区二区三区视频 | 午夜激情网| 国产伦精品一区二区三区88av | 狠狠干天天操 | 免费看的毛片 | 欧美极品在线 | 草逼视频免费看 | 欧美一二区| 激情网站在线观看 | 欧美色图一区二区 | 精品一区二区三区在线观看 | 美女综合网 | 欧美激情免费 | 小镇姑娘国语版在线观看免费 | 黄色一级片黄色一级片 | 成人在线免费看 | 国产伦精品一区二区三区免.费 | 四级黄色片 | 在线观看黄色片 | www.久久久久久 | 日本黄色免费网站 |