This discussion is archived
14 Replies Latest reply: Jan 21, 2013 3:46 AM by MarcoGralike RSS

Error ORA-29532 service does not contain port

user613681 Newbie
Currently Being Moderated
I used utl_dbws in this simple function:

CREATE OR REPLACE FUNCTION get_meteo (p_int_1 IN VARCHAR2,
p_int_2 IN VARCHAR2)
RETURN VARCHAR2
AS
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;

l_wsdl_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_service_qname UTL_DBWS.qname;
l_port_qname UTL_DBWS.qname;
l_operation_qname UTL_DBWS.qname;

l_xmltype_in SYS.XMLTYPE;
l_xmltype_out SYS.XMLTYPE;
l_return NUMBER;
BEGIN
l_wsdl_url := 'http://www.webservicex.net/globalweather.asmx?WSDL';
l_namespace := 'http://www.webserviceX.NET/';

l_service_qname := UTL_DBWS.to_qname(l_namespace, 'GlobalWeather');
l_port_qname := UTL_DBWS.to_qname(l_namespace, 'GlobalWeatherSoap');
l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'GetWeather');

l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);

l_call := UTL_DBWS.create_call (
service_handle => l_service,
port_name => l_port_qname,
operation_name => l_operation_qname);

l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
<ws_add xmlns="' || l_namespace || '">
<CountryName>' || p_int_1 || '</CountryName>
<CityName>' || p_int_2 || '</CityName>
</ws_add>');
l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
request => l_xmltype_in);

UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);

l_return := l_xmltype_out.extract('//return/text()').GetStringVal();
RETURN l_return;
END;
/


SELECT get_meteo('Italy', 'Milan') FROM dual;

When I try to execute it, I get the error:

