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

Some problem with web services and pl-sql

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Some problem with web services and pl-sql

Postby Eremita » Fri May 25, 2012 3:03 pm

Hi guy,

this is my first post in this site and i hope in a help....

I must do a call to web service from pl-sql. I did read this article: http://www.oracle-base.com/articles/9i/ ... ces-9i.php.
Into article, the call to web service is easy, i try this and it work.

Now, i try to do the call at this web service: http://www.webservicex.com/globalweather.asmx?WSDL with my function:

Code: Select all

CREATE OR REPLACE FUNCTION qualcosa (city  IN  VARCHAR2, country  IN  VARCHAR2)
  RETURN VARCHAR2
AS
  l_request   soap_api.t_request;
  l_response  soap_api.t_response;
  l_return    VARCHAR2(32767);
 
  l_url          VARCHAR2(32767);
  l_namespace    VARCHAR2(32767);
  l_method       VARCHAR2(32767);
  l_soap_action  VARCHAR2(32767);
  l_result_name  VARCHAR2(32767);
BEGIN
  l_url         := 'http://www.webservicex.com/globalweather.asmx/';
  l_namespace   := 'xmlns="http://www.webserviceX.NET/"';
  l_method      := 'GetWeather';
  l_soap_action := 'http://www.webservicex.com/globalweather.asmx/GetWeather';
  l_result_name := 'GetWeatherResult';
 
  l_return := 'test'; -- per verificare dove si trova l'errore
 
 
  l_request := soap_api.new_request(p_method       => l_method,
                                    p_namespace    => l_namespace);

  soap_api.add_parameter(p_request => l_request,
                         p_name    => 'CityName',
                         p_type    => 's:string',
                         p_value   => city);
                         
  soap_api.add_parameter(p_request => l_request,
                         p_name    => 'CountryName',
                         p_type    => 's:string',
                         p_value   => country);

  l_response := soap_api.invoke(p_request => l_request,
                                p_url     => l_url,
                                p_action  => l_soap_action);

  l_return := soap_api.get_return_value(p_response  => l_response,
                                        p_name      => l_result_name,
                                        p_namespace => NULL);

  RETURN l_return;
END;
/


when i try to call my function,

Code: Select all

select qualcosa('Reggio Calabria', 'Italy') from dual;

i have this error:

Code: Select all

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00243: element attribute value must be enclosed in quotes
Error at line 20
ORA-06512: at "SYS.XMLTYPE", line 48
ORA-06512: at "SYS.SOAP_API", line 121
ORA-06512: at "SYS.QUALCOSA", line 36


anyone knows this problem???? Help please...

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

Re: Some problem with web services and pl-sql

Postby Tim... » Fri May 25, 2012 5:23 pm

Hi.

I've added a debug flag into the soap_api package. If you load the latest version and run your query again like this you will see the problem.

Code: Select all

SET SERVEROUTPUT ON
EXEC soap_api.debug_on;

select qualcosa('Reggio Calabria', 'Italy') from dual;


The request is not formed as the web service expects it, so it sends back some HTML as an error message, rather than a regular ERROR response you would expect from a SOAP web service.

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Sat May 26, 2012 5:46 pm

Hi Tim,

thanks for your intervention, but I did not understand what to do :?

Have you tried my code??

Currently, i'm working with Toad...
Last edited by Eremita on Sat May 26, 2012 5:57 pm, edited 1 time in total.

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

Re: Some problem with web services and pl-sql

Postby Tim... » Sat May 26, 2012 5:52 pm

Hi.

In that case, recompile the package and set the debug flag to TRUE as default. You will see the output of the request and response in your DBMS_OUTPUT window.

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Mon May 28, 2012 2:38 pm

Nothing... don't work it!!!

With DBMS_OUTPUT, i noticed that the request soap was wrong:

Code: Select all

<SOAP-ENV:Envelope
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   <SOAP-ENV:Body>
      <GetWeather xmlns="http://www.webserviceX.NET/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <CityName xsi:type="s:string">Reggio Calabria</CityName>
         <CountryName xsi:type="s:string">Italy</CountryName>
      </GetWeather>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


when it should be:

Code: Select all

<soap:Envelope
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
         <GetWeather xmlns="http://www.webserviceX.NET">
            <CityName>string</CityName>
            <CountryName>string</CountryName>
         </GetWeather>
      </soap:Body>
</soap:Envelope>


I modified the code of package (soap_api.generate_envelope) and now the request is:

Code: Select all

<soap:Envelope
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
         <GetWeather xmlns="http://www.webserviceX.NET">
            <CityName>Reggio Calabria</CityName>
            <CountryName>Italy</CountryName>
         </GetWeather>
      </soap:Body>
</soap:Envelope>


The request is ok and now i have this error (generated by the call: XMLTYPE.createxml(l_envelope) where l_envelope is request):

Code: Select all

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00243: element attribute value must be enclosed in quotes
Error at line 20
ORA-06512: at "SYS.XMLTYPE", line 48
ORA-06512: at "SYS.SOAP_API", line 122
ORA-06512: at "SYS.QUALCOSA", line 36


some idea??

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

Re: Some problem with web services and pl-sql

Postby Tim... » Mon May 28, 2012 7:56 pm

Hi.

Once again, you will need to print out the response SOAP document (xml) and check it. It would appear you are not being sent back a valid SOAP document. If you print out the soap response, you will see what is being sent back.

By the way, it would appear your web service is not a proper SOAP web service, since parameters should include their type definition.

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Mon May 28, 2012 8:20 pm

Have you a example to use of web service?? So, i can to understand fine...

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

Re: Some problem with web services and pl-sql

Postby Tim... » Mon May 28, 2012 8:51 pm

Hi.

The example in the article is a SOAP web service.

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

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Tue May 29, 2012 1:57 pm

Tim... wrote:The example in the article is a SOAP web service.

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


Ehi.. Tim,

can you show me how to do call the web service: http://www.webservicex.net/length.asmx?WSDL
to use the package into link http://www.oracle-base.com/articles/9i/ ... s-9i.php??? Please..

Cheers

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Tue May 29, 2012 2:12 pm

Perhaps I'm setting parameters into wrong mode... :?

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

Re: Some problem with web services and pl-sql

Postby Tim... » Tue May 29, 2012 5:01 pm

Hi.

The error message you get back in the SOAP response should give you a clue as to what you are doing wrong.

I will take a look at it at some point, but I'm not sure when I will have time.

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Tue May 29, 2012 6:22 pm

Hi Tim,

i hope that you will have time...
Meanwhile i'm testing another solution, this: http://www.ora600.be/node/5975

The package are:

Code: Select all

create or replace package flex_ws_util as
/*
Purpose: The package is a companion to the flex_ws_api package
*/

-- get string value
function get_value (p_xml in xmltype,
p_name in varchar2,
p_namespace in varchar2 := null,
p_value_if_error in varchar2 := null) return varchar2;

-- get clob value
function get_value_clob (p_xml in xmltype,
p_name in varchar2,
p_namespace in varchar2 := null,
p_value_if_error in varchar2 := null) return clob;

-- get date value
function get_value_date (p_xml in xmltype,
p_name in varchar2,
p_namespace in varchar2 := null,
p_value_if_error in date := null,
p_date_format in varchar2 := null) return date;

-- get number value
function get_value_number (p_xml in xmltype,
p_name in varchar2,
p_namespace in varchar2 := null,
p_value_if_error in number := null) return number;

/*
-- log web service request
procedure log_request (p_url in varchar2,
p_method in varchar2,
p_request in clob,
p_response in xmltype,
p_request_start_date in date := null,
p_log_text in varchar2 := null,
p_val1 in varchar2 := null,
p_val2 in varchar2 := null,
p_val3 in varchar2 := null);
*/

end flex_ws_util;
/


Code: Select all

create or replace package body flex_ws_util as
/*
Purpose: The package is a companion to the flex_ws_api package
*/


function get_value (p_xml in xmltype,p_name in varchar2,p_namespace in varchar2 := null,
         p_value_if_error in varchar2 := null)
   return varchar2 as l_returnvalue varchar2(32767);
begin

/*
Purpose: Get string value from web service response
*/

   begin
   l_returnvalue := flex_ws_api.parse_xml (p_xml, '//' || p_name || '/text()', p_namespace);
   exception
   when others then
      l_returnvalue := nvl(p_value_if_error, sqlerrm);
   end;

   return l_returnvalue;

end get_value;


function get_value_clob (p_xml in xmltype,p_name in varchar2,p_namespace in varchar2 := null,
         p_value_if_error in varchar2 := null)
   return clob as l_returnvalue clob;
begin

/*
Purpose: Get clob value from web service response
*/

   begin
   l_returnvalue := flex_ws_api.parse_xml_clob (p_xml, '//' || p_name || '/text()', p_namespace);
   exception
   when others then
   l_returnvalue := nvl(p_value_if_error, sqlerrm);
   end;

   return l_returnvalue;

end get_value_clob;


function get_value_date (p_xml in xmltype,p_name in varchar2,p_namespace in varchar2 := null,
   p_value_if_error in date := null,p_date_format in varchar2 := null)
   return date as l_str varchar2(32767);

l_returnvalue date;
begin

/*
Purpose: Get date value from web service response
*/

   begin
   l_str := flex_ws_api.parse_xml (p_xml, '//' || p_name || '/text()', p_namespace);
   l_returnvalue := to_date (l_str, nvl(p_date_format, 'DD.MM.RRRR HH24:MI:SS'));
   exception
   when others then
   l_returnvalue := p_value_if_error;
   end;

   return l_returnvalue;

end get_value_date;


function get_value_number (p_xml in xmltype,p_name in varchar2,p_namespace in varchar2 := null,
   p_value_if_error in number := null)
   return number as l_str varchar2(32767);
   l_returnvalue number;
begin

/*
Purpose: Get number value from web service response
*/

   begin
   l_str := flex_ws_api.parse_xml (p_xml, '//' || p_name || '/text()', p_namespace);
   l_returnvalue := to_number (l_str);
   exception
   when others then
   l_returnvalue := p_value_if_error;
   end;

   return l_returnvalue;

end get_value_number;

/*
procedure log_request (p_url in varchar2,p_method in varchar2,p_request in clob,
   p_response in xmltype,p_request_start_date in date := null,p_log_text in varchar2 := null,
   p_val1 in varchar2 := null,p_val2 in varchar2 := null,p_val3 in varchar2 := null)
   as pragma autonomous_transaction; l_sysdate date := sysdate;
begin


--Purpose: Log web service request


   insert into ws_log (request_start_date, request_end_date,
   log_text, ws_url, ws_method,
   ws_request, ws_response,
   val1, val2, val3)
   values (nvl(p_request_start_date, l_sysdate), l_sysdate,
   substr(p_log_text,1,4000), substr(p_url,1,4000), substr(p_method,1,4000),
   p_request, p_response.getclobval(),
   substr(p_val1,1,4000),substr(p_val2,1,4000), substr(p_val3,1,4000));

   commit;
*/
end log_request;


end flex_ws_util;
/


Code: Select all

create or replace TYPE t_soap_envelope AS OBJECT (
/*
Purpose: Object type to handle SOAP envelopes for web service calls
*/

-- public properties
service_namespace varchar2(255),
service_method varchar2(4000),
service_host varchar2(4000),
service_path varchar2(4000),
service_url varchar2(4000),
soap_action varchar2(4000),
soap_namespace varchar2(255),
envelope clob,

-- private properties
m_parameters clob,

constructor function t_soap_envelope (p_service_host in varchar2,p_service_path in varchar2,
   p_service_method in varchar2,p_service_namespace in varchar2 := null,
   p_soap_namespace in varchar2 := null,p_soap_action in varchar2 := null)
   return self as result,

member procedure add_param (p_name in varchar2,p_value in varchar2,p_type in varchar2 := null),

member procedure add_xml (p_xml in clob),

member procedure build_env,

member procedure debug_envelope

);
/


