久久久久久久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ì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我正在嘗試使用最新的 Smackx 中繼來(lái)獲取并訂閱一個(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ì)象,所以我的代碼片段可能看起來(lái)很有趣,但也許有人能告訴我我忘記了什么.

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)通過(guò)檢查我的 openfire 服務(wù)器使用的數(shù)據(jù)庫(kù)來(lái)驗(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 還沒(méi)有讓 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)過(guò)一些實(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)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(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ù)庫(kù))
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對(duì)象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 亚洲综合日韩精品欧美综合区 | 亚洲毛片在线观看 | 亚洲视频在线一区 | 视频一区 亚洲 | 亚洲国产免费 | 日本超碰| 超碰日本 | 亚洲天堂一区 | 亚洲国产精久久久久久久 | 91精品国产色综合久久不卡98 | 国产不卡在线观看 | 欧美 日韩 国产 在线 | 永久av | 黄色片在线看 | 欧美黄色小视频 | 成av在线| 99精品欧美一区二区蜜桃免费 | 成人国产a | 剑来高清在线观看 | 一级毛片在线看 | 国产精品日韩欧美一区二区 | 在线观看av网站永久 | h视频网站在线观看 | 中文字幕日韩欧美 | 在线欧美小视频 | 大乳boobs巨大吃奶挤奶 | a在线视频观看 | 玖玖爱365 | 国产精品99久久久久久人 | 亚洲福利一区 | 亚洲精品高清视频在线观看 | 日韩羞羞 | 亚洲精品电影在线观看 | 欧州一区 | 国产精品亚洲成在人线 | 亚洲精品久久 | www.日韩 | 日韩在线精品视频 | 国产精品黄 | 亚洲欧美自拍偷拍视频 | 国产电影一区二区在线观看 |