Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Web services
I have to call e NET web service via Oracle.
this is my asmx:
using System.Web.Services ;
public class MyClass
{
[WebMethod()] public int Add ( int a, int b) { return a + b ; }
If I call http://localhost/TestWebService.aspx where TestWebService.aspx is
<body>
<form action="http://localhost/MyWebService.asmx/Add" method="POST">
<input name="a"></input> <input name="b"></input> <input type="submit" value="Enter"> </input></form>
</body>
</html>
and I fill input "a" with 2 and input "b" with 3 I obtain:
This web service works fine.
I have to call it from Oracle function and I found this script:
l_request soap_api.t_request; l_response soap_api.t_response; l_price NUMBER;
p_namespace =>'xmlns:ns1="urn:xmethods-delayed-quotes"');
soap_api.add_parameter(p_request => l_request, p_name => 'symbol', p_type => 'xsd:string', p_value => p_stock_code); l_response := soap_api.invoke(p_request => l_request, p_url => 'http://64.124.140.30:9090/soap', p_action =>'urn:xmethods-delayed-quotes#getQuote');
l_price := soap_api.get_return_value(p_response => l_response, p_name => 'Result', p_namespace =>'xmlns:ns1="urn:xmethods-delayed-quotes"');
RETURN l_price;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END;
/
I don't figure out which parameters (of my asp net web service) I have to replace to this last script to use web service.
Can you help me pls?
Thx. Received on Thu Oct 19 2006 - 03:15:22 CDT
![]() |
![]() |