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

嘗試使用 Smackx pubsub 獲取節點時未找到項目(404

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

問題描述

我正在嘗試使用最新的 Smackx 中繼來獲取并訂閱一個 pubsub 節點.但是,openfire 只是向我發送了一個錯誤:找不到項目 (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 實例化 java 對象,所以我的代碼片段可能看起來很有趣,但也許有人能告訴我我忘記了什么.

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.

這是我創建節點的方式:

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);

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

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");

創建節點后,我似乎可以像這樣發布到它:

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);

但是,導致我的代碼出錯的是 getNode() 調用.

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

我已經通過檢查我的 openfire 服務器使用的數據庫來驗證正在創建節點.我可以在那里看到它們,正確地歸因于葉節點等.

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 發送和接收消息方面取得了巨大成功,而 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 類還有第二個方法,它接受兩個參數,一個連接和一個 to 參數.顯然 Openfire 需要這個 to 參數,經過一些實驗,我發現它可以使用 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");

這篇關于嘗試使用 Smackx pubsub 獲取節點時未找到項目(404)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數據庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 99色播| 最新高清无码专区 | 精品国产鲁一鲁一区二区张丽 | 午夜看片 | 成年人的视频免费观看 | 免费高清成人 | www.欧美视频 | 欧美在线观看一区二区 | 免费精品一区 | 一区二区高清 | 97伦理电影| 日韩精品久久一区 | 一区二区三区在线观看免费视频 | 国产h视频 | 国内精品久久久久久久 | 97超在线视频 | 亚洲高清免费视频 | 亚洲国产精品一区二区第一页 | 天天干天天操 | 天天操夜夜操 | 久草免费电影 | 国产91在线观看 | 国产精品久久久久久久久久 | 在线免费观看视频黄 | 国产一级片av | 羞羞视频网页 | 在线免费观看日本 | 亚洲精品二区 | 精品久久99| 人人鲁人人莫人人爱精品 | 色天堂影院 | 中文字幕一区二区三区四区五区 | 欧美色欧美亚洲另类七区 | 精品一区视频 | 精品一区二区久久久久久久网站 | 久久小视频 | 久久久精品高清 | 久久99久久99精品免视看婷婷 | 国产免费福利小视频 | 日韩视频在线播放 | 欧美亚洲国产精品 |