function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
laxmilaxmi 

URL No Longer Exists

hi all , i am getting this error,
i have created an webservice
global class test420
{
WebService static string test1(string result)
{

dbconnection1Mywebservice1Wsdl420.MyWebService1SoapHttpPort stub =
new dbconnection1Mywebservice1Wsdl420.MyWebService1SoapHttpPort();

return result = stub.placeOrder(1, 1, 1);



}}
for the generated apex code as given below
public class dbconnection1Mywebservice1WsdlTypes420 {
public class placeOrderElement_element {
public Integer pProductId;
public Integer pCustomerId;
public Integer pQuantity;
private String[] pProductId_type_info = new String[]{'pProductId','http://www.w3.org/2001/XMLSchema','int','1','1','true'};
private String[] pCustomerId_type_info = new String[]{'pCustomerId','http://www.w3.org/2001/XMLSchema','int','1','1','true'};
private String[] pQuantity_type_info = new String[]{'pQuantity','http://www.w3.org/2001/XMLSchema','int','1','1','true'};
private String[] apex_schema_type_info = new String[]{'http://dbconnection1/MyWebService1.wsdl/types/','true'};
private String[] field_order_type_info = new String[]{'pProductId','pCustomerId','pQuantity'};
}
public class placeOrderResponseElement_element {
public String result;
private String[] result_type_info = new String[]{'result','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
private String[] apex_schema_type_info = new String[]{'http://dbconnection1/MyWebService1.wsdl/types/','true'};
private String[] field_order_type_info = new String[]{'result'};
}
public class dbconnection1Mywebservice1Wsdl420 {
public class MyWebService1SoapHttpPort {
public String endpoint_x = 'http://192.168.200.78:7777/PLSQLWEB-PLSQL-context-root/MyWebService1SoapHttpPort';
private String[] ns_map_type_info = new String[]{'http://dbconnection1/MyWebService1.wsdl/types/', 'dbconnection1Mywebservice1WsdlTypes420', 'http://dbconnection1/MyWebService1.wsdl', 'dbconnection1Mywebservice1Wsdl420'};
public String placeOrder(Integer pProductId,Integer pCustomerId,Integer pQuantity) {
dbconnection1Mywebservice1WsdlTypes420.placeOrderElement_element request_x = new dbconnection1Mywebservice1WsdlTypes420.placeOrderElement_element();
dbconnection1Mywebservice1WsdlTypes420.placeOrderResponseElement_element response_x;
request_x.pProductId = pProductId;
request_x.pCustomerId = pCustomerId;
request_x.pQuantity = pQuantity;
Map<String, dbconnection1Mywebservice1WsdlTypes420.placeOrderResponseElement_element> response_map_x = new Map<String, dbconnection1Mywebservice1WsdlTypes420.placeOrderResponseElement_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://dbconnection1/MyWebService1.wsdl/placeOrder',
'http://dbconnection1/MyWebService1.wsdl/types/',
'placeOrderElement',
'http://dbconnection1/MyWebService1.wsdl/types/',
'placeOrderResponseElement',
'dbconnection1Mywebservice1WsdlTypes420.placeOrderResponseElement_element'}
);
response_x = response_map_x.get('response_x');
return response_x.result;
}
}

}
}

and s-control ,
<html>

<head>

<script type="text/javascript" src="/js/functions.js"></script>

<script src="/soap/ajax/10.0/connection.js"></script>

<script src="/soap/ajax/10.0/apex.js"></script>

<script>

function X(a,b,c) {

try{

var result = sforce.apex.execute("test420" ,"test1", {a,b,c});



document.getElementById('userNameArea').innerHTML = 'Congratulations!'

+ + result;

}

catch (ex)

{

alert ("Failed : " + ex);

}

}

</script>

</head>
<form>
<body >
Product ID:<input type="text" id="name">

<br></br>

Customer ID:<input type="text" id="CSid">

<br></br>

Quantity:<input type="text" id="Qid">

<br></br>

<input type="submit" value="submit" onclick=X(name,CSid,Qid)>

<hr></hr>

</body>
</form>
</html>
and i have created webtab , so if i click i am gettting this error,....
http://192.168.200.78:7777/PLSQLWEB-PLSQL-context-root/MyWebService1SoapHttpPort

URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com.

You may have reached this page after clicking on a direct link into the application. This direct link might be:
• A bookmark to a particular page, such as a report or view
• A link to a particular page in the Custom Links section of your Home Tab, or a Custom Link
• A link to a particular page in your email templates

If you reached this page through a bookmark, you are probably trying to access something that has moved. Please update your bookmark.

If you reached this page through any of the other direct links listed above, please notify your administrator to update the link.

If you reached this page through a link on our site, please report the broken link directly to our Support Team and we will fix it promptly. Please indicate the page you were on when you clicked the link as well as any other related information. We apologize for the inconvenience.



thanks
Laxmi
SuperfellSuperfell
the URL http://192.168....... indicates your server is on a private network, so its not reachable from salesforce.com

In order to be able to call your webservice from apex, your webservice needs to be reachable over the public internet.