Simultaneous Web Service Requests From Same Template

2009-08-21 Thread Jason Neidert

I have an app I am building that hits a web service and returns lodging
inventory.

 

Sometimes there can be as many as 7 room types in a search result.

 

That means it calls the web service 7 times and returns the inventory data
each time.

 

I loop through the 7 room types on the server side and send the room type
and arrival/departure dates to the web service.

 

Is there a way to hit that web service concurrently and store the results in
array or something as they come in?

 

Visual example:

 

Room #1 --- hits web service - returns dataset - 1-3 seconds response

 

Next-Room #2 --- hits web service - returns dataset- 1-3 seconds response

 

Next-Room #3 --- hits web service - returns dataset- 1-3 seconds response

 

And so on...

 

Total execution time can be around 15+ seconds for the page to retrieve
inventory for all rooms before displaying available ones.

 

Thoughts??

 

Jason Neidert
_

 http://www.steelfusion.com/ steelFusion_emailFooter

jason.neid...@steelfusion.com

p: 715.302.4495

f: 715.842.4907

 

 




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325584
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Inserting NULL between characers using CFFILE

2009-08-19 Thread Jason Neidert

Leigh,

Thanks for that information. Exactly what I needed!!!

I had got it working in the meantime by doing this:

1. creating a small file from Winhex that only contained 1 NULL character.
2. Using CFFILE to read this into a variable
3. Replacing all occurrences from the Hex data with that variable containing
the NULL character.

BUT, now that I have this it works great, thanks!




-Original Message-
From: Leigh [mailto:cfsearch...@yahoo.com] 
Sent: Tuesday, August 18, 2009 4:07 PM
To: cf-talk
Subject: Re: Inserting NULL between characers using CFFILE


 Does anyone know how to get CFFILE to insert NULL chars
 into a file?

I have not tried it with cffile specifically, but here is one way to create
a null character

http://www.coldfusiondeveloper.com.au/go/blog/2007/05/06/null-character/




  




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325547
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Inserting NULL between characers using CFFILE

2009-08-18 Thread Jason Neidert

Here's a good one, maybe the answer is simple.

 

I'm pulling a JPEG as HEX data eg. ('ffd8ffe00...') from a remote system.

 

I am already converting the hex values back to their corresponding ASCII
values.

 

Everything works fine except for the original parts that have a HEX value of
'00'

 

When I use chr(0) it returns nothing and so I am missing all the NULL parts
of the JPEG and it won't display.

 

Does anyone know how to get CFFILE to insert NULL chars into a file?

 

 

 

 

 

Jason Neidert
_

 http://www.steelfusion.com/ steelFusion_emailFooter

jason.neid...@steelfusion.com

p: 715.302.4495

f: 715.842.4907

 

 




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325532
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


FW: Calling .ASPX.VB from .CFM

2009-07-24 Thread Jason Neidert

I figured out a way and will try to explain below so others can try to
benefit from it.

I needed to call a .NET web service passing it a complex structure of data.
It would then in turn return a complex object that had the search results
for room availability. I then had to do alot of CFDUMPS of my returned
object until I found how to parse through the XML.

==
cfscript
// create credentials object
CheckAvailabilityR.Credentials = StructNew();
CheckAvailabilityR.Credentials.LogonID = IRMTest;
CheckAvailabilityR.Credentials.Password = **;
CheckAvailabilityR.Credentials.DataPath = **;
CheckAvailabilityR.Credentials.DatabaseID = #attributes.databaseID#;

// create availability obnject
CheckAvailabilityR.AvailabilityRequest = StructNew();
CheckAvailabilityR.AvailabilityRequest.ArrivalDate =
#dateFormat(attributes.arrivalDate, -mm-dd)#;
CheckAvailabilityR.AvailabilityRequest.DepartureDate =
#dateFormat(attributes.departureDate, -mm-dd)#;
CheckAvailabilityR.AvailabilityRequest.RoomType = #attributes.roomType#;
CheckAvailabilityR.AvailabilityRequest.People1 = #attributes.numAdults#;
CheckAvailabilityR.AvailabilityRequest.People2 = 0;
CheckAvailabilityR.AvailabilityRequest.People3 = 0;
CheckAvailabilityR.AvailabilityRequest.People4 = 0;

// create the web service
irm = CreateObject(webservice,
http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;);

// pass the checkAvailability object to the services CheckAvailability
method
CheckAvailabilityRQ = irm.checkAvailability(CheckAvailabilityR);

// get the status of the result
status = CheckAvailabilityRQ.getStatus();
statusText = status.getValue();

// call the get inventory method
inv = CheckAvailabilityRQ.getInventory();

// get the raw data from the result
invData = inv.get_any();

// create new structure to hold raw data
dataset = StructNew();

// load resulting data into new structure
dataset = invData;

// parse raw data from MS diffgram and parse the XML
rawRoomData = xmlParse(dataset[2]);

// grab array of room records
roomResults = rawRoomData[diffgr:diffgram][inventory].XmlChildren;
/cfscript

cfdump var=#roomResults#

=
That's all the ColdFusion code I need to call the web service pass it the
structure of data then receive and parse the results. The only thing left
for me to do is to encapsulate it in a CFC that will return me a CF
recordset or a no inventory available status.


Thanks everyone for your help



-Original Message-
From: Jason Neidert [mailto:ja...@steelfusion.com] 
Sent: Thursday, July 23, 2009 1:54 PM
To: cf-talk
Subject: RE: Calling .ASPX.VB from .CFM


I DID IT!!  now what?
I need to extract the resulting recordset. 

If I called the method 'getInventory() ' as such:
cfscript
inv = CheckAvailabilityRQ.getInventory();
/cfscript

I know it has a recordset somewhere in there that contains records for each
day that room is available and the inventory available on that date. The
third cfdump on that page shows the info on the object created stored in the
variable 'inv'.

I'm thinking now I need to use Coldfusion again to create the proper object
to receive a recordset extracted from the 'inv' object.

The good news is this, I was able to use ColdFusion to create complex
structures and very simply open a web service and return results. No where
this clean and nice with the aspx.vb file that came with it. 


View the dumps of the object with methods I am getting back. 
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal
lDotNet.cfm


cfset CheckAvailabilityRQ.Credentials = StructNew() /
cfset CheckAvailabilityRQ.Credentials.LogonID = IRMTest /
cfset CheckAvailabilityRQ.Credentials.Password = 1qasw2 /
cfset CheckAvailabilityRQ.Credentials.DataPath = c:\rdp1202\rdp85 /
cfset CheckAvailabilityRQ.Credentials.DatabaseID = 29005 /


cfset CheckAvailabilityRQ.AvailabilityRequest = StructNew() /
cfset CheckAvailabilityRQ.AvailabilityRequest.ArrivalDate = 1998-03-18 /
cfset CheckAvailabilityRQ.AvailabilityRequest.DepartureDate = 1998-03-20
/
cfset CheckAvailabilityRQ.AvailabilityRequest.RoomType = k /
cfset CheckAvailabilityRQ.AvailabilityRequest.People1 = 1 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People2 = 0 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People3 = 0 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People4 = 0 /


cfscript
irm = CreateObject(webservice,
http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;);
CheckAvailabilityRQ = irm.checkAvailability(CheckAvailabilityRQ);
/cfscript
cfdump var=#CheckAvailabilityRQ#

View the dump here:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal
lDotNet.cfm


Now how do I get the data out?


-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, July 22, 2009 1:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 SO... if I use CFINVOKE I am not quite

RE: Calling .ASPX.VB from .CFM

2009-07-23 Thread Jason Neidert

I'm getting closer, and I will get this, when I doI hope others can learn
from it. I really appreciate this forum.

So I used CFSCRIPT and created an instance of the web service:

cfscript
irm = CreateObject(webservice,
http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;);
/cfscript

Then I used CFDUMP to see it:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal
lWebService.cfm

It shows me the methods. I want to use method 'checkAvailability'

I need to pass it a complex object as defined in the SOAP:
CheckAvailabilityRQ
  Credentials
