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

LPX-00249: invalid external ID declaration

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

LPX-00249: invalid external ID declaration

Postby charlibraun » Mon May 13, 2013 10:03 am

I have tried an example from

http://www.oracle-base.com/articles/9i/ ... ces-9i.php

soap_api and add_numbers

but i have an error parsing xml, on instruction l_response.doc := XMLTYPE.createxml(l_envelope);

I dont understand it, i have tried the example without modifications, only add the proxy, but i have errors...

ORA-31011: XML parsing failed
LPX-00249: invalid external ID declaration

-------------------------------------
-- ---------------------------------------------------------------------
FUNCTION invoke(p_request IN OUT NOCOPY t_request,
p_url IN VARCHAR2,
p_action IN VARCHAR2)
RETURN t_response AS
-- ---------------------------------------------------------------------
l_envelope VARCHAR2(32767);
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_response t_response;

--// these variables need to be set if web access
--// is via a proxy server
proxyServer varchar2(50) := '172.16.0.8:8080';
--proxyUser varchar2(20) default null;
--proxyPass varchar2(20) default null;
proxyURL varchar2(4000);

BEGIN
generate_envelope(p_request, l_envelope);
show_envelope(l_envelope, 'Request');


dbms_output.put_line (utl_http.get_proxy();

--// configure for web proxy access if applicable
if proxyServer is not null then
utl_http.set_proxy( proxyServer );
end if;

l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.1');
UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
UTL_HTTP.write_text(l_http_request, l_envelope);
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_envelope);
UTL_HTTP.end_response(l_http_response);
show_envelope(l_envelope, 'Response');
l_response.doc := XMLTYPE.createxml(l_envelope);
l_response.envelope_tag := p_request.envelope_tag;
l_response.doc := l_response.doc.extract('/'||l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/child::node()',
'xmlns:'||l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"');
check_fault(l_response);
RETURN l_response;
END;

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Mon May 13, 2013 10:50 am

Hi.

It sounds to me like the addition of the proxy stuff means you are failing to return the value, then you are trying to use the XML functionality against that and it is failing.

To prove this, you need to look out the output from the "show_envelope(l_envelope, 'Response');" before the XMLTYPE creation. I bet you will find it is HTML saying "Page Not Found". That means you are not getting through your proxy server to the web server.

When trying to diagnose web service problems, you must *always* look at the contents of the request and response documents.

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

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Mon May 13, 2013 11:33 am

thank you for the answer Tim,

this is the html, what does it means? what is the reason that not work?

i have set the proxy...
what is the reason that im not getting response through proxy if i set it

*****Request*****
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instan
ce" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><soap:Body>
<ws_add xmlns="http://www.oracle-base.com/webservices/" soap
:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><
int1 xsi:type="xsd:integer">1</int1><int2 xsi:type="xsd:inte
ger">2</int2></ws_add></soap:Body></soap:Envelope>
*****Response*****
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<HTML><HEAD><TITLE>Error Message</TITLE>
<META http-equ
iv=Content-Type content="text/html; charset=UTF-8">
<STYLE
id=L_default_1>A {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COL

OR: #005a80; FONT-FAMILY: tahoma
}
A:hover {
FONT-WEIGHT

: bold; FONT-SIZE: 10pt; COLOR: #0d3372; FONT-FAMILY: tahoma

}
TD {
FONT-SIZE: 8pt; FONT-FAMILY: tahoma
}
TD.title
Border {
BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955

319 1px solid; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SI
ZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LEFT: #955319 0px s
olid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT
-FAMILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TE
XT-ALIGN: left
}
TD.titleBorder_x {
BORDER-RIGHT: #95531

9 0px solid; BORDER-TOP: #955319 1px solid; PADDING-LEFT: 8p
x; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middl
e; BORDER-LEFT: #955319 1px solid; COLOR: #978c79; BORDER-BO
TTOM: #955319 1px solid; FONT-FAMILY: tahoma; HEIGHT: 35px;
BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left
}
.TitleDescri
ption {
FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: black;

FONT-FAMILY: tahoma
}
SPAN.explain {
FONT-WEIGHT: normal

; FONT-SIZE: 10pt; COLOR: #934225
}
SPAN.TryThings {
FON

T-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225
}
.TryLi
st {
MARGIN-TOP: 5px; FONT-WEIGHT: normal; FONT-SIZE: 8pt;

COLOR: black; FONT-FAMILY: tahoma
}
.X {
BORDER-RIGHT:

#955319 1px solid; BORDER-TOP: #955319 1px solid; FONT-WEIGH
T: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid;
COLOR: #7b3807; BORDER-BOTTOM: #955319 1px solid; FONT-FAMIL
Y: verdana; BACKGROUND-COLOR: #d1c2b4
}
.adminList {
MAR

GIN-TOP: 2px
}
</STYLE>
<META content="MSHTML 6.00.2800.1
170" name=GENERATOR></HEAD>
<BODY bgColor=#f3f3ed>
<TABLE
cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>

<TD class=titleborder_x width=30>
<TABLE height
=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black>

<TBODY>
<TR>
<TD class=x vAlign=cen
ter align=middle>X</TD>
</TR>
</TBODY>

</TABLE>
</TD>
<TD class=titleBorder id=L_defa
ult_2>Network Access Message:<SPAN class=TitleDescription> T
he page cannot be displayed</SPAN> </TD>
</TR>
</TBODY
>
</TABLE>

<TABLE id=spacer>
<TBODY>
<TR>
<TD
height=10></TD></TR></TBODY></TABLE>
<TABLE width=400>

<TBODY>
<TR>
<TD noWrap width=25></TD>
<TD widt
h=400><SPAN class=explain><ID id=L_default_3><B>Explanation:
</B></ID></SPAN><ID id=L_default_4> There is a problem with
the page you are trying to reach and it cannot be displayed.
</ID><BR><BR>
<B><SPAN class=tryThings><ID id=L_defaul
t_5><B>Try the following:</B></ID></SPAN></B>
<UL cl
ass=TryList>
<LI id=L_default_6><B>Refresh page:</B
> Search for the page again by clicking the Refresh button.
The timeout may have occurred due to Internet congestion.
<
LI id=L_default_7><B>Check spelling:</B> Check that you type
d the Web page address correctly. The address may have been
mistyped.
<LI id=L_default_8><B>Access from a link:</B> If
there is a link to the page you are looking for, try accessi
ng the page from that link.

</UL>
<ID id=L_default
_9>If you are still not able to view the requested page, try
contacting your administrator or Helpdesk.</ID> <BR><BR>

</TD>
</TR>
</TBODY>
</TABLE>

<TABLE id=spacer>
<TBODY><TR><TD height=15></TD></TR></TBODY></TABLE>

<TABL
E width=400>
<TBODY>
<TR>
<TD noWrap width=25></T
D>
<TD width=400 id=L_default_10><B>Technical Informati
on (for support personnel)</B>
<UL class=adminList>


<LI id=L_default_11>Error Code: 407 Proxy Authentic
ation Required. The ISA Server requires authorization to ful
fill the request. Access to the Web Proxy filter is denied.
(12209)
<LI id=L_default_12>IP Address: 172.16.0.8
<LI id=
L_default_13>Date: 5/13/2013 8:04:35 AM [GMT]
<LI id=L_defa
ult_14>Server: SRVISA.RAWEC.LOCAL
<LI id=L_default_15>Sourc
e: proxy

</UL>
</TD>
</TR>
</TBODY>
</T
ABLE>

</BODY>
</HTML>

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Mon May 13, 2013 12:18 pm

Hi.

Save the text below the "*****Response*****" line as a ".htm" file and open it in a browser. You will be able to read it for yourself. When you do, you will see (as I suspected) you are not actually reaching the web service. Your proxy server authentication is the problem.

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

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Mon May 13, 2013 3:57 pm

Thank you again.

But i dont understand it

when i execute the instruction l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.1'); without setproxy, it gives me an error.

but when i include the instruction utl_http.set_proxy( proxyServer ); UTL_HTTP.begin_request works.

I debug the program and i can see that UTL_HTTP.begin_request works

¿It means that proxy is seted ok?

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Mon May 13, 2013 4:25 pm

Hi.

No.

Without setting the proxy, the request just fails because there is no route to the web service. There is nothing on your network that can respond to the request because my server is not on your network.

When you set the proxy, you are sending your request to the proxy and asking it to sent the request to the external machine for you. Provided the proxy exists, this will result in a positive result for the request from your program. This does not mean the proxy has been able to pass on the work for you, just that your request was successfully sent to the proxy. The way you determine if the proxy was able to carry out the work is to look at the result it send back. In this case it clearly tells you it has not processed your request because you did not authenticate against the proxy.

Think of it like this. I SSH a server and it gives me a password prompt. Does that mean I can use the server to run commands? Only if I type in the correct username/password. If not, I get an error message and I'm unable to run my commands. The situation you are in with the proxy is similar. You can connect to the proxy, but you can not pass request through to the outside world because you have not authenticated. Do you understand?

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

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Tue May 14, 2013 6:24 am

Thanks again, very good explanation.

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Tue May 14, 2013 6:33 am

:)
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

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Tue May 14, 2013 9:54 am

