Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,255
Total Threads: 81,240
Total Posts: 566,980
There are 142 users currently browsing (tf).
  Our Partners:
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

NuSoap - Return UTF-16

Thread title: NuSoap - Return UTF-16
    Thread tools Search this thread Display Modes  
04-13-2013, 02:37 AM
Sketch is offline Sketch
Sketch's Avatar
Status: Member
Join date: Aug 2005
Location: Melbourne, Australia
Posts: 419
iTrader: 0 / 0%

Sketch is on a distinguished road

  Old  NuSoap - Return UTF-16

I've got a problem with a NuSoap server I'm trying to setup;


$server = new soap_server();
$server->configureWSDL('SoapService', $namespace);
$server->wsdl->schemaTargetNamespace = $namespace;
$server->soap_defencoding = 'UTF-8';

    array('GetServiceInfoResult' => 'xsd:string'),
    'Read service properties.'


function getServiceInfo() {
    $oDom = new DOMDocument();

    $oElement = $oDom->createElement('SampleResponse', 'HelloWorld');


    $response = $oDom->saveXML();

    return $response;

The call to the service works fine - however I cannot return a UTF-16 Encoded XML document. As per the specification I'm working to it's required to be UTF-16.

If I change the DOM Encoding to UTF-8 it's happy days and Fiddler (Network sniffer) shows the correct response. But UTF-16 and I get this;

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC=""><SOAP-ENV:Body><ns1:GetServiceInfoResponse xmlns:ns1=""><GetServiceInfoResult xsi:type="xsd:string">&lt;
Where &lt; is my UTF-16 string.

I'm sure there is a setting in NuSoap I'm needing to change to get this working but I can't find out where it is?


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed