Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Send IQ Packet And Listen This Packet Result

$
0
0

Hi guys.Sorry for my english.I'm from Turkey.

I send iq packet openfire server.This code;

privatevoid sendIQPacket(final XMPPConnection connection,PacketTypeFilter filter) {    new Thread(new Runnable(){              
@Override      publicvoid run() {        
JsonObject mainList_Json = new JsonObject();        
mainList_Json            
.addProperty(                "cname",                "org.detaysoft.atomic.detayopenfireplugin.processor.externalprocessor.subprocessor.Business");        
mainList_Json.addProperty("mname", "getMainList");        
mainList_Json.addProperty("usid", "P0741");        
mainList_Json.addProperty("clid", "100");        byte[] encode = Base64            
.encodeBase64(mainList_Json.toString().getBytes());        final String Json_Base64 = new String(encode);        
IQ iqPacket = new IQ() {          
@Override          public String getChildElementXML() {            return"<pvcommand>"                
+ "<sendClassName>TumKullanicilar</sendClassName>"                
+ "<sendMethodName>mainList</sendMethodName>"                
+ "<spvcommand>" + Json_Base64                
+ "</spvcommand></pvcommand>";          }        };           
iqPacket.setType(IQ.Type.GET);        
iqPacket.setPacketID("pvrequest");        
connection.sendPacket(iqPacket);        
Log.d("info", "IQ Paketin gönderildi");                }            }).start();     }  

 

and i want listen this packet result.i use this method;

publicclass IQInterceptor implements PacketInterceptor {            @Override          publicvoid interceptPacket(Packet packet) {                    if(packet.getPacketID().equals("pvrequest")){                              Log.d("interceptor",packet.toXML());                    }            }  } 

 

but i take this output.(this send me)

<iq id="pvrequest" type="get"><pvcommand><sendClassName>TumKullanicilar</sendClassName><sendMethodName>mainList</sendMethodName><spvcommand>eyJjbmFtZSI6Im9yZy5kZXRheXNvZnQuYXRvbWljLmRldGF5b3BlbmZpcmVwbHVnaW4ucHJvY2Vzc29yLmV4dGVybmFscHJvY2Vzc29yLnN1YnByb2Nlc3Nvci5CdXNpbmVzcyIsIm1uYW1lIjoiZ2V0TWFpbkxpc3QiLCJ1c2lkIjoiUDA3NDEiLCJjbGlkIjoiMTAwIn0=</spvcommand></pvcommand></iq>

i want this output(server send i see openfire interface).

SENT: <iq type="result" id="pvrequest" to="100#p0741@sivasdetay.com/Smack" from="sivasdetay.com"><pvcommand xmlns="detayopenfireplugin:iq:customiq"><spvcommand>jdMxDsIwDAXQu3ju4CR2HLMhwcACRS0T4iSIu0OXklRV9DdHeorybef5psdResource : Smack
0OdGBRjYJNNA0H+ff
MS7l+X69LTXTZ1jhvgmNGVkS78MUW2ghglALCB2EzFXgVEH3TRhWENape1AdhE17+m+UPxQ0TA9q
cRC6YTBnGBYQOgitnnUfRhSCDW9G2IfojYKGUbQ9Cs7aMhqmoGFKRiG4PQYvRQZTN/96C19f</spvcommand><sendClassName>TumKullanicilar</sendClassName><sendMethodName>mainList</sendMethodName></pvcommand></iq>

 

please help me


Viewing all articles
Browse latest Browse all 10742

Trending Articles