• Ashwin
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
Hi all,


I am working in implementing 2 sided ssl in salesforce. I see that there are two options

 

[1]. self-signed

 

[2]. CA signed

 

For [1] when I use it in a webservice call its gives the following error:

 

"der input integer tag error"

 

For [2] I suppose it must be signed by someone before its used. Who does this signing?


Regards

Ashwin

 
  • March 29, 2010
  • Like
  • 0

 

 Hi all

 

I have a webserive and I use the controller below  to invoke the service. I also use the list returned by the webservice to render a data table in VF page.

 

class listControllerExtension
{
public List<mywebservice.myItems> getmyItems() {

        mywebservice.MywebserviceServiceImplPort stub =  new mywebservice.MywebserviceServiceImplPort();
  

        myitems=(List<mywebservice.myItems>)stub.giveItems(orderNumber);

    return myitems;

}
}


At the moment I am writing testMethod and stuck badly. Can some one give some hints on how to write test cases for a webservice callout? The testMethod I wrote would navigate to the page and do a webservice callout which is

 

Account acc2 = new Account (itemNumberr= '2342');

    insert acc2;
PageReference pageRef = new PageReference('/'+123213);

   
    Test.setCurrentPage(pageRef);

ApexPages.StandardController Qcontroller = new ApexPages.StandardController(acc2);
listControllerExtension qe = new listControllerExtension(QController);

    qe.acct = acc2;

    List<mywebservice.myItems> Dummy= qe.getmyItems();

 

I see this error in the test log

 

17:46:27.458|FATAL_ERROR|System.TypeException: Methods defined as TestMethod do not support Web service callouts, test skipped

 

 

Thanks in advance 

 

Ashwin

 

  • March 18, 2010
  • Like
  • 0

Hi all,

 

 I have a double amount which I receive from a webservice. This value is formatted like this ###.##0.00. I wanted to change to Euro format and I use the following code. This however has no effect. Can anyone give some suggestion on how to format to Euro. Typical Euro value will look like 1.243,00 upto 2 decimal places.

 

<apex:column >
<apex:facet name="header"><b>Formatted</b></apex:facet>€
<apex:outputText value="{0, number, ###,###,###,##0.00}">
<apex:param value="{!amount}"/>
</apex:outputText>
</apex:column>
  • March 18, 2010
  • Like
  • 0

Hi all,

 

I have a simple question but not able to figure out. I have a controller class and it has few methods. I wanted to know if its possible to add a main method as in Java? Or any other possibility to create a method which is always invoked when the page is loaded.

 

Thanks in advance

 

Ashwin

  • March 02, 2010
  • Like
  • 0

Hi all,

 

I am new to salesforce and am using this tutorial to invoke a webservice.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm

 

My wsdl2Apex has

  

public Map<String,String> inputHttpHeaders_x;

 

in the DocSamplePort class. 

 

 

public class test {
docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.inputHttpHeaders_x = new Map<String, String>();
}

 

And I get the following error while making a inputHttpHeaders_x object which is

 

 

Error: Compile Error: unexpected token: '=' at line 3 column 24 


I read lot of discussions in the forum and there seem to be no problems of this sort. Can anyone point me where I am going wrong?

 

Thanks in Advance.

 

 

  • February 24, 2010
  • Like
  • 0
Hi all,


I am working in implementing 2 sided ssl in salesforce. I see that there are two options

 

[1]. self-signed

 

[2]. CA signed

 

For [1] when I use it in a webservice call its gives the following error:

 

"der input integer tag error"

 

For [2] I suppose it must be signed by someone before its used. Who does this signing?


Regards

Ashwin

 
  • March 29, 2010
  • Like
  • 0

 

 Hi all

 

I have a webserive and I use the controller below  to invoke the service. I also use the list returned by the webservice to render a data table in VF page.

 

class listControllerExtension
{
public List<mywebservice.myItems> getmyItems() {

        mywebservice.MywebserviceServiceImplPort stub =  new mywebservice.MywebserviceServiceImplPort();
  

        myitems=(List<mywebservice.myItems>)stub.giveItems(orderNumber);

    return myitems;

}
}


At the moment I am writing testMethod and stuck badly. Can some one give some hints on how to write test cases for a webservice callout? The testMethod I wrote would navigate to the page and do a webservice callout which is

 

Account acc2 = new Account (itemNumberr= '2342');

    insert acc2;
PageReference pageRef = new PageReference('/'+123213);

   
    Test.setCurrentPage(pageRef);

ApexPages.StandardController Qcontroller = new ApexPages.StandardController(acc2);
listControllerExtension qe = new listControllerExtension(QController);

    qe.acct = acc2;

    List<mywebservice.myItems> Dummy= qe.getmyItems();

 

I see this error in the test log

 

17:46:27.458|FATAL_ERROR|System.TypeException: Methods defined as TestMethod do not support Web service callouts, test skipped

 

 

Thanks in advance 

 

Ashwin

 

  • March 18, 2010
  • Like
  • 0

Hi all,

 

 I have a double amount which I receive from a webservice. This value is formatted like this ###.##0.00. I wanted to change to Euro format and I use the following code. This however has no effect. Can anyone give some suggestion on how to format to Euro. Typical Euro value will look like 1.243,00 upto 2 decimal places.

 

<apex:column >
<apex:facet name="header"><b>Formatted</b></apex:facet>€
<apex:outputText value="{0, number, ###,###,###,##0.00}">
<apex:param value="{!amount}"/>
</apex:outputText>
</apex:column>
  • March 18, 2010
  • Like
  • 0

Hi all,

 

I have a simple question but not able to figure out. I have a controller class and it has few methods. I wanted to know if its possible to add a main method as in Java? Or any other possibility to create a method which is always invoked when the page is loaded.

 

Thanks in advance

 

Ashwin

  • March 02, 2010
  • Like
  • 0

Hi all,

 

I am new to salesforce and am using this tutorial to invoke a webservice.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm

 

My wsdl2Apex has

  

public Map<String,String> inputHttpHeaders_x;

 

in the DocSamplePort class. 

 

 

public class test {
docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.inputHttpHeaders_x = new Map<String, String>();
}

 

And I get the following error while making a inputHttpHeaders_x object which is

 

 

Error: Compile Error: unexpected token: '=' at line 3 column 24 


I read lot of discussions in the forum and there seem to be no problems of this sort. Can anyone point me where I am going wrong?

 

Thanks in Advance.

 

 

  • February 24, 2010
  • Like
  • 0