LogonID22352345234/LogonID
Password234523452354/Password
DataPath235234523452/DataPath
DatabaseID52345234523/DatabaseID
  /Credentials
  AvailabilityRequest
ArrivalDate2009-08-20/ArrivalDate
DepartureDate2009-08-22/DepartureDate
RoomTypesingle/RoomType
People12/People1
People20/People2
People30/People3
People40/People4
  /AvailabilityRequest
/CheckAvailabilityRQ

How do I go about building this object in CF?

Top-level: CheckAvailabilityRQ

Sub: Credentials
Items: 
 logonID: java.lang.String
 password: java.lang.String
 dataPath: java.lang.String
 databaseID: java.lang.String

Sub: AvailabilityRequest
Items: 
 arrivalDate: java.util.Calendar
 departureDate: java.util.Calendar
 roomType: java.lang.String
 people1: int
 people2: int
 people3: int
 people4: int

I am thinking that if I can build this object I can then do this:

cfscript
checkAvailResult = Irm.CheckAvailability(complex object created above) 
/cfscript

Right now if I do that without the object created right I get the ol':

==Web service operation CheckAvailability with parameters... cannot be
found==

I've researched enough to know that if you don't have your complex object
built right to map the the java stubs you will get this.



-Original Message-
From: Casey Dougall [mailto:ca...@uberwebsitesolutions.com] 
Sent: Wednesday, July 22, 2009 8:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


On Wed, Jul 22, 2009 at 6:06 PM, Jason Neidert ja...@steelfusion.comwrote:



 How can I accomplish the creation of the object CheckAvailabilityRQ using
 ColdFusion?

 cfobject
name = IRMPublic
webservice= http://resortdata.com/IRMPublic;
type = webservice
wsportname = IRMPublicMethodsSoap

 Then use CFINVOKE or something to create an instance of
 'IRMPublic.CheckAvailability_irmRQ'?

 I think I am getting closer...


you try something like this? not sure what the actual url is to api

cfset APIURL = '
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/rdpweb/
IRMPublic.wsdl
'

cfxml VARIABLE=GetAvailRequest CASESENSITIVE=YES
  CheckAvailability xmlns=http://resortdata.com/IRMPublic;
CheckAvailabilityRQ
  Credentials
LogonID22352345234/LogonID
Password234523452354/Password
DataPath235234523452/DataPath
DatabaseID52345234523/DatabaseID
  /Credentials
  AvailabilityRequest
ArrivalDate2009-08-20/ArrivalDate
DepartureDate2009-08-22/DepartureDate
RoomTypesingle/RoomType
People12/People1
People20/People2
People30/People3
People40/People4
  /AvailabilityRequest
/CheckAvailabilityRQ
  /CheckAvailability
/cfxml

CFHTTP url=#APIURL#
  method=post
  resolveurl=yes
  throwOnError=no port=80 charset=utf-8
  CFHTTPPARAM type=xml value=#GetAvailRequest#
/CFHTTP

cfdump VAR=#cfhttp.FileContent#




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324858
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-23 Thread Jason Neidert

I DID IT!!  now what?
I need to extract the resulting recordset. 

If I called the method 'getInventory() ' as such:
cfscript
inv = CheckAvailabilityRQ.getInventory();
/cfscript

I know it has a recordset somewhere in there that contains records for each
day that room is available and the inventory available on that date. The
third cfdump on that page shows the info on the object created stored in the
variable 'inv'.

I'm thinking now I need to use Coldfusion again to create the proper object
to receive a recordset extracted from the 'inv' object.

The good news is this, I was able to use ColdFusion to create complex
structures and very simply open a web service and return results. No where
this clean and nice with the aspx.vb file that came with it. 


View the dumps of the object with methods I am getting back. 
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal
lDotNet.cfm


cfset CheckAvailabilityRQ.Credentials = StructNew() /
cfset CheckAvailabilityRQ.Credentials.LogonID = IRMTest /
cfset CheckAvailabilityRQ.Credentials.Password = 1qasw2 /
cfset CheckAvailabilityRQ.Credentials.DataPath = c:\rdp1202\rdp85 /
cfset CheckAvailabilityRQ.Credentials.DatabaseID = 29005 /


cfset CheckAvailabilityRQ.AvailabilityRequest = StructNew() /
cfset CheckAvailabilityRQ.AvailabilityRequest.ArrivalDate = 1998-03-18 /
cfset CheckAvailabilityRQ.AvailabilityRequest.DepartureDate = 1998-03-20
/
cfset CheckAvailabilityRQ.AvailabilityRequest.RoomType = k /
cfset CheckAvailabilityRQ.AvailabilityRequest.People1 = 1 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People2 = 0 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People3 = 0 /
cfset CheckAvailabilityRQ.AvailabilityRequest.People4 = 0 /


cfscript
irm = CreateObject(webservice,
http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;);
CheckAvailabilityRQ = irm.checkAvailability(CheckAvailabilityRQ);
/cfscript
cfdump var=#CheckAvailabilityRQ#

View the dump here:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal
lDotNet.cfm


Now how do I get the data out?


-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, July 22, 2009 1:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 SO... if I use CFINVOKE I am not quite sure what to pass in the
 CFINVOKEARGUMENT

 Do I attempt to create a large structure and pass it in under
 'CheckAvailability_irmRQ'?

I think you'll need a little more than that; you'll need CFCs to
represent the objects and you'll need to use CFPROPERTY to name the
properties of those objects in a way that the CF WSDL stub builder
will be able to map to the original WSDL. For example, a Credentials
object:

!--- credentials.cfc ---
cfcomponent
cfproperty name=LogonID type=string required=yes
   ... other properties go here ...
   ... code to populate those properties goes here ...
/cfcomponent

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324890
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-22 Thread Jason Neidert

I am beginning to see how WSDL works here and how I will be able to call it
via CFINVOKE.

If I want to call the method called 'CheckAvailability' I am still a bit
sketchy on what data structures to pass.

It appears that:

 - CheckAvailability CALLS CheckAvailability_irmRQ
 - CheckAvailability_irmRQ CALLS Credentials
 - Credentials CALLS irmWebSvcCredentials
 - - irmWebSvcCredentials is looking for a structure containing 4
strings

 - CheckAvailability_irmRQ ALSO CALLS AvailabilityRequest
 - AvailabilityRequest  CALLS irmDatesRoomInfo
 - - irmDatesRoomInfo is looking for a structure that contains 2
dates, 1 string and 4 integers


SO... if I use CFINVOKE I am not quite sure what to pass in the
CFINVOKEARGUMENT

Do I attempt to create a large structure and pass it in under
'CheckAvailability_irmRQ'?


Here is an example I was provided of the SOAP request to check availability:
soap:Body
CheckAvailability xmlns=http://resortdata.com/IRMPublic;
  CheckAvailabilityRQ
Credentials
  LogonIDstring/LogonID
  Passwordstring/Password
  DataPathstring/DataPath
  DatabaseIDstring/DatabaseID
/Credentials
AvailabilityRequest
  ArrivalDatedateTime/ArrivalDate
  DepartureDatedateTime/DepartureDate
  RoomTypestring/RoomType
  People1int/People1
  People2int/People2
  People3int/People3
  People4int/People4
/AvailabilityRequest
  /CheckAvailabilityRQ
/CheckAvailability
  /soap:Body





-Original Message-
From: James Holmes [mailto:james.hol...@gmail.com] 
Sent: Saturday, July 18, 2009 7:13 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


Yes, look at the request in the WSDL:

wsdl:message name=CheckAvailabilitySoapIn
wsdl:part name=parameters element=tns:CheckAvailability /
  /wsdl:message

and then

s:element name=CheckAvailability
s:complexType
  s:sequence
s:element minOccurs=0 maxOccurs=1
name=CheckAvailabilityRQ type=tns:CheckAvailability_irmRQ /
  /s:sequence
/s:complexType
  /s:element
  s:complexType name=CheckAvailability_irmRQ
s:sequence
  s:element minOccurs=0 maxOccurs=1 name=Credentials
type=tns:irmWebSvcCredentials /
  s:element minOccurs=0 maxOccurs=1