I dont know why proxy doesnt seted ok, i talk with network administrator and gives me proxy url, usr and pass but doesnt work

my code:

proxyServer varchar2(500) := 'http://interface:rawec.766@172.16.0.8:8080/';

GetproxyServer varchar2(500);
GetproxyDomain varchar2(500);

BEGIN
...

utl_http.set_proxy( proxyServer,null);

....

utl_http.get_proxy(GetproxyServer,GetproxyDomain );

--DBMS_OUTPUT.put_line('----------------------------------------------------------------');
--DBMS_OUTPUT.put_line(GetproxyServer);
--DBMS_OUTPUT.put_line(GetproxyDomain);

i check that get_proxy return corret proxy:

----------------------------------------------------------------
http://interface:rawec.766@172.16.0.8:8080/

----------------------------------------------------------------
but im still have the proxy error on html:

Error Code: 407 Proxy Authentic
ation Required. The ISA Server requires authorization to ful
fill the request. Access to the Web Proxy filter is denied.



Now.

Im trying to call a webservice in my network, where proxy is dont needed, but now im having this message

*****Request*****
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instan
ce" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><soap:Body>
<GetPISnapshotData xmlns="http://xml.osisoft.com/services/PI
DataService" soap:encodingStyle="http://schemas.xmlsoap.org/
soap/encoding/"><parameters xsi:type="tns:ArrayOfString">pi:
\\NAGPI2012\</parameters></GetPISnapshotData></soap:Body></s
oap:Envelope>
*****Response*****
The server cannot service the request because the media type
is unsupported.


What it means? the data type is not supported???

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Tue May 14, 2013 10:15 am

Hi.

Sorry. I don't know. I don;t work behind a proxy, so I have no way of testing this.

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

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Tue May 14, 2013 10:16 am

it happens with proxy setted and without setted

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Tue May 14, 2013 10:16 am

Tim... wrote:Hi.

Sorry. I don't know. I don;t work behind a proxy, so I have no way of testing this.

Cheers

Tim...


OK thank you for all your help :)

charlibraun
Member
Posts: 11
Joined: Tue Apr 30, 2013 3:11 pm

Re: LPX-00249: invalid external ID declaration

Postby charlibraun » Tue May 14, 2013 10:17 am

do you know that?

*****Response*****
The server cannot service the request because the media type
is unsupported.

What it means? the data type is not supported???

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

Re: LPX-00249: invalid external ID declaration

Postby Tim... » Tue May 14, 2013 1:12 pm

Hi.

No. This is a response from your proxy server. I don't work with a proxy server so I would never have seen they type of response.

Google the message. The first link it returns looks promising!

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