Code: Select all

create or replace type body t_soap_envelope as

/*
Purpose: Object type to handle SOAP envelopes for web service calls
*/

constructor function t_soap_envelope (p_service_host in varchar2,p_service_path in varchar2,
   p_service_method in varchar2,p_service_namespace in varchar2 := null,
   p_soap_namespace in varchar2 := null,p_soap_action in varchar2 := null)
   return self as result as

begin
   self.service_host := p_service_host;
   self.service_path := p_service_path;
   self.service_method := p_service_method;
   self.service_namespace := nvl(p_service_namespace, 'xmlns="' || p_service_host || '/"');
   self.service_url := p_service_host || '/' || p_service_path;
   self.soap_namespace := nvl(p_soap_namespace, 'soap');
   self.soap_action := nvl(p_soap_action, p_service_host || '/' || p_service_method);
   self.envelope := '';
   build_env;
   return;
end;


member procedure add_param (p_name in varchar2,p_value in varchar2,p_type in varchar2 := null) as

begin

   if p_type is null then
      m_parameters := m_parameters || chr(13) || ' <' || p_name || '>' || p_value || '</' || p_name || '>';
   else
      m_parameters := m_parameters || chr(13) || ' <' || p_name || ' xsi:type="' || p_type || '">' || p_value || '</' || p_name || '>';
   end if;
   build_env;

end add_param;

member procedure add_xml (p_xml in clob) as

begin

   m_parameters := m_parameters || chr(13) || p_xml;
   build_env;

end add_xml;

member procedure build_env (self in out t_soap_envelope) as

begin

   self.envelope := '<' || self.soap_namespace
   || ':Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:'
   || self.soap_namespace || '="http://schemas.xmlsoap.org/soap/envelope/">' ||
   '<' || self.soap_namespace || ':Body>' ||
   '<' || self.service_method || ' ' || self.service_namespace || '>' ||
   self.m_parameters || chr(13) ||
   '</' || self.service_method || '>' ||
   '</' || self.soap_namespace || ':Body>' ||
   '</' || self.soap_namespace || ':Envelope>';

end build_env;

member procedure debug_envelope as i pls_integer;
   l_len pls_integer;
begin

   if envelope is not null then
      i := 1; l_len := length(envelope);
      while (i <= l_len) loop
         dbms_output.put_line(substr(envelope, i, 200));
         i := i + 200;
      end loop;
   else
      dbms_output.put_line ('WARNING: The envelope is empty...');
   end if;

end debug_envelope;

end;
/


and it's example:

Code: Select all

declare
   l_env t_soap_envelope;
   l_xml xmltype;
   l_val varchar2(4000);
   l_start_date date;
begin

   l_env := t_soap_envelope ('http://www.webserviceX.NET', 'length.asmx', 'ChangeLengthUnit', 'xmlns="http://www.webserviceX.NET/"');
   l_env.add_param ('LengthValue', '100');
   l_env.add_param ('fromLengthUnit', 'Feet');
   l_env.add_param ('toLengthUnit', 'Meters');

   l_start_date := sysdate;
   l_xml := flex_ws_api.make_request(p_url => l_env.service_url, p_action => l_env.soap_action, p_envelope => l_env.envelope);
   l_val := flex_ws_util.get_value (l_xml, 'ChangeLengthUnitResult', l_env.service_namespace, 'error');
   --flex_ws_util.log_request (l_env.service_url, l_env.service_method, l_env.envelope, l_xml, l_start_date,
   --   p_log_text => 'Converting 100 feet to meters', p_val1 => l_val);
   dbms_output.put_line('Converting 100 feet to meters ' || l_val);

end;


I don't use a table for record result, but directly i print the solution!
The example work fine. I tested this method with this web service: http://www.oracle-base.com/webservices/server.php and it work:

Code: Select all

declare
    l_env t_soap_envelope;
    l_xml xmltype;
    l_val varchar2(4000);
    l_start_date date;