name=AvailabilityRequest type=tns:irmDatesRoomInfo /
/s:sequence
  /s:complexType
  s:complexType name=irmWebSvcCredentials
s:sequence
  s:element minOccurs=0 maxOccurs=1 name=LogonID
type=s:string /
  s:element minOccurs=0 maxOccurs=1 name=Password
type=s:string /
  s:element minOccurs=0 maxOccurs=1 name=DataPath
type=s:string /
  s:element minOccurs=0 maxOccurs=1 name=DatabaseID
type=s:string /
/s:sequence
  /s:complexType
  s:complexType name=irmDatesRoomInfo
s:sequence
  s:element minOccurs=1 maxOccurs=1 name=ArrivalDate
type=s:dateTime /
  s:element minOccurs=1 maxOccurs=1 name=DepartureDate
type=s:dateTime /
  s:element minOccurs=0 maxOccurs=1 name=RoomType
type=s:string /
  s:element minOccurs=1 maxOccurs=1 name=People1 type=s:int
/
  s:element minOccurs=1 maxOccurs=1 name=People2 type=s:int
/
  s:element minOccurs=1 maxOccurs=1 name=People3 type=s:int
/
  s:element minOccurs=1 maxOccurs=1 name=People4 type=s:int
/
/s:sequence
  /s:complexType

There's a lot of work building the correct request type for that service.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

2009/7/19 Adrian Lynch:

 Yes. Chances are you need to pass arguments along with your method call.

 -Original Message-
 From: Jason Neidert
 Sent: 17 July 2009 18:50
 To: cf-talk
 Subject: RE: Calling .ASPX.VB from .CFM
...
 It tells me that CheckAvailability cannot be found. I can see the it
 though
 in the wsdl file. Am I calling incorrectly?



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324808
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-22 Thread Jason Neidert

Dave,

That definitely points me in a better direction, thank you.

One other thing that is confusing me however is how the complex types of the
WSDL are pointing to other complex types. For instance, in this following
bit of the WSDL:
s:element name=CheckAvailability
s:complexType
s:sequence
s:element minOccurs=0 maxOccurs=1
name=CheckAvailabilityRQ type=tns:CheckAvailability_irmRQ / 
/s:sequence
/s:complexType
  /s:element

s:complexType name=CheckAvailability_irmRQ
s:sequence
s:element minOccurs=0 maxOccurs=1 name=Credentials
type=tns:irmWebSvcCredentials / 
s:element minOccurs=0 maxOccurs=1
name=AvailabilityRequest type=tns:irmDatesRoomInfo / 
/s:sequence
/s:complexType


The element 'CheckAvailability' defines a complex type of
'CheckAvailability_irmRQ'. 

'CheckAvailability_irmRQ' is later defined as a complex type that points to
two other complex types within the WSDL. 

I'm trying to wrap my brain around how to create and send complex objects to
the web service but it's hurting. I know that the data to be sent in is:
String: dataPath
String: LogonID
String: Password
String: DatabaseID
String: RoomType
DateTime: ArrivalDate
DateTime: DepartureDate
Int: People1
Int: People2
Int: People3 
Int: People4

How can it be so tricky to get these values into cold fusion objects that
will map correctly the XML of this WSDL? Just a bit more insight and I
promise I won't write again until I have exhausted all newly found help.






-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, July 22, 2009 1:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 SO... if I use CFINVOKE I am not quite sure what to pass in the
 CFINVOKEARGUMENT

 Do I attempt to create a large structure and pass it in under
 'CheckAvailability_irmRQ'?

I think you'll need a little more than that; you'll need CFCs to
represent the objects and you'll need to use CFPROPERTY to name the
properties of those objects in a way that the CF WSDL stub builder
will be able to map to the original WSDL. For example, a Credentials
object:

!--- credentials.cfc ---
cfcomponent
cfproperty name=LogonID type=string required=yes
   ... other properties go here ...
   ... code to populate those properties goes here ...
/cfcomponent

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324821
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-22 Thread Jason Neidert

Dave,

I dug more and here is the aspx.vb file which .NET uses to create the
objects:

