Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REST web service not working

Krishna VashisthaNov 4 2011 — edited Jul 18 2012
Hi,

I'm learning on how to implement REST web services. I'm running on Apex 4.1 version, hosted with apex_listener on a weblogic server.
I have created the two Web Service References in Shared components, following from the available tutorials:

1) Google Geocoder with the following details:
Region: Edit REST Web References

Name: Google Geocoder
Url: http://maps.googleapis.com/maps/api/geocode/xml
Basic Authentication: No
HTTP Method: GET
Output Format: XML
Response XPath: //geometry/location

Region: REST Input Parameters
Input Type: Name Value Pairs
parameters: address (string) & sensor (string)

Region: REST Output Parameters
parameters: long /lng(Path) (String)
lat /lat(Path) (String)

2) Country Info
URL: http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso
Soap version: 1.1
Soap Envelop:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="http://www.oorsprong.org/websamples.countryinfo">
<soapenv:header/>
<soapenv:body>
<web:FullCountryInfo>
<web:sCountryISOCode>#COUNTRY_ISO_CODE#</web:sCountryISOCode>
</web:FullCountryInfo>
</soapenv:body>
</soapenv:Envelope>

But sadly none of them are successful in running a test button. Both the services returned error:

Error testing service.
ORA-20001: The webservice was unreachable because either the URL you supplied was invalid, your environment requires a valid proxy server address for HTTP requests, the request timed out, or a wallet needs to be configured for HTTPS requests.

Also, an existing post here at OTN Forum
9918087
specifying the same problem, user 'teedub' suggested:

"Ensure that you can ping the web services server.
Then check whether there is a valid/appropriate acl for the apex_040100 user;
select * from dba_network_acl_privileges where principal like 'APEX%';
Refer to Enable Network Services in Oracle Database 11g in the install manual."

How can i ping to the web service server?
1) Google Geocoder
I ran url: "http://maps.googleapis.com/maps/api/geocode/xml" browser returned:
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
<status>REQUEST_DENIED</status>
</GeocodeResponse>

2) Country Info, url "http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso" executed well.

I tried to query my database with
select * from dba_network_acl_privileges where principal like 'APEX%';
it resulted with "no rows selected"
so what that means here? Does it return as expected with no rows, or is there anything else expected?

I simply dont understand what exactly i need to do after this. Should I follow an approach to create my own sample REST web references manually, if so? I request to please help on creating manual web reference? Or if there's an easy option available, then can anyone would be kind enough in guiding me to implement this please?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2012
Added on Nov 4 2011
2 comments
1,154 views