begin

    l_env := t_soap_envelope ('http://www.oracle-base.com/webservices/server.php', '', 'ws_add', 'xmlns="http://www.oracle-base.com/webservices/"');
    l_env.add_param ('int1', '150');
    l_env.add_param ('int2', '100');

    l_start_date := sysdate;
    l_xml := flex_ws_api.make_request(p_url => l_env.service_url, p_action => l_env.soap_action, p_envelope => l_env.envelope);
    l_val := flex_ws_util.get_value (l_xml, 'return', null, 'error');
    --flex_ws_util.log_request (l_env.service_url, l_env.service_method, l_env.envelope, l_xml, l_start_date,
    --    p_log_text => 'Converting 100 feet to meters', p_val1 => l_val);
    --show_xml(l_xml);
    dbms_output.put_line('Somma ' || l_val);

end;


But when i test another web service, for example: http://www.webservicex.net/globalweather.asmx?WSDL:

Code: Select all

declare
    l_env t_soap_envelope;
    l_xml xmltype;
    l_val varchar2(4000);
    l_start_date date;
begin

    l_env := t_soap_envelope ('http://www.webservicex.net', 'globalweather.asmx', 'GetWeather', 'xmlns="http://www.webserviceX.NET/"');
    l_env.add_param ('CityName', 'Rome');
    l_env.add_param ('CountryName', 'Italy');

    l_start_date := sysdate;
    l_xml := flex_ws_api.make_request(p_url => l_env.service_url, p_action => l_env.soap_action, p_envelope => l_env.envelope);
    l_val := flex_ws_util.get_value (l_xml, 'GetWeatherResponse', l_env.service_namespace, 'error');
    --flex_ws_util.log_request (l_env.service_url, l_env.service_method, l_env.envelope, l_xml, l_start_date,
    --    p_log_text => 'Converting 100 feet to meters', p_val1 => l_val);
    --show_xml(l_xml);
    dbms_output.put_line('Info: ' || l_val);

end;


i have this response:

Code: Select all

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetWeather xmlns="http://www.webserviceX.NET/">
</GetWeather></soap:Body></soap:Envelope>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetWeather xmlns="http://www.webserviceX.NET/">
 <CityName>Rome</CityName>
</GetWeather></soap:Body></soap:Envelope>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetWeather xmlns="http://www.webserviceX.NET/">
 <CityName>Rome</CityName>
 <CountryName>Italy</CountryName>
</GetWeather></soap:Body></soap:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/en
velope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XML
Schema">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>
System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPA
ction: http://www.webservicex.net/GetWeather.
   at System.Web.Services.Protocols.Soap11ServerProtoc
olHelper.RouteRequest()
   at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServ
erMessage message)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.
Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest requ
est, HttpResponse response, Boolean&amp; abortProcessing)</faultstring>
      <detail/>
    </soap:F
ault>
  </soap:Body>
</soap:Envelope>

Info:


Why this solution don't work with all web service?? :(

Nb.
Naturally, i put spy print (dbms_output.put_line) for understand what i send to web service.

Cheers

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

Re: Some problem with web services and pl-sql

Postby Tim... » Tue May 29, 2012 7:42 pm

Hi.

Look at the WSDL file and it should become clear. You are passing in two parameters, but the web service only accepts a single parameter. It just so happens that the single parameter is a complex type, containing two values. The reason why your examples fail with both methods is you are calling the wed service with the wrong number and type of parameters.

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

Eremita
Member
Posts: 13
Joined: Fri May 25, 2012 2:49 pm

Re: Some problem with web services and pl-sql

Postby Eremita » Tue May 29, 2012 8:25 pm

Hi,

Mmm... ok!!
But.. how do i use the complex type?? :)
Can you show me some examples?? Please...

Cheers

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

Re: Some problem with web services and pl-sql

Postby Tim... » Tue May 29, 2012 8:26 pm

Hi.

I'm working on something else right now. Not sure I will have time tonight.

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 3 guests

cron