• Gaurav_NBIN
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies

Hi

 

I am newbee to salesforce. I need a small information, I am trying to hit a webservice which is available to the cloud. I am able to get the response using SOAP UI and browser if I provide the end point, but getting an error while trying the same through apex code.

 

<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate">http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate</A>
<P>
The following error was encountered:
<BLOCKQUOTE>
Unable to determine IP address from host name for
<I>laatws62.farmersinsurance.com</I>
</BLOCKQUOTE>

<P>
The dnsserver returned:
<BLOCKQUOTE>
Name Error: The domain name does not exist.
</BLOCKQUOTE>

Is there any proxy/authorization settings in salesforce using which I can hit the service.
Please do reply, thanks in advance.

Hi All

 

I am trying to call an external Webservice using APEX.

 Here are the steps I have follwed..

1. Created a simple SOAP WS which just return a string.

2. Generated an APEX class using WSDL file.

3. Register the end point in Remote Website

4. Created an APEX controller to call the WS method using callout.

5. Created a APEX Page which has just a button to call the controller.

 

Issue is, I am can see in the log that it is creating the request XML properly( tested in SOAP UI) but it shows request is not prooper.

 

Here is my Log, Please suggest me if any step/security measure is missing. Thanks in advance

 

05:13:34.049 (49868000)|SYSTEM_METHOD_ENTRY|[22]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST)
05:13:34.056 (56853000)|CALLOUT_REQUEST|[22]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><returnHello xmlns="http://webService.com" /></env:Body></env:Envelope>
05:13:34.056 (56933000)|CALLOUT_REQUEST|[22]|returnHello_element:[apex_schema_type_info=(http://webService.com, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="" User-Agent=SFDC-Callout/26.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
05:13:34.058 (58338000)|CALLOUT_RESPONSE|[22]|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to process the request:
<PRE>
POST /helloCallToWS/services/ReturnHello HTTP/1.0
SFDC_STACK_DEPTH: 1
SOAPAction: &quot;&quot;
User-Agent: SFDC-Callout/26.0
Accept: text/xml
Content-Type: text/xml; charset=UTF-8
Host: localhost:8080
Content-Length: 300
Via: 1.1 proxy-tyo.net.salesforce.com:8080 (squid)
X-Forwarded-For: 10.238.12.21
Cache-Control: max-age=259200
Connection: keep-alive


</PRE>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Invalid Request
</STRONG>
</UL>

<P>
Some aspect of the HTTP Request is invalid.  Possible problems:
<UL>
<LI>Missing or unknown request method
<LI>Missing URL
<LI>Missing HTTP Identifier (HTTP/1.0)
<LI>Request is too large
<LI>Content-Length missing for POST or PUT requests
<LI>Illegal character in hostname; underscores are not allowed
</UL>
<P>Your cache administrator is <A HREF="mailto:support@salesforce.com">support@salesforce.com</A>. 

 

 

Hi

 

I am newbee to salesforce. I need a small information, I am trying to hit a webservice which is available to the cloud. I am able to get the response using SOAP UI and browser if I provide the end point, but getting an error while trying the same through apex code.

 

<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate">http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate</A>
<P>
The following error was encountered:
<BLOCKQUOTE>
Unable to determine IP address from host name for
<I>laatws62.farmersinsurance.com</I>
</BLOCKQUOTE>

<P>
The dnsserver returned:
<BLOCKQUOTE>
Name Error: The domain name does not exist.
</BLOCKQUOTE>

Is there any proxy/authorization settings in salesforce using which I can hit the service.
Please do reply, thanks in advance.

Hi All

 

I am trying to call an external Webservice using APEX.

 Here are the steps I have follwed..

1. Created a simple SOAP WS which just return a string.

2. Generated an APEX class using WSDL file.

3. Register the end point in Remote Website

4. Created an APEX controller to call the WS method using callout.

5. Created a APEX Page which has just a button to call the controller.

 

Issue is, I am can see in the log that it is creating the request XML properly( tested in SOAP UI) but it shows request is not prooper.

 

Here is my Log, Please suggest me if any step/security measure is missing. Thanks in advance

 

05:13:34.049 (49868000)|SYSTEM_METHOD_ENTRY|[22]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST)
05:13:34.056 (56853000)|CALLOUT_REQUEST|[22]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><returnHello xmlns="http://webService.com" /></env:Body></env:Envelope>
05:13:34.056 (56933000)|CALLOUT_REQUEST|[22]|returnHello_element:[apex_schema_type_info=(http://webService.com, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="" User-Agent=SFDC-Callout/26.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
05:13:34.058 (58338000)|CALLOUT_RESPONSE|[22]|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to process the request:
<PRE>
POST /helloCallToWS/services/ReturnHello HTTP/1.0
SFDC_STACK_DEPTH: 1
SOAPAction: &quot;&quot;
User-Agent: SFDC-Callout/26.0
Accept: text/xml
Content-Type: text/xml; charset=UTF-8
Host: localhost:8080
Content-Length: 300
Via: 1.1 proxy-tyo.net.salesforce.com:8080 (squid)
X-Forwarded-For: 10.238.12.21
Cache-Control: max-age=259200
Connection: keep-alive


</PRE>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Invalid Request
</STRONG>
</UL>

<P>
Some aspect of the HTTP Request is invalid.  Possible problems:
<UL>
<LI>Missing or unknown request method
<LI>Missing URL
<LI>Missing HTTP Identifier (HTTP/1.0)
<LI>Request is too large
<LI>Content-Length missing for POST or PUT requests
<LI>Illegal character in hostname; underscores are not allowed
</UL>
<P>Your cache administrator is <A HREF="mailto:support@salesforce.com">support@salesforce.com</A>.