In the web.config file there is a setting:
appSettings
add key=IRMPublic.IRMPublic
value=http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx/
/appSettings

Then in the aspx.vb file:

 Dim irm As New IRMPublic.IRMPublicMethods

  Dim CheckAvailabilityRQ As New IRMPublic.CheckAvailability_irmRQ
  Dim CheckAvailabilityRS As IRMPublic.CheckAvailability_irmRS

  With CheckAvailabilityRQ
.Credentials = New IRMPublic.irmWebSvcCredentials
'loginid/password for testing
.Credentials.LogonID = IRMTest
.Credentials.Password = 1qasw2
'DataPath dependant on propery installation, for demo use
c:/rdp1202/rdp95
.Credentials.DataPath = txtDataPath.Text
'Unique id between 29000-2 for each session, set in Global.asax
.Credentials.DatabaseID = Session(DatabaseID).ToString


.AvailabilityRequest = New IRMPublic.irmDatesRoomInfo
With .AvailabilityRequest
  'Current date in demo files is 03/01/1998
  .ArrivalDate = CType(txtArrival.Text, Date)
  .DepartureDate = CType(txtDeparture.Text, Date)
  'Valid room types for demo: DD, Q, QQ, K, KA, PH
  .RoomType = txtRoom.Text
  .People1 = CType(ddPeople.SelectedValue, Int32)
  .People2 = 0 : .People3 = 0 : .People4 = 0
End With
  End With

  CheckAvailabilityRS = irm.CheckAvailability(CheckAvailabilityRQ)

SO, I am thinking that CFINVOKE will call the method 'CheckAvailability'

I will need to pass it the CheckAvailabilityRQ object

The CheckAvailabilityRQ object will contain the 'Credentials' and the
'AvailabilityRequest' objects that you gave me insight on how to create via
CFCOMPONENT. 

Once I create the 'Credentials' and 'AvailabilityRequest' objects how do I
nest them inside an object called 'CheckAvailabilityRQ'?






-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, July 22, 2009 1:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 SO... if I use CFINVOKE I am not quite sure what to pass in the
 CFINVOKEARGUMENT

 Do I attempt to create a large structure and pass it in under
 'CheckAvailability_irmRQ'?

I think you'll need a little more than that; you'll need CFCs to
represent the objects and you'll need to use CFPROPERTY to name the
properties of those objects in a way that the CF WSDL stub builder
will be able to map to the original WSDL. For example, a Credentials
object:

!--- credentials.cfc ---
cfcomponent
cfproperty name=LogonID type=string required=yes
   ... other properties go here ...
   ... code to populate those properties goes here ...
/cfcomponent

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324823
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-22 Thread Jason Neidert

Digging deeper...

Using a program called 'Altova MapForce'. Opened the WSDL file in there,
here are the global settings.