ORA-29532: chiamata Java terminata a causa di un'eccezione Java non ottenuta:
service: {http://www.webserviceX.NET/}GlobalWeather does not contain port:
{{http://www.webserviceX.NET/}GlobalWeather}GlobalWeatherSoap
ORA-06512: a "SYS.UTL_DBWS", line 266
ORA-06512: a "SYS.GET_METEO", line 29

Why? Where is the mistake?

Here is definition of the webservice:



<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.webserviceX.NET" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
- <s:element name="GetWeather">ort

- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CityName" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="CountryName" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetWeatherResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetWeatherResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetCitiesByCountry">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CountryName" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetCitiesByCountryResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCitiesByCountryResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string" />
</s:schema>
</wsdl:types>
- <wsdl:message name="GetWeatherSoapIn">
<wsdl:part name="parameters" element="tns:GetWeather" />
</wsdl:message>
- <wsdl:message name="GetWeatherSoapOut">
<wsdl:part name="parameters" element="tns:GetWeatherResponse" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountrySoapIn">
<wsdl:part name="parameters" element="tns:GetCitiesByCountry" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountrySoapOut">
<wsdl:part name="parameters" element="tns:GetCitiesByCountryResponse" />
</wsdl:message>
- <wsdl:message name="GetWeatherHttpGetIn">
<wsdl:part name="CityName" type="s:string" />
<wsdl:part name="CountryName" type="s:string" />
</wsdl:message>
- <wsdl:message name="GetWeatherHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountryHttpGetIn">
<wsdl:part name="CountryName" type="s:string" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountryHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
- <wsdl:message name="GetWeatherHttpPostIn">
<wsdl:part name="CityName" type="s:string" />
<wsdl:part name="CountryName" type="s:string" />
</wsdl:message>
- <wsdl:message name="GetWeatherHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountryHttpPostIn">
<wsdl:part name="CountryName" type="s:string" />
</wsdl:message>
- <wsdl:message name="GetCitiesByCountryHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
- <wsdl:portType name="GlobalWeatherSoap">
- <wsdl:operation name="GetWeather">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get weather report for all major cities around the world.</wsdl:documentation>
<wsdl:input message="tns:GetWeatherSoapIn" />
<wsdl:output message="tns:GetWeatherSoapOut" />
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get all major cities by country name(full / part).</wsdl:documentation>
<wsdl:input message="tns:GetCitiesByCountrySoapIn" />
<wsdl:output message="tns:GetCitiesByCountrySoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:portType name="GlobalWeatherHttpGet">
- <wsdl:operation name="GetWeather">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get weather report for all major cities around the world.</wsdl:documentation>
<wsdl:input message="tns:GetWeatherHttpGetIn" />
<wsdl:output message="tns:GetWeatherHttpGetOut" />
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get all major cities by country name(full / part).</wsdl:documentation>
<wsdl:input message="tns:GetCitiesByCountryHttpGetIn" />
<wsdl:output message="tns:GetCitiesByCountryHttpGetOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:portType name="GlobalWeatherHttpPost">
- <wsdl:operation name="GetWeather">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get weather report for all major cities around the world.</wsdl:documentation>
<wsdl:input message="tns:GetWeatherHttpPostIn" />
<wsdl:output message="tns:GetWeatherHttpPostOut" />
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get all major cities by country name(full / part).</wsdl:documentation>
<wsdl:input message="tns:GetCitiesByCountryHttpPostIn" />
<wsdl:output message="tns:GetCitiesByCountryHttpPostOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="GlobalWeatherSoap" type="tns:GlobalWeatherSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetWeather">
<soap:operation soapAction="http://www.webserviceX.NET/GetWeather" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<soap:operation soapAction="http://www.webserviceX.NET/GetCitiesByCountry" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="GlobalWeatherSoap12" type="tns:GlobalWeatherSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetWeather">
<soap12:operation soapAction="http://www.webserviceX.NET/GetWeather" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<soap12:operation soapAction="http://www.webserviceX.NET/GetCitiesByCountry" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="GlobalWeatherHttpGet" type="tns:GlobalWeatherHttpGet">
<http:binding verb="GET" />
- <wsdl:operation name="GetWeather">
<http:operation location="/GetWeather" />
- <wsdl:input>
<http:urlEncoded />
</wsdl:input>
- <wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<http:operation location="/GetCitiesByCountry" />
- <wsdl:input>
<http:urlEncoded />
</wsdl:input>
- <wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="GlobalWeatherHttpPost" type="tns:GlobalWeatherHttpPost">
<http:binding verb="POST" />
- <wsdl:operation name="GetWeather">
<http:operation location="/GetWeather" />
- <wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
- <wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetCitiesByCountry">
<http:operation location="/GetCitiesByCountry" />
- <wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
- <wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="GlobalWeather">
- <wsdl:port name="GlobalWeatherSoap" binding="tns:GlobalWeatherSoap">
<soap:address location="http://www.webservicex.com/globalweather.asmx" />
</wsdl:port>
- <wsdl:port name="GlobalWeatherSoap12" binding="tns:GlobalWeatherSoap12">
<soap12:address location="http://www.webservicex.com/globalweather.asmx" />
</wsdl:port>
- <wsdl:port name="GlobalWeatherHttpGet" binding="tns:GlobalWeatherHttpGet">
<http:address location="http://www.webservicex.com/globalweather.asmx" />
</wsdl:port>
- <wsdl:port name="GlobalWeatherHttpPost" binding="tns:GlobalWeatherHttpPost">
<http:address location="http://www.webservicex.com/globalweather.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
  • 1. Re: Error ORA-29532 service does not contain port
    odie_63 Guru
    Currently Being Moderated
    l_namespace := 'http://www.webserviceX.NET/';
    According to the WSDL, the target namespace is :
    http://www.webserviceX.NET
    (no ending slash)

    See if it makes a difference.

    I don't have UTL_DBWS installed to test, but the webservice works well when invoked via UTL_HTTP :
    SQL> DECLARE
      2    req_text   VARCHAR2(4000) :=
      3  '<?xml version="1.0" encoding="utf-8"?>
      4  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      5    <soap:Body>
      6      <GetWeather xmlns="http://www.webserviceX.NET">
      7        <CityName>Nantes</CityName>
      8        <CountryName>France</CountryName>
      9      </GetWeather>
     10    </soap:Body>
     11  </soap:Envelope>';
     12  
     13    req        utl_http.req;
     14    res        utl_http.resp;
     15    res_text   VARCHAR2(32767);
     16  
     17  BEGIN
     18  
     19    req := utl_http.begin_request('www.webservicex.net/globalweather.asmx', 'POST', 'HTTP/1.1');
     20    utl_http.set_header(req, 'Content-Type', 'text/xml');
     21    utl_http.set_header(req, 'Content-Length', length(req_text));
     22    utl_http.set_header(req, 'SOAPAction', 'http://www.webserviceX.NET/GetWeather');
     23  
     24    utl_http.write_text(req, req_text);
     25  
     26    res := utl_http.get_response(req);
     27    utl_http.read_text(res, res_text);
     28    utl_http.end_response(res);
     29  
     30    dbms_output.put_line(res_text);
     31  
     32  END;
     33  /
     
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetWeatherResponse xmlns="http://www.webserviceX.NET"><GetWeatherResult>&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;CurrentWeather&gt;
      &lt;Location&gt;Nantes, France (LFRS) 47-10N 001-36W 27M&lt;/Location&gt;
      &lt;Time&gt;Feb 12, 2012 - 06:30 AM EST / 2012.02.12 1130 UTC&lt;/Time&gt;
      &lt;Wind&gt; from the ENE (060 degrees) at 9 MPH (8 KT):0&lt;/Wind&gt;
      &lt;Visibility&gt; greater than 7 mile(s):0&lt;/Visibility&gt;
      &lt;Temperature&gt; 32 F (0 C)&lt;/Temperature&gt;
      &lt;Wind&gt;Windchill: 24 F (-4 C):1&lt;/Wind&gt;
      &lt;DewPoint&gt; 8 F (-13 C)&lt;/DewPoint&gt;
      &lt;RelativeHumidity&gt; 36%&lt;/RelativeHumidity&gt;
      &lt;Pressure&gt; 30.53 in. Hg (1034 hPa)&lt;/Pressure&gt;
      &lt;Status&gt;Success&lt;/Status&gt;
    &lt;/CurrentWeather&gt;</GetWeatherResult></GetWeatherResponse></soap:Body></soap:Envelope>
     
    PL/SQL procedure successfully completed
     
    Or directly with the HTTP GET protocol :
    SQL> select *
      2  from xmltable(
      3       '/CurrentWeather'
      4       passing xmlparse(document
      5                xmlcast(
      6                 xmlquery(
      7                  'declare default element namespace "http://www.webserviceX.NET"; /string'
      8                  passing httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes&CountryName=France').getXML()
      9                  returning content
     10                 ) as varchar2(4000)
     11                )
     12               )
     13       columns location    varchar2(100) path 'Location'
     14             , pressure    varchar2(100) path 'Pressure'
     15             , temperature varchar2(100) path 'Temperature'
     16  );
     
    LOCATION                                                 PRESSURE                            TEMPERATURE
    -------------------------------------------------------- ----------------------------------- --------------------------------
    Nantes, France (LFRS) 47-10N 001-36W 27M                  30.53 in. Hg (1034 hPa)             32 F (0 C)
     
  • 2. Re: Error ORA-29532 service does not contain port
    user613681 Newbie
    Currently Being Moderated
    I' m trying the code:
    select *
    from xmltable(
    '/CurrentWeather'
    passing xmlparse(document
    xmlcast(
    xmlquery(
    'declare default element namespace "http://www.webserviceX.NET"; /string'
    passing httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes&CountryName=France').getXML()
    returning content
    ) as varchar2(4000)
    )
    )
    columns location varchar2(100) path 'Location'
    , pressure varchar2(100) path 'Pressure'
    , temperature varchar2(100) path 'Temperature'
    );

    I tried to execute it from sqlplus, but sqlplus asked me the value of ContryName (& is the symbol for parameters...).
    How can i do?
    THanks a lot, best regards
  • 3. Re: Error ORA-29532 service does not contain port
    user613681 Newbie
    Currently Being Moderated
    I' m trying the code:
    select *
    from xmltable(
    '/CurrentWeather'
    passing xmlparse(document
    xmlcast(
    xmlquery(
    'declare default element namespace "http://www.webserviceX.NET"; /string'
    passing httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes&CountryName=France').getXML()
    returning content
    ) as varchar2(4000)
    )
    )
    columns location varchar2(100) path 'Location'
    , pressure varchar2(100) path 'Pressure'
    , temperature varchar2(100) path 'Temperature'
    );

    I tried to execute it from sqlplus, but sqlplus asked me the value of ContryName (& is the symbol for parameters...).
    How can i do?
    THanks a lot, best regards
  • 4. Re: Error ORA-29532 service does not contain port
    odie_63 Guru
    Currently Being Moderated
    I tried to execute it from sqlplus, but sqlplus asked me the value of ContryName (& is the symbol for parameters...).
    How can i do?
    SET SCAN OFF
    or,
    SET DEFINE OFF
  • 5. Re: Error ORA-29532 service does not contain port
    user613681 Newbie
    Currently Being Moderated
    I tried this, getting the error: Missing right parentesis -> where is the error????

    select *
    from xmltable(
    '/CurrentWeather'
    passing xmlparse(document
    xmlcast(
    xmlquery(
    'declare default element namespace "http://www.webserviceX.NET"; /string'
    passing httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes\&CountryName=France').getXML()
    returning content
    ) as varchar2(4000)
    )
    )
    columns location varchar2(100) path 'Location'
    , pressure varchar2(100) path 'Pressure'
    , temperature varchar2(100) path 'Temperature'
    );
  • 6. Re: Error ORA-29532 service does not contain port
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    Guessing you are using SQL*Plus? If so you will have to escape the ";" in
    'declare default element namespace "http://www.webserviceX.NET"; /string'
    via using " ( : : ) " just after the ";"

    Just like in the following example
    SQL> xquery xquery version "1.0"; (: :)
      2          declare default element namespace "POI"; (: :)
      3              for $x in fn:doc("/urs/025_XPOI/XDB/xdb/Simple/xml/001_03082006/xpoi/simple.xml")/Simple_XPOIS/Simple
      4            where $x/ID = 1
      5           return $x
      6  / 
    No items selected.
    other wise SQL*Plus will pick up the ";" as a terminator

    So..
    select *
    from xmltable(
    '/CurrentWeather'
    passing xmlparse(document
    xmlcast(
    xmlquery(
    'declare default element namespace "http://www.webserviceX.NET"; (: :) /string'
    passing httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes\&CountryName=France').getXML()
    returning content
    ) as varchar2(4000)
    )
    )
    columns location varchar2(100) path 'Location'
    , pressure varchar2(100) path 'Pressure'
    , temperature varchar2(100) path 'Temperature'
    );
  • 7. Re: Error ORA-29532 service does not contain port
    odie_63 Guru
    Currently Being Moderated
    Guessing you are using SQL*Plus? If so you will have to escape the ";" in
    'declare default element namespace "http://www.webserviceX.NET"; /string'
    via using " ( : : ) " just after the ";"
    Only when the semicolon terminates a line, so it doesn't apply to the present case ;)
    SQL> select xmlquery(
      2  'declare default element namespace "ns0"; <test/>'
      3   returning content
      4  )
      5  from dual
      6  ;
    
    XMLQUERY('DECLAREDEFAULTELEMENTNAMESPACE"NS0";<TEST/>'RETURNINGCONTENT)
    --------------------------------------------------------------------------------
    <test xmlns="ns0"></test>
  • 8. Re: Error ORA-29532 service does not contain port
    odie_63 Guru
    Currently Being Moderated
    bo**** wrote:
    I tried this, getting the error: Missing right parentesis -> where is the error????
    We're missing an important piece of information : what's your database version?

    XMLCast is not available prior to 11g.

    This works on 10.2 :
    select *
    from xmltable(
           '/CurrentWeather'
           passing xmltype(
                     extractValue(
                       httpuritype('http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Nantes&CountryName=France').getXML()
                     , '/string'
                     , 'xmlns="http://www.webserviceX.NET"'
                     ) 
                   )
           columns location varchar2(100)    path 'Location'
                 , pressure varchar2(100)    path 'Pressure'
                 , temperature varchar2(100) path 'Temperature'
         )
    ;
  • 9. Re: Error ORA-29532 service does not contain port
    user613681 Newbie
    Currently Being Moderated
    Wonderful... On 10.2 it works Thanks a lot ...
  • 10. Re: Error ORA-29532 service does not contain port
    MGralike Newbie
    Currently Being Moderated
    Might be...If...Guessing...

    Notice my choice of words. As usual the information given isn't as detailed as we would like it to be.
  • 11. Re: Error ORA-29532 service does not contain port
    MGralike Newbie
    Currently Being Moderated
    If not only, once again, NOT formatted with the CODE statement
  • 12. Re: Error ORA-29532 service does not contain port
    590170 Newbie
    Currently Being Moderated
    ws_add is an incorrect operation name, your operation name is Getwhether.. p_int1 and p_int2 are also incorrect paramteres. Fix your code.
    Regards,
    Sandip
  • 13. Re: Error ORA-29532 service does not contain port
    980487 Newbie
    Currently Being Moderated
    i have to same error when calling web services ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: java.lang.NoClassDefFoundError
    ORA-06512: at "SYS.UTL_DBWS", line 193
    ORA-06512: at "SYS.UTL_DBWS", line 190
    ORA-06512: at "HAMED.WSPROXY_SEND_REQUEST", line 24

    my code
    CREATE OR REPLACE
    FUNCTION wsproxy_send_request
    return varchar2
    as
    l_service SYS.UTL_DBWS.service;
    l_call SYS.UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_service_qname SYS.UTL_DBWS.qname;
    l_port_qname SYS.UTL_DBWS.qname;
    l_operation_qname SYS.UTL_DBWS.qname;
    l_input_params SYS.UTL_DBWS.ANYDATA_LIST;
    DrugBase_type_qname SYS.UTL_DBWS.QNAME;
    string_type_qname SYS.UTL_DBWS.QNAME;
    long_type_qname SYS.UTL_DBWS.QNAME;

    begin

    l_wsdl_url := 'http://72.167.37.206:8181/gdfservice.svc?wsdl';
    l_namespace := 'http://www.greenrain.biz';
    l_service_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'IGDFService');
    l_port_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'BasicHttpBinding_IGDFService');
    l_operation_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'CheckContraindicatedDrugs');
    l_service := SYS.UTL_DBWS.create_service (URIFACTORY.getURI(l_wsdl_url), l_service_qname);
    l_call := SYS.UTL_DBWS.create_call (l_service, l_port_qname, l_operation_qname);
    DrugBase_type_qname := SYS.UTL_DBWS.to_qname('http://72.167.37.206:8181/GDFService.svc/basic?xsd=xsd2', 'DrugBase');
    --string_type_qname := SYS.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    --long_type_qname := SYS.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'long');

    SYS.UTL_DBWS.add_parameter(l_call, 'args0', DrugBase_type_qname, 'ParameterMode.IN');
    SYS.UTL_DBWS.add_parameter(l_call, 'args1', DrugBase_type_qname, 'ParameterMode.IN');
    SYS.UTL_DBWS.add_parameter(l_call, 'args2', DrugBase_type_qname, 'ParameterMode.IN');
    SYS.UTL_DBWS.add_parameter(l_call, 'args3', DrugBase_type_qname, 'ParameterMode.IN');
    SYS.UTL_DBWS.add_parameter(l_call, 'args4', DrugBase_type_qname, 'ParameterMode.IN');

    SYS.UTL_DBWS.SET_PROPERTY(l_call, 'SOAPACTION_USE', 'TRUE');
    SYS.UTL_DBWS.SET_PROPERTY(l_call, 'SOAPACTION_URI', '');
    SYS.UTL_DBWS.SET_PROPERTY(l_call, 'ENCODINGSTYLE_URI', '');
    SYS.UTL_DBWS.SET_PROPERTY(l_call, 'OPERATION_STYLE', 'rpc');

    l_input_params(0) := ANYDATA.ConvertNumber(2);
    l_input_params(1) := ANYDATA.ConvertNumber('9876-1230-835');
    --l_input_params(2) := ANYDATA.ConvertVarchar2('CTE');
    l_input_params(3) := ANYDATA.ConvertVarchar2('0');
    l_input_params(4) := ANYDATA.ConvertVarchar2('');

    sys.utl_dbws.set_return_type(l_call, DrugBase_type_qname);

    l_result := SYS.UTL_DBWS.invoke(l_call, l_input_params);

    SYS.UTL_DBWS.release_call (l_call);
    SYS.UTL_DBWS.release_service(l_service);

    RETURN ANYDATA.AccessVarchar2(l_result);
    END;
    /
    can you anyone help me
  • 14. Re: Error ORA-29532 service does not contain port
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    The UTL_DBWS method (PL/SQL wrapper) is not part of the XMLDB functionality. Not sure if we can help you here...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points