In encode and decode with default WireFormat, use WireFormat::getDefaultWireFormat()
diff --git a/ndn-cpp/Interest.hpp b/ndn-cpp/Interest.hpp
index 24ef36e..449c0e5 100644
--- a/ndn-cpp/Interest.hpp
+++ b/ndn-cpp/Interest.hpp
@@ -146,7 +146,7 @@
   }
   ptr_lib::shared_ptr<std::vector<unsigned char> > encode() const 
   {
-    return encode(BinaryXmlWireFormat::getInstance());
+    return encode(*WireFormat::getDefaultWireFormat());
   }
   void decode(const unsigned char *input, unsigned int inputLength, WireFormat &wireFormat) 
   {
@@ -154,7 +154,7 @@
   }
   void decode(const unsigned char *input, unsigned int inputLength) 
   {
-    decode(input, inputLength, BinaryXmlWireFormat::getInstance());
+    decode(input, inputLength, *WireFormat::getDefaultWireFormat());
   }
   void decode(const std::vector<unsigned char> &input, WireFormat &wireFormat) 
   {
diff --git a/ndn-cpp/data.hpp b/ndn-cpp/data.hpp
index 883331f..bb616fb 100644
--- a/ndn-cpp/data.hpp
+++ b/ndn-cpp/data.hpp
@@ -90,7 +90,7 @@
   }
   ptr_lib::shared_ptr<std::vector<unsigned char> > encode() const 
   {
-    return encode(BinaryXmlWireFormat::getInstance());
+    return encode(*WireFormat::getDefaultWireFormat());
   }
   void decode(const unsigned char *input, unsigned int inputLength, WireFormat &wireFormat) 
   {
@@ -98,7 +98,7 @@
   }
   void decode(const unsigned char *input, unsigned int inputLength) 
   {
-    decode(input, inputLength, BinaryXmlWireFormat::getInstance());
+    decode(input, inputLength, *WireFormat::getDefaultWireFormat());
   }
   void decode(const std::vector<unsigned char> &input, WireFormat &wireFormat) 
   {