Calling .Net web service with HTTP/1.0 protocol

J

jberg

All,

We are using Oracle 9i R2.xx PL/SQL function to call a VB .Net
(version 1.1) web service residing on an IIS server. The web service
appears to be executing, but we can not get the return value from the
Web Service. When we do the get_response we get a Response of 100, and
Reason of "Continue". After reading some documentation it seems Oracle
9i can not process a 100 Continue message. I have tried to change the
protocol to HTTP/1.0 instead of HTTP/1.1, on the client (Oracle) side,
but that causes us to get a 404 - Object Not Found error.

I have tried to find a way to set the protocol in the web service, but
have been unsuccessful. Does anyone know how to set a Web Service to
use HTTP/1.0 instead of HTTP/1.1? This would solve our 100-Continue
problem since 1.0 doesn't use the 100-Continue.


Thanks.

John
 
S

Srinivas S

Hi John

I have a scenario where i need to call a .net Web Service from Oracle
Database.

I got the Oracle pl/sql function, but i seem to get Internal Server
Error everytime i call my web service.

Can u pl let me know on this how you are acheiving it...

Thanks in advance.

Rgds

Srini
 
J

jberg

Srini,

I had that error at one point and I am not sure how I cleared it up. I
would check that you have the right data types in the envelope XML for
the parameters that are being passed. WhatI did too was write
information to the event log from the Web Service so I at least had an
idea of where it was failing and if it was even running part way
through.

The only way we were able to call a .Net Web Service from an Oracle
PL/SQL function or procedure, using HTTP 1.1 was:

- Add the following to Web.config:
<webServices>
<protocols>
<add name="HttpPost"></add>
<add name="HttpGet"></add>
</protocols>
HTTPSoap is the default. This allows Get and Put requests to your
Web service rather tahn using Soap. The danger here is you open to
attacks such as denial of service since the Web Service now processes
Gets and Posts.

- Instead of using Soap to call the web service, you need to call it
like a regular web page:
tmpVar :=
utl_http.request('http://www.something.com/mydir/service1.asmx/HelloWorld?parm='
|| 'TEST');

- You need to sift through the return value (tmpVar in this case) to
find the actual return in the XML string returned

This only pertains if you are using a HTTP/1.1 protocol. If using 1.0
the regular SOAP method should work.

Hope this helps.

John
 
S

Srinivas S

Hi,

I got it working in a day or two itself.

It was really cool, calling a webservice from sqlplus or toad and which
executes a .net webservice in the backend and displays back the
information as a SOAP response.

I could easily extract the relevant information from the xml response.

thanks for info...

S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top