Post new topic Reply to topic  [ 8 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject: Help with DLL Conversion
PostPosted: Thu Jun 18, 2009 1:12 pm 
Offline

Joined: Thu Jun 18, 2009 1:07 pm
Posts: 4
I created a VB.NET 2005 Class DLL that performs two functions for retrieving data from a web server database using SOAP. It works great when called with a VB.NET Client EXE. However, from what I am reading in the TeleFlow documentation, this type of DLL can't be accessed from a TeleFlow script. We're looking for someone who can convert this to a C++ or some other form of a Standard DLL that TeleFlow can access.

Thanks,
Eric

Eric Eckberg
Intedata Systems, Inc.


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Thu Jun 18, 2009 4:02 pm 
Offline
Site Admin

Joined: Wed Dec 31, 1969 5:00 pm
Posts: 329
Location: Vancouver, BC
You don't need a DLL to do what you describe. You should be able to achieve this with TeleFlow natively.

You can retrieve data from a Web server via the TeleFlow HTTP step, and you can use the TeleFlow XML steps to parse the SOAP document you receive.

This process has one oddity to you that is worth knowing in advance. When you retrieve an HTTP document, it will get loaded into a TeleFlow variable. In order to work with the XML steps, you have to "convert" that variable into an XML object with the XML Load Step. This will also associate a handle with the XML object. You will use that Handle to request nodes from the XML object via the XML Fetch step.

Here are some links to our on-line documentation to help you:
HTTP Step
XML Load Step
XML Fetch Step


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Fri Jun 19, 2009 8:04 am 
Offline

Joined: Thu Jun 18, 2009 1:07 pm
Posts: 4
Thanks Tim, that sounds much easier.

I created a simple script that does to HTTP post, but am getting an error. I can manually create the request string in a browser (http://.../Service.asmx/GetName?strDoma ... rSSN4=9999) and it returns what I'm expecting, but when I run it via TeleFlow, I get the following in the log:

2009/06/19 09:59:47.000: Sending request: 'POST /tfws/Service.asmx/GetName HTTP/1.0
User-Agent: TeleFlow
Accept: */*
Host: xxxxxxxxxxxxxxx:80 (don't want to share this publicly)
Content-Length: 56
strDomain=woodfin&strAccountNumber=00010000&strSSN4=9354'
2009/06/19 09:59:47.000: Request successful, waiting for response
2009/06/19 09:59:47.078: ERROR: 'HTTP/1.1 500 Internal Server Error

Connection: close
Date: Fri, 19 Jun 2009 14:54:41 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 213

System.InvalidOperationException: Request format is invalid: .
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

Any ideas what I'm doing wrong? I'd be happy to email the entire log file and what I've specifying in the HTTP step.

Thanks,
Eric


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Fri Jun 19, 2009 8:52 am 
Offline

Joined: Thu Jun 18, 2009 1:07 pm
Posts: 4
Nevermind, figure it out by changing it to a GET instead of a POST and building the GET string as a variable that is attached to the URL. Now I need to figure out the XML Load and Fetch steps.

Eric


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Fri Jun 19, 2009 10:05 am 
Offline
Site Admin

Joined: Wed Dec 31, 1969 5:00 pm
Posts: 329
Location: Vancouver, BC
Glad to hear you worked it out.

One more thing to know about our XML steps is that you cannot, currently, fetch the top-level node of any document. You will get an exception and your application will terminate. We are aware of this bug and it will be fixed in the next release of TeleFlow. You can safely fetch every node below the top-level.

We are weeks away from releasing the next version, and there will be an announcement on teleflow.org.


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Thu Jul 16, 2009 10:10 am 
Offline
Site Admin

Joined: Wed Dec 31, 1969 5:00 pm
Posts: 329
Location: Vancouver, BC
The new version of TeleFlow has been released! This corrects the issue where you can't fetch the top-level node of an XML document. The stable build is 2009.7.13. It is available from teleflow.org's download page: http://teleflow.org/download.html.


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Thu Aug 20, 2009 3:54 pm 
Offline

Joined: Thu Jun 18, 2009 1:07 pm
Posts: 4
We're not having a problem with our final HTTP request in our script. It's structured exactly the same as the others, but this one results in a HTTP/1.1 400 Bad Request error coming from the server. However, it works fine when pasted into the browser. Here is an example of the request:

http://www.viewmybill.net/tfws/Service. ... ount=Water Bill&strPay1Desc=Clear Stream Water&strPay1Amount=5.00&strPay2Account=Test 2 payment&strPay2Desc=Test payment 1&strPay2Amount=2.50&strPay3Account=Test 3 payments&strPay3Desc=Test message 3&strPay3Amount=2.33&strDateTime=2009/08/20 10:12:55&strCustName=TEST PERSON&strCustEmail=

Any ideas?

Thanks,
Eric


Back to top
 Profile WWW 
 
 Post subject: Re: Help with DLL Conversion
PostPosted: Mon Aug 24, 2009 11:30 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
The TeleFlow HTTP step doesn't encode you URL for you, as does a browser. This means that if your URL contains "illegal" URL characters, you will need to encode them yourself. In fact, if you paste your URL into a browser, and go to the page, the URL you entered will be encoded, such that if you copy the URL into the TeleFlow HTTP step that is failing, it will now work. (Of course, you are probably gathering dynamic data from the caller, so you can't use a set URL like this)

Your URL requires replacement(encoding) for spaces only, so I would suggest you build your own URLEncode flowchart, where you pass in the URL you have now, and receive back the encoded URL. Inside this flowchart, you can have a flowchart that takes the string and replaces all space characters with their appropriate encoded value. (For spaces, the replacement string is %20) There is a template flowchart that does this called FindAndReplaceString. To add a template flowchart to your application, go to the TAP screen, flip to the "Templates" tab of the Steps Toolbox, click FindAndReplaceString, and drop it onto the TAP screen flowchart space.

If you have other URLs and find you need to account for additional invalid characters, you can then add those to the URLEncode flowchart, until you cover all you need.


Back to top
 Profile WWW 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.