http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php
I have an intranet web service I know is working as I use it from
other clients.
but am getting this error when trying the example:
Getting error: ORA-30625: method dispatch on NULL SELF argument is
disallowed.
on this line:
l_fullname := soap_api.get_return_value(p_response => l_response,
p_name => 'yyyResult',
p_namespace =>
'xmlns:ns1="urn:http://www.xxx.net/"');
which calls this in the soap_api package i downloaded and installed
from the stie:
FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
p_name IN VARCHAR2,
p_namespace IN VARCHAR2)
RETURN VARCHAR2 AS
--
---------------------------------------------------------------------
BEGIN
RETURN p_response.doc.extract('//'||p_name||'/
child::text()',p_namespace).getstringval();
END;
--
--------------------------------------------------------------------
My test script:
declare
l_request soap_api.t_request;
l_response soap_api.t_response;
l_fullname varchar2(50);
BEGIN
l_request := soap_api.new_request(p_method => 'ns1:yyy',
p_namespace =>
'xmlns:ns1="urn:http://www.xxx.net"');
soap_api.add_parameter(p_request => l_request,
p_name => 'userName',
p_type => 'xsd:string',
p_value => 'somestring');
l_response := soap_api.invoke(p_request => l_request,
p_url => 'http://64.186.30.53/
securityservice/service.asmx',
p_action => 'http://www.xxx.net/
yyy');
-- failing on the below line(21)
l_fullname := soap_api.get_return_value(p_response => l_response,
p_name => 'yyyResult',
p_namespace =>
'xmlns:ns1="urn:http://www.xxx.net/"');
dbms_output.put_line(l_fullname);
end;
Thanks for any help or information!!
Tim does host a technical forum on his site, link is on the left side
of the page you posted...
jg
--
@home.com is bogus.
"They are the monorails of this decade: the wrong technology, totally
overpromised and completely undelivered." - Anthony Townsend on
municipal wi-fi http://www.foxnews.com/story/0,2933,274728,00.html
RETURN p_response.doc.extract('//'||p_name||'/
child::text()',p_namespace).getstringval();
within the get_return_value function is what is raising this error.
Stick something like
if l_response.doc is null then
dbms_output.put_line('opps, the doc is null');
end if;
into your code just before the call to get_return_value to see.
Thank you. l_reponse is not null. Sorry new to Oracle and XML, how do
I convert (or cast) a type .doc to string so you can display it? I
want to display l_response
Please explain what you intended when you wrote "a type .doc to string."
--
Daniel A. Morgan
University of Washington
damo...@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Thank you. l_reponse is not null. Sorry new to Oracle and XML, how do
fyi, l_response looks like this. When I run the webservice with http
post it returns a value. I
<GetFullNameResponse xmlns="http://www.xxx.net/">
<GetFullNameResult/>
</GetFullNameResponse>
when I run the web service via http. it returns:
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://www.xxx.net/">Bob Jones</string>
The reason I'm looking for GetFullNameResult is the wsdl:
- <s:element name="GetFullName">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="userName"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetFullNameResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetFullNameResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>