• inbaljS2
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 10
    Replies

Hi all, 

 

I am trying to get a http request from a 3rd party company. This company is sending the request to a visualforce page I have created and published on my site. 

 

My problem is with how am I getting the XML on their request?

 

I could only find examples to sending a http request but not for getting and sending a response. 

 

Can someone please give me an example of how I can do that?

 

Thank you very much,

Inbal 

Hi all,

I have created a listener page on force.com sites, in which I use the regular guest user permissions and not a customer portal user. 

 

The problem is that when ever the 3rd party company is trying to send httpRequest for me to that page they are keep getting as a response this error message:

"Error posting XML message. Response Code=401 Response Message=Unauthorized" 

 

I believe it is probably related to a permissions issue, I just don't really understand why. 

 

It's probably important to say that the page is a HTTPS page. 

 

Anyone have any idea on why this is happening? And how I can fix that?

 

Thank you,

Inbal

 

Hi All, 

I am trying to invoke a callout to an external company using httpRequest and response. 

 

after researching the community I have found that the oncomplete attribute should be used. 

 

so i have split my 'submit' function to 2: submit which called on the action attribute and to 'calloutRequest' that invoke the callout and called on the oncomplete attribute.

 

the 'calloutRequest' function is never invokes...

any suggestions?

Thanks, 

Inbal

 

Hi all,

I need to read an XML document which has a lot of branches to it, for example:

 

<?xml version="1.0" encoding="UTF-8"?>

<header xmlns="http://example.com" name="inbal">

<firstElement type="first">

   <secondElement>someText</secondElement>

        <thirdElement>

              <forthElement>sometext</forthElement>

              <forthElement>sometext2</forthElement>

        </thirdElement>

</firstElement>

</header>

 

does someone has a code that can help me read this XML?

I have tried to do it using the Xmlstreamreader but I am not sure that "reader.next" or "reader.hasnext" is actually going through the way on the children, does it enter to the children as well with no special method?

Thanks,

Inbal

Hello all,

I have created a visualforce page with a custom controller calls "Xcontroller". 

on my controller I have defined a member of my class "Y" like this:

 

"private static Y y = new Y(a,b);"

 

This line is executed on page load.

 

When I click on my page button "finish" I invoke the function I created in my controller called "finish".

 

In this function I call functions from my class y, for example:

 

public class y {

 

private static string z;

private static string A;

private static string B;

 

public y(string a, string b)

{

     A=a;

     B=b;

}

 

public string getZ()

{

return z;

}

 

public static void setZ(string zz)

{

    z=zz;

}

 

}

 

 

on my controller :

