• sivahoskeri
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am trying to mash-up info returned by "zack company" web service (strikeiron) by converting thier wsdl to apex code in salesforce.
The following s-control isnt working for me - can you please let me know the correction required?
 
<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>

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

</body>
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 = 'sippon77@gmail.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;
        }
        
    static testMethod void testHelloWorld() {
            System.assertEquals('Hello to you!', getCompProf('jns'));
    }
}
I am trying to mash-up info returned by "zack company" web service (strikeiron) by converting thier wsdl to apex code in salesforce.
The following s-control isnt working for me - can you please let me know the correction required?
 
<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>

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

</body>
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 = 'sippon77@gmail.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;
        }
        
    static testMethod void testHelloWorld() {
            System.assertEquals('Hello to you!', getCompProf('jns'));
    }
}