• jodev191.395407754397709E12
  • NEWBIE
  • 0 Points
  • Member since 2014

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

I want to set a defalut value of a picklist field in VF page.. Please suggest how to acheive?

Hello,
   
       Please guide me where i can get the working samples on how to call external dotnet web services with parameters and capture the response back and display it within force.com.

   I have created Apex Class from .NET WSDL. But while accessing methods of that class in a S-control I am not getting any response or error.  The generated apex class  is as follows:

//Generated by wsdl2apex

public class tempuriOrg {
public class HelloWorld_element {
private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true'};
private String[] field_order_type_info = new String[]{};
}
public class ServiceSoap {
public String endpoint_x = 'http://localhost:2351/SampleWebSer/Service.asmx';
private String[] ns_map_type_info = new String[]{'http://tempuri.org/', 'tempuriOrg', 'http://doc.sample.com/docSample', 'docSampleComDocsample'};
public String HelloWorld() {
tempuriOrg.HelloWorld_element request_x = new tempuriOrg.HelloWorld_element();
tempuriOrg.HelloWorldResponse_element response_x;
Map<String, tempuriOrg.HelloWorldResponse_element> response_map_x = new Map<String, tempuriOrg.HelloWorldResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://tempuri.org/HelloWorld',
'http://tempuri.org/',
'HelloWorld',
'http://tempuri.org/',
'HelloWorldResponse',
'tempuriOrg.HelloWorldResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.HelloWorldResult;
}
}
public class HelloWorldResponse_element {
public String HelloWorldResult;
private String[] HelloWorldResult_type_info = new String[]{'HelloWorldResult','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true'};
private String[] field_order_type_info = new String[]{'HelloWorldResult'};
}
}

I have accessed this class methods in S-control as :

<html>

<head>

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

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

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

<script>

function demo()
 {

var result = sforce.apex.execute('tempuriOrg.ServiceSoap' , 'HelloWorld' );

document.getElementById('userNameArea').innerHTML = result;

}

</script>

</head>

<body onload=demo()>

<div id=userNameArea>

</div>

</body>

</html>
Please tell me about  how to debug apex code step by step. Also any guidence related to above problem will be very helpful.



Thanks in advance ..