• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Proxy Generator

New Here ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Greetings,

Our company utilizes Vovici survey solutions. I am attempting to integrate the reporting using their API into out KM analytics reporting dashboard. I can connect using the CFMX proxy generator, but I could not pull data back. I contacted them and this was the response from one of their developers...

quote:

You need to ensure that the CookieContainer property of the proxy class you're using to call the web service has been set to a valid CookieContainer object. This is how the EFM Community web service API maintains state between method invocations. If this property isn't set, you'll be able to login but the very next function you attempt to call will result in an "Invalid Access" exception because--as far as EFM Community is concerned--you haven't logged in.

Here's how this is done in C#:


using System;using System.Collections.Generic;using System.Net;namespace exampleapp{ class Program { static void Main(string[] args) { ProjectData projectData = new ProjectData(); projectData.CookieContainer = new CookieContainer(); projectData.Login("myuserid", "mypassword"); ...


I am not a C# developer and our site is done in CF anyway. Does anyone know how to accomplish this? I could not find anything in any of the documentation beyond the basics.

Thanks,

~Clay
TOPICS
Advanced techniques

Views

968

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

fs22 wrote:
> Greetings,

Can you show the code actually generated with that wizard?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Did a bit of Googling around and found this blog that might apply to
your scenario.

http://tjordahl.blogspot.com/2006/06/how-to-set-cookies-in-coldfusion-soap.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Here is the code you asked for...

<cfinvoke
webservice=" http://efm.activant.com/ws/projectdata.asmx?wsdl"
method="login"
returnvariable="aString">
<cfinvokeargument name="userName" value="Yada"/>
<cfinvokeargument name="password" value="Yada"/>
</cfinvoke>
<cfinvoke
webservice=" http://efm.activant.com/ws/projectdata.asmx?wsdl"
method="getSurveyList"
returnvariable="a_GetSurveyListResponse_GetSurveyListResult">
<cfinvokeargument name="sharingType" value="0"/>
</cfinvoke>

Survey List - <cfoutput>#a_GetSurveyListResponse_GetSurveyListResult#</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

fs22 wrote:
> Here is the code you asked for...

Does the link help? Or do you have questions on it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Not really because I am using the CFMX proxy and not the Apache one.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

fs22 wrote:
> Not really because I am using the CFMX proxy and not the Apache one.

No you are using the Apache one, because that is what ColdFusion uses.
That is why I asked for the code, because I'm not used to calling these
'proxies'. But you are just invoking a web service.

Your code used <cfinovke...>

The example code uses createObject().

Other then that, you are doing the same thing.

It sounds like you are using a Dreamweaver wizard and that is masking
what goes on in the actual code. This can not be done with the proxy
wizard. You will need to extend that code to accommodate this requirement.

The first question to absolutely answer, is are you passing an HTTP
cookie, not SOAP header. Looking at the example code I would say yes,
but it is important to be sure.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

ok...thanks for the tip...other than the link you su[plied earlier...do you have any other areas where perhaps I could read up and learn more?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

fs22 wrote:
> ok...thanks for the tip...other than the link you su[plied earlier...do you have any other areas where perhaps I could read up and learn more?

Nothing off the top of my head. I'm not a web service expert. But I
have always, eventually, sometimes with much hair pulling, gotten
ColdFusion to work with any web service I have needed to use.

I just found that link by searching Google for "coldfusion consume web
service cookies". You may want to check other links this search returns.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Ian Skinner wrote:
> You may want to check other links this search returns.
>

Having said that, I looked at the results again and found this
ColdFusion live docs link.

http://livedocs.adobe.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/webservices4....

It is for version 6, but I am sure it all still applies, and that there
is a 7 and 8 equivalent livedocs pages. But it gives a good comparison
between the <cfinvoke...> and createObject() syntax that may help you
translate the two forms.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2008 Dec 13, 2008

Copy link to clipboard

Copied

LATEST
I have not quite figured out how to do this. Anyone have any other thoughts/ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation