@@ -396,6 +396,29 @@ function setError($str)
396396 $ this ->error_str = $ str ;
397397 }
398398
399+ /**
400+ * gets the charencoding setting that controls whether special characters are encoded as XML entities
401+ *
402+ * @return boolean
403+ * @access public
404+ */
405+ function getCharencoding ()
406+ {
407+ return $ this ->charencoding ;
408+ }
409+
410+ /**
411+ * sets the charencoding setting
412+ *
413+ * @param boolean $charencoding Whether to encode special characters as XML entities in expandEntities()
414+ * @return void
415+ * @access public
416+ */
417+ function setCharencoding ($ charencoding )
418+ {
419+ $ this ->charencoding = $ charencoding ;
420+ }
421+
399422 /**
400423 * detect if array is a simple array or a struct (associative array)
401424 *
@@ -7476,6 +7499,8 @@ function __construct($endpoint, $wsdl = false, $proxyhost = false, $proxyport =
74767499 $ this ->endpoint = $ this ->wsdl ->wsdl ;
74777500 $ this ->wsdlFile = $ this ->endpoint ;
74787501 $ this ->debug ('existing wsdl instance created from ' . $ this ->endpoint );
7502+ // propagate charencoding to wsdl
7503+ $ this ->wsdl ->setCharencoding ($ this ->charencoding );
74797504 $ this ->checkWSDL ();
74807505 } else {
74817506 $ this ->wsdlFile = $ this ->endpoint ;
@@ -7770,6 +7795,8 @@ function loadWSDL()
77707795 $ this ->debug ('instantiating wsdl class with doc: ' . $ this ->wsdlFile );
77717796 $ this ->wsdl = new wsdl ('' , $ this ->proxyhost , $ this ->proxyport , $ this ->proxyusername , $ this ->proxypassword , $ this ->timeout , $ this ->response_timeout , $ this ->curl_options , $ this ->use_curl );
77727797 $ this ->wsdl ->setCredentials ($ this ->username , $ this ->password , $ this ->authtype , $ this ->certRequest );
7798+ // propagate charencoding to wsdl
7799+ $ this ->wsdl ->setCharencoding ($ this ->charencoding );
77737800 $ this ->wsdl ->fetchWSDL ($ this ->wsdlFile );
77747801 $ this ->checkWSDL ();
77757802 }
0 commit comments