StrikeIron Links
Getting Started
Developer Forum (Beta)
Subject: salesforce integration (s-control mashup)
Prev Next
You are not authorized to post a reply.

Author Messages
shoskeUser is Offline

Posts:1

08/08/2008 12:09 AM  
I am trying to mash-up info returned by "zack company" web service by converting the wsdl to apex code in salesforce.

The following s-control isnt working for me - can you please let me know the correction required?

<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 src="http://ws.strikeiron.com/ZacksCompany3?WSDL"></script><script>
function stockQuote() {
var result = sforce.apex.execute("strikeIronZackComp ","getCompProf",{arg:"jns"});
document.getElementById('userNameArea').innerHTML = 'details: '+result;
}
</script>

</head>
<body onload=stockQuote()>
<div id=userNameArea></div>

</body>
</html>

I am using the below apex code for the s-control

global class strikeIronZackComp {

WebService static string getCompProf(string ticker){
string result;
wwwStrikeironCom3.ZacksCompanySoap zcomp = new wwwStrikeironCom3.ZacksCompanySoap();

// Set up the license header
zcomp.LicenseInfo = new wsStrikeironCom3.LicenseInfo();
zcomp.LicenseInfo.UnregisteredUser = new wsStrikeironCom3.UnregisteredUser();
zcomp.LicenseInfo.UnregisteredUser.EmailAddress = 'xxx@xx.com';

// Make the Web service call
wwwStrikeironCom3.ZacksCompanyOutput compprof = zcomp.GetCompanyProfile('jns');

result = compprof.ServiceResult.Ticker;
//result = comprof.Ticker
//return result;
return compprof.ServiceResult.Ticker;
}


}
You are not authorized to post a reply.
Forums > Web Services > Sample Code & Community Projects > salesforce integration (s-control mashup)



ActiveForums 3.7
Top Projects




Sun / NetBeans

Salesforce.com

IBM QEDWiki

Microsoft Visual Studio VSTO

Zend

 

Special Events

Mashup Camp
Oct 6-8

Web 2.0 Expo
Sept 16-19