public with sharing class Xcontroller{

 

private static Y y = new Y(a,b);

 

public Xcontroller()

{

}

 

public pagereference finish()

{

string w= y.getZ();

}

 

 

the problem is that when I click on "finish" the value in 'w' is null although on the page load before it got a value!

 

Can anyone help me understand what I did wrong?

Thanks a lot,

Inbal

 

 

Hi All,

I am trying to write a code to create a personalized Widget of EchoSign.

This is my first time working with API in Salesforce and i wonder how does the creation of a request and getting a response back works?

 

I have generated the wsdl using wsdl2apex by pressing the generate wsdl on salesforce.

I have recieved all the API classes and worked with them.

now when i try to run the code using my VisualForce page, on the debug log  i get for example the following:

 

CALLOUT_REQUEST|[515,13]|apiEchosign.createPersonalEmbeddedWidget_element request_x::SFDC_STACK_DEPTH=1 SOAPAction="" User-Agent=SFDC-Callout/19.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
19:31:17.957|CALLOUT_RESPONSE|[515,13]|

 

does anyone can help me understand what exactly does it mean?

i am not getting a response right?

 

Does sfdc suppose to do it alone just by me calling the functions from the API classes or am I supposed to set a connection? and if so than how?

 

 

thank you,

Inbal

 

 

 

Hi,

I would like to create visualforce page which will present Contact details using the contact id in the URL, 

but I would like to be able to present this info to anyone who would like to see it and not only my salesforce users.

 

Is there any way in doing so?

 

I saw on the starbucks site that they are presenting their ideas to anyone who enters the site - how is that being done?

 

Any help will be grateful...

 

Thanks all,

Inbal

Hi all,

I have created a listener page on force.com sites, in which I use the regular guest user permissions and not a customer portal user. 

 

The problem is that when ever the 3rd party company is trying to send httpRequest for me to that page they are keep getting as a response this error message:

"Error posting XML message. Response Code=401 Response Message=Unauthorized" 

 

I believe it is probably related to a permissions issue, I just don't really understand why. 

 

It's probably important to say that the page is a HTTPS page. 

 

Anyone have any idea on why this is happening? And how I can fix that?

 

Thank you,

Inbal

 

Hi All, 

I am trying to invoke a callout to an external company using httpRequest and response. 

 

after researching the community I have found that the oncomplete attribute should be used. 

 

so i have split my 'submit' function to 2: submit which called on the action attribute and to 'calloutRequest' that invoke the callout and called on the oncomplete attribute.

 

the 'calloutRequest' function is never invokes...

any suggestions?

Thanks, 

Inbal

 

Hi all,

I need to read an XML document which has a lot of branches to it, for example:

 

<?xml version="1.0" encoding="UTF-8"?>

<header xmlns="http://example.com" name="inbal">

<firstElement type="first">

   <secondElement>someText</secondElement>

        <thirdElement>

              <forthElement>sometext</forthElement>

              <forthElement>sometext2</forthElement>

        </thirdElement>

</firstElement>

</header>

 

does someone has a code that can help me read this XML?

I have tried to do it using the Xmlstreamreader but I am not sure that "reader.next" or "reader.hasnext" is actually going through the way on the children, does it enter to the children as well with no special method?

Thanks,

Inbal

Hello all,

I have created a visualforce page with a custom controller calls "Xcontroller". 

on my controller I have defined a member of my class "Y" like this:

 

"private static Y y = new Y(a,b);"

 

This line is executed on page load.

 

When I click on my page button "finish" I invoke the function I created in my controller called "finish".

 

In this function I call functions from my class y, for example:

 

public class y {

 

private static string z;

private static string A;

private static string B;

 

public y(string a, string b)

{

     A=a;

     B=b;

}

 

public string getZ()

{

return z;

}

 

public static void setZ(string zz)

{

    z=zz;

}

 

}

 

 

on my controller :

public with sharing class Xcontroller{

 

private static Y y = new Y(a,b);

 

public Xcontroller()

{

}

 

public pagereference finish()

{

string w= y.getZ();

}

 

 

the problem is that when I click on "finish" the value in 'w' is null although on the page load before it got a value!

 

Can anyone help me understand what I did wrong?

Thanks a lot,

Inbal

 

 

Hi everyone,

 

Does anyone have any experience/example code with setting a sites page to function as a listener/handler for an http POST?  

 

Thanks! 

Can anyone tell me how to fix the following issue with Eclipse?

I get the error message:
Unable to load Scontrol Editor
FactoryException: No id found for filepath 'S-Controls/MyControl.scf'

This is happening ever since I installed the latest version of Eclipse (3.3/Europa) in order to get the Force.com toolkit.  I followed the Wiki to do a new install (this was recommended) even though I had an older version of Eclipse (3.2 I think) with all of my code there.  When I installed the new version that is called Java IDE as indicated on the Wiki, I get this error every time I try to open any of my scontrols.  When I installed the Europa (3.3) version of Eclipse it asked me where I wanted to have my workspace and I pointed it to where all of my old projects in the last version of Eclipse were...could this be the issue?  Please advise on how to proceed as I am stuck and need to do some Apex coding to update my app....

Thanks in advance for any help...