This forum is currently locked. You can't register or post questions at this time. (read more)

LPX-00231: invalid character 47

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Srinivas
Senior Member
Posts: 185
Joined: Mon Nov 08, 2004 10:14 am
Location: UK

LPX-00231: invalid character 47

Postby Srinivas » Thu Jun 07, 2012 9:17 am

Hi Tim

my code is like this

Code: Select all


INSERT INTO XXHCC_STAGING_XML   VALUES  ((XMLTYPE (SOAP_REQUEST)), SYSDATE,'Street_Events_GetLOB SOAP Request');
COMMIT;
dbms_lob.createtemporary(soap_respond, true);
               
HTTP_RESP := UTL_HTTP.GET_RESPONSE (HTTP_REQ);
   
      while not(eob)
            loop
                begin     
                        UTL_HTTP.READ_TEXT (HTTP_RESP, buffer, 32767);                 
                        if buffer is not null and length(buffer)>0 then
                        dbms_lob.writeappend(SOAP_RESPOND, length(buffer), buffer);
                end if;
            exception when UTL_HTTP.END_OF_BODY then
               eob := true;
                end;
            end loop;
 UTL_HTTP.END_RESPONSE (HTTP_RESP);
SOAP_RESPOND := XMLTYPE(SOAP_RESPOND).EXTRACT('/soap:Envelope/soap:Body/Streets_Events_GetResponse/Streets_Events_GetResult/text()',
                                    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/",
                                    xmlns="http://webapi/"').GETCLOBVAL();
         
Xml_Result := XMLTYPE(DBMS_XMLGEN.CONVERT(SOAP_RESPOND, DBMS_XMLGEN.ENTITY_DECODE));
     
INSERT INTO XXHCC_STAGING_XML VALUES ( Xml_Result, sysdate,'Street_Events_GetLOB SOAP Response' );
Commit;
[code]

It works most of the time, but for one of the records i got this error and i couldnt find anything on the net, let me tell you the individual webservice works fine returning the soap response in the browser.

[code]
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00231: invalid character 47 ('/') found in a Name or Nmtoken


Any idea what is causing this

Thanks

S

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: LPX-00231: invalid character 47

Postby Tim... » Thu Jun 07, 2012 12:07 pm

Hi.

Looks at the XML document you are handling and check it is valid.

There is not a lot I can do with your code sample because I can't actually run it. If you want me to look at something like this you've got to send a working test case that I can run ini isolation from your system.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

Srinivas
Senior Member
Posts: 185
Joined: Mon Nov 08, 2004 10:14 am
Location: UK

Re: LPX-00231: invalid character 47

Postby Srinivas » Thu Jun 07, 2012 1:14 pm

Hi Tim

I know what is causing this, I think the soap response which i get is more than 64k and when i do this bit in my code

Code: Select all


-- SOAP_RESPOND := XMLTYPE(SOAP_RESPOND).EXTRACT('/soap:Envelope/soap:Body/Streets_Events_GetResponse/Streets_Events_GetResult/text()',
--                                    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/",
--                                    xmlns="http://webapi/"').GETCLOBVAL();
         
-- Xml_Result := XMLTYPE(DBMS_XMLGEN.CONVERT(SOAP_RESPOND, DBMS_XMLGEN.ENTITY_DECODE));
         
        INSERT INTO XXHCC_STAGING_XML VALUES (xmltype(soap_respond), sysdate,'Street_Events_GetLOB SOAP Response' );
        Commit;

          --StResult :=Xml_Result;
          StResult := xmltype(soap_respond);



My procedure when run from sql plus works fine, i can see the whole output, but the moment i go to TOAD and do a refresh of my staging table i get this

Code: Select all

OCI - 31167 XML Nodes over 64K in Size Cannot be Inserted


My staging table has xmltype column, do you think i shuld change it to CLOB

If i change it to clob type, my data would be stored without encoding i mean with & , lt ,gt tags rather than the actual xml.

If someone calls my procedure they still would have to do encoding to xml and then it would fail bcos its more than 64k, Is my understanding right here.

How do we overcome this limitation?

S

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: LPX-00231: invalid character 47

Postby Tim... » Thu Jun 07, 2012 5:06 pm

Hi.

It seems you have hit a limitation in 10g.

XMLTYPE Limited to 64k But DBMS_LOB.GETLENGTH() Returns Misleading Size in 9.2 When Clob > 64k [ID 421152.1]

https://support.oracle.com/CSP/main/art ... d=421152.1

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle SQL and PL/SQL Development”

Who is online

Users browsing this forum: No registered users and 6 guests

cron