Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_HTTP and spanish characters like Ñ

lfmaciasDec 3 2014 — edited Dec 9 2014


Hi, we have the following PLSQL piece of code working right in order to invoke a WCF httpBasicBinding service :

req := UTL_HTTP.begin_request(

'http://myserver/myWCF/OrdenesService.svc', 'POST');


UTL_HTTP.set_header('Content-Type', 'text/xml;charset=UTF-8');

utl_http.set_response_error_check(true);

utl_http.set_detailed_excp_support(true);

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <OrdenTO xmlns:d3p1="http://schemas.datacontract.org/2004/07/EPM.SCOServices.TO.Ordenes" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://epm.scoservices.core.ordenesservice/2013/08" >   
      <d3p1:Categoria>2</d3p1:Categoria>
      <d3p1:Ciclo>20</d3p1:Ciclo>
      <d3p1:Consumo>0</d3p1:Consumo>
      <d3p1:Correria>3333333</d3p1:Correria>
      <d3p1:CuentasVencidas>0</d3p1:CuentasVencidas>
      <d3p1:Direccion>CR 1000 CL 100 B -42</d3p1:Direccion>
      <d3p1:Factura>222222</d3p1:Factura>
      <d3p1:Fecha>2014/10/21</d3p1:Fecha>
      <d3p1:Instalacion>44444444444444444</d3p1:Instalacion>
      <d3p1:LecturaActual>181</d3p1:LecturaActual>
      <d3p1:MarcaSerieMedidor>0</d3p1:MarcaSerieMedidor>     
      <d3p1:NombreCliente>JOSE CALIMENO</d3p1:NombreCliente>
      <d3p1:NombreContacto></d3p1:NombreContacto>
      <d3p1:NumeroDeOrden>20355366</d3p1:NumeroDeOrden>
      <d3p1:NumeroServicioSuscrito>114154580</d3p1:NumeroServicioSuscrito>
      <d3p1:SubCategoria>2</d3p1:SubCategoria>
      <d3p1:Subtitulo>SUSPENCION</d3p1:Subtitulo>
      <d3p1:TelefonoContacto></d3p1:TelefonoContacto>
      <d3p1:TipoCo<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>

   UTL_HTTP.set_header(req, 'SOAPAction', sopaaction);

    /*INDICAMOS EN EL HEADER EL TAMAÑO DEL MENSAJE ENVIADO: */

    UTL_HTTP.set_header(req, 'Content-Length', LENGTHB(reqXML));

UTL_HTTP.write_text(req,reqXML  );

   resp := UTL_HTTP.GET_RESPONSE(req);

The problem begins in some  cases when one of the xml arributtes contains special characters like Ñ, below i give you an example:

      <d3p1:NombreCliente>JOSE CALIMEÑO</d3p1:NombreCliente>

so the UTL_HTTP responses:

29269 ORA-29269: HTTP server error 500 - Internal Server Error

As you can see the error is general error, and it does not provide much information as you expected.

My database version is Oracle 9i.

Any information will be appreciate.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2015
Added on Dec 3 2014
3 comments
2,645 views