Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:11:19+00:00 2026-06-18T12:11:19+00:00

I am building a XMPP chat client app with eclipse, java and asmack. Using

  • 0

I am building a XMPP chat client app with eclipse, java and asmack. Using tutorials and many many google searches I managed to get the buddy list working, actual chatting also works fine.
My problem is with searching for more buddies to add to my contacts list. The XML to send is exemplified here : http://xmpp.org/extensions/xep-0055.html
My request is :

<iq
id="search123"
from="name3@webserv.xxx.com/name3"
to="search.xxx.zzz.com"
type="set" >
<query xmlns="jabber:iq:search" >
    <nick>
android
    </nick>
</query>
</iq>

the response I thought I was getting was/is this:

<iq
id="search123"
from="search.xxx.zzz.com"
to="name3@webserv.telebroad.com/Smack"
type="result" >
</iq>

But using
connConfig.setDebuggerEnabled(true);
(and an online Telnet Client) I managed to find out that the server IS actually working correctly and it’s sending the requested results, but I’m just getting what you see above.
I have been at this for 4 days and my self esteem is quite low 😛
Here is my code concerning the IQ request and response:

Packet asdf = new Packet() {
                    @Override
                    public String toXML() {
                        return    "<iq type='set'"+
                                " from='name3@webserv.xxx.com/name3'"+
                                " to='search.xxx.zzz.com'"+
                                " id='search2'"+
                                " xml:lang='en'>"+
                              " <query xmlns='jabber:iq:search'>"+
                                " <nick>Android</nick>"+
                              " </query>"+
                            " </iq>";
                    }
                };


ChatList.connection.sendPacket(asdf);
                Log.e("packet", "request = "+ asdf.toXML());
                PacketFilter filter = new IQTypeFilter(IQ.Type.RESULT);
                ChatList.connection.addPacketListener(new PacketListener() {
                    public void processPacket(Packet packet) {
                        IQ iq = (IQ)packet;


                        Log.e("response","incoming packet : "+ packet.toXML());
                        Log.e("response","incoming packet2 : "+ packet.toString());

                    }
                }, filter);  

I’ve tried lots of TypeFilters to no avail. I’m stumped!!

Bottom line:

1.request is being accepted correctly by server;

2.server response is correct(so says the debugger);

3.any response.toString or toXML prints out the type result XML from above(without the actual items after type=’result’>.

4.I am about a week overdue on my final build for this app…help! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:11:19+00:00Added an answer on June 18, 2026 at 12:11 pm

    https://stackoverflow.com/a/14214622/1688731
    This…just works!!!! I have no idea why. maybe Iterator iterator = row.getValues("jid"); does the trick. But everything else, I’ve tried a LOT of times!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using asmack xmpp client in an android app I am working on
Building an app using a calendar on a Google Apps domain that has SSL
I'm building a chat application using OpenFire server and JSJaC client library. The page
Building an Android application using Google's GCM service. I have implemented the onRegistered method
Building my first web app using Yii and wondering if it is best to
I am building a chat app and I have problem with the MultiUserChat class.
I am building an iOS app based on XMPP. When I send an XMPP
So, i'm building a small application using Rails. I need to use XMPP proto
Building a lottery scratch-card app in Java. Have allot of it done, just need
I'm building a small program that acts as an XMPP client and I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.