WSDL Definitions:
http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl
Service: {http://resortdata.com/IRMPublic}IRMPublicMethods
Port: IRMPublicMethodsSoap
Operation: {http://resortdata.com/IRMPublic}CheckAvailability

Endpoint: http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx

Looking again at the aspx.vb file:

Dim CheckAvailabilityRQ As New IRMPublic.CheckAvailability_irmRQ
(in the VB file it appears they are creating a new object from the def.
IRMPublic.CheckAvailability_irmRQ) 

How can I accomplish the creation of the object CheckAvailabilityRQ using
ColdFusion?

cfobject
name = IRMPublic
webservice= http://resortdata.com/IRMPublic;
type = webservice
wsportname = IRMPublicMethodsSoap

Then use CFINVOKE or something to create an instance of
'IRMPublic.CheckAvailability_irmRQ'?

I think I am getting closer...

 



-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, July 22, 2009 1:11 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 SO... if I use CFINVOKE I am not quite sure what to pass in the
 CFINVOKEARGUMENT

 Do I attempt to create a large structure and pass it in under
 'CheckAvailability_irmRQ'?

I think you'll need a little more than that; you'll need CFCs to
represent the objects and you'll need to use CFPROPERTY to name the
properties of those objects in a way that the CF WSDL stub builder
will be able to map to the original WSDL. For example, a Credentials
object:

!--- credentials.cfc ---
cfcomponent
cfproperty name=LogonID type=string required=yes
   ... other properties go here ...
   ... code to populate those properties goes here ...
/cfcomponent

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324825
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-17 Thread Jason Neidert

I was told that the .vb writes the soap. 

Here is the SOAP:
http://irm.resortdata.com/LutsenInterface/IRMpublic.asmx?op=CheckAvailabilit
y

So could I skip having the aspx.vb file generating the soap and just
generate it myself and send it to the SOAPAction address?

Thanks so much for your quick response.





-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Thursday, July 16, 2009 4:12 PM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 I was able to setup this .NET app on my test server and get it to work:

http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/Default
.aspx

 I pre-loaded valid input to get search results.
 Just click 'Check Availability' to return inventory data.

 OKAY, so there is a default .aspx page that has this at the top of it:
 How in the heck can I call this aspx.vb and pass to it the dates, room
type, etc.. and
 read the responses from within a coldfusion page?

Since it's an HTML form and action page, you can use CFHTTP to send an
HTTP POST request to the action page URL. Since it's .NET, you may
need to actually use CFHTTP to fetch the form and get the VIEWSTATE,
so you can send that with your POST.

I noticed you listed a WSDL file, but I didn't see any file that
obviously corresponds to a SOAP service. You may want to ask the
provider of this code if there is a SOAP interface, since that would
be easier to invoke.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more informatio



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324655
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Calling .ASPX.VB from .CFM

2009-07-17 Thread Jason Neidert

Here is a link to the .WSDL file:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/rdpweb/
IRMPublic.wsdl

So I tried this:
cfinvoke 
 
webservice=http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp
/rdp/rdpweb/IRMPublic.wsdl 
method=CheckAvailability
returnvariable=aTemp
/cfinvoke

cfdump var=#aTemp#


To call this code:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/act_callDot
Net.cfm

It tells me that CheckAvailability cannot be found. I can see the it though
in the wsdl file. Am I calling incorrectly?

Thanks again,
Jason



-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Friday, July 17, 2009 10:31 AM
To: cf-talk
Subject: Re: Calling .ASPX.VB from .CFM


 I was told that the .vb writes the soap.

 Here is the SOAP:

http://irm.resortdata.com/LutsenInterface/IRMpublic.asmx?op=CheckAvailabilit
 y

 So could I skip having the aspx.vb file generating the soap and just
 generate it myself and send it to the SOAPAction address?

If there's a URL for the WSDL file, you should be able to invoke it
directly from CF using CFINVOKE. That WSDL file will contain the
instructions for CF to talk to your .NET web service.

If the web service is returning complex types, you may have to futz
around with CF to get what you need.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324667
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Calling .ASPX.VB from .CFM

2009-07-16 Thread Jason Neidert

Been writing CF apps for 10 years. First time posting. Humbling experience and 
probably well needed.

Scenario:

Was provided files from a 3rd party that would allow me to search motel 
inventory.
Client wants me to search inventory and integrate into existing coldfusion 
based website.

I was able to setup this .NET app on my test server and get it to work:
http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/Default.aspx

I pre-loaded valid input to get search results.
Just click ‘Check Availability’ to return inventory data.

OKAY, so there is a default .aspx page that has this at the top of it:
%@ Page Language=VB AutoEventWireup=false CodeFile=Default.aspx..vb 
Inherits=_Default %

Here is the file structure under ‘RDP’

RDP-
Default.aspx
Default.aspx.vb
Global.asax
IRMNetSample.sln
web.config

App_WebReferences (sub-folder)
IRMPublic (sub-folder)
IRMPublic.disco
IRMPublic.discomap
IRMPublic.wsdl


QUESTION:
How in the heck can I call this aspx.vb and pass to it the dates, room type, 
etc.. and read the responses from within a coldfusion page?

Do I use CFINVOKE and if so how?

I’m stumped, any thoughts, please?


Jason Neidert
_

jason.neid...@steelfusion.com
p: 715.302.4495
f: 715.842.4907


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4