Re: [U2] XML and Accuterm

2005-08-26 Thread FFT2001
In a message dated 8/26/2005 8:42:36 AM Pacific Standard Time,  
[EMAIL PROTECTED] writes:

the VB  equivalent that you would use would be something like:

Dim oXMLServer  As Object
Set oXMLServer =  CreateObject(Msxml2.ServerXMLHTTP.3.0)

The last example on the page  shows how to send and receive XML.

The syntax is visual basic so it is  identical to using the UniObject 
Libraries.


Thanks Rob for this info, I'll check it out.
Will 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-26 Thread Glen B
 OK I've tried this and got a response, so it ~will work. The problem lies in 
the DOM object. UPS isn't getting the document content
and is sending back a missing XML document error. BTW, I'm on W2K and I 
didn't have to install the XML bundle. I have all the
latest SP's though as well as the .NET development kit. I'll try to find the 
ActiveX control that contains both of these objects and
post the filenames.

 Btw, if you want to kill Accuterm 2K2 regularly, just put a msgbox(xmldoc) 
right after the xmldoc is finished setting. I need to
post this over to Pete on the Asent forum.

PS: you will need an active UPS XML developer key and account in order to 
actually use this code. If you run it as-is you will get a
response, but it won't be tracking info. g

Sub Main()

Dim oXMLServer As Object
Dim oXMLDocument As Object
Dim xmldoc As String
Dim tracknum As String

Set oXMLServer = CreateObject(Msxml2.ServerXMLHTTP.3.0)
Set oXMLDocument = CreateObject(Msxml2.DOMDocument.3.0)

oXMLDocument.async = False
userid = my-UPS-dev-userid
passwd=my-UPS-dev-password
licensenum=my-UPS-dev-license
tracknum = my-trackingnum

xmldoc=
xmldoc=xmldoc  ?xml version=  Chr(34)  1.0  Chr(34)  ?  Chr(13)  
Chr(10)
xmldoc=xmldoc  AccessRequest xml:lang=  Chr(34)  en-US  Chr(34)   
 Chr(13)  Chr(10)
xmldoc=xmldoc  AccessLicenseNumber  licensenum  /AccessLicenseNumber 
 Chr(13)  Chr(10)
xmldoc=xmldoc  UserId  userid  /UserId  Chr(13)  Chr(10)
xmldoc=xmldoc  Password  passwd  /Password  Chr(13)  Chr(10)
xmldoc=xmldoc  /AccessRequest  Chr(13)  Chr(10)
xmldoc=xmldoc  ?xml version=  Chr(34)  1.0  Chr(34)  ?  Chr(13)  
Chr(10)
xmldoc=xmldoc  TrackRequest xml:lang=  Chr(34)  en-US  Chr(34)
Chr(13)  Chr(10)
xmldoc=xmldoc  Request  Chr(13)  Chr(10)
xmldoc=xmldoc  TransactionReference  Chr(13)  Chr(10)
xmldoc=xmldoc  CustomerContextExample 1/CustomerContext  Chr(13)  
Chr(10)
xmldoc=xmldoc  XpciVersion1.0001/XpciVersion  Chr(13)  Chr(10)
xmldoc=xmldoc  /TransactionReference  Chr(13)  Chr(10)
xmldoc=xmldoc  RequestActionTrack/RequestAction  Chr(13)  Chr(10)
xmldoc=xmldoc  RequestOptionnone/RequestOption  Chr(13)  Chr(10)
xmldoc=xmldoc  /Request  Chr(13)  Chr(10)
xmldoc=xmldoc  TrackingNumber  tracknum  /TrackingNumber  Chr(13)  
Chr(10)
xmldoc=xmldoc  /TrackRequest  Chr(13)  Chr(10)

oXMLDocument.loadXML(xmldoc)
oXMLServer.open (POST,https://www.ups.com/ups.app/xml/Track,False)
oXMLServer.send (oXMLDocument)

MsgBox(oXMLServer.responseXML.xml)

End Sub

Glen

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Friday, August 26, 2005 11:30 AM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] XML and Accuterm


 I wrote on 25/08/2005 19:42:13:

  In my original post, I admitted to not actually using Accuterm.  I was
  basically saying that if Accuterm supported VBA then it should
 definitely
  be possible to send and receive XML just as you could in VB.
 
  I've since been on the Accuterm site just to check what it can do.  It
  does seem to have the capability to use VB object libraries and here's a

  URL link to a page on their site which goes into a lot of detail:
 
  http://www.asent.com/email_white_paper.htm
 
  As for the actual code to send and receive XML, I will need to dig that
  out of an application and I'll post it tomorrow hopefully.

 I promised some pointers to sending and receiving XML using a Windows
 application such as Accuterm that supports VBA.  Here is a link to a page
 on Microsoft's site that gives some ASP examples:

 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/e5c17f89-0197-496c-9164-ce0bbbd8490f.asp

 Where the code has:

 var objSrvHTTP;
 objSrvHTTP = Server.CreateObject (Msxml2.ServerXMLHTTP.3.0);

 the VB equivalent that you would use would be something like:

 Dim oXMLServer As Object
 Set oXMLServer = CreateObject(Msxml2.ServerXMLHTTP.3.0)

 The last example on the page shows how to send and receive XML.

 The syntax is visual basic so it is identical to using the UniObject
 Libraries.

 You need to be aware that if you go down this route then every Accuterm
 client PC that requires the functionality would require the XML library
 installing locally (or the DLL registered).  This is one of the reasons
 why getting code to execute on the server is preferable.

 In order to get hold of the library, go onto Micro$oft's site and do a
 search for MSXML from the Download Centre.
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-25 Thread robwills_u2list
Glen wrote:

 I'm pretty sure that Accuterm has no capability to perform socket 
connections using scripts.
 It has VBA(Visual Basic for Applications) capabilities, which is 
nothing like VB.

That is not my experience.  VBA is a lot like VB.  I have no experience of 
Accuterm but if it has a decent implementation of VBA then you could do 
whatever you like that you can do in VB including using standard Microsoft 
XML libraries which include methods for sending and receiving XML via HTTP 
(just an example).

Regards,

Rob Wills
(rob dot wills at tigerinfotech dot com)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] XML and Accuterm

2005-08-25 Thread FFT2001
In a message dated 8/25/2005 12:41:26 AM Pacific Standard Time,  
[EMAIL PROTECTED] writes:

VB  including using standard Microsoft 
XML libraries which include methods for  sending and receiving XML via HTTP 


Do you have example code where you do this?
Thanks
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-25 Thread Victor St Clair
In a message dated 8/25/2005 12:41:26 AM Pacific Standard Time,  
[EMAIL PROTECTED] writes:

VB  including using standard Microsoft 
XML libraries which include methods for  sending and receiving XML via HTTP 


Do you have example code where you do this?
Thanks

I would also be interested in seeing any examples you have of that.
thanks
Victor St. Clair
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] XML and Accuterm

2005-08-25 Thread FFT2001
In a message dated 8/24/2005 10:26:39 PM Pacific Standard Time,  
[EMAIL PROTECTED] writes:

have the  client shell out, execute the
function, return data to a local file, 


Do you have an example of how to execute a request like that  in  Windows or 
Unix and return the result to a local file?
Thanks
Will
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-25 Thread robwills_u2list
In my original post, I admitted to not actually using Accuterm.  I was 
basically saying that if Accuterm supported VBA then it should definitely 
be possible to send and receive XML just as you could in VB.

I've since been on the Accuterm site just to check what it can do.  It 
does seem to have the capability to use VB object libraries and here's a 
URL link to a page on their site which goes into a lot of detail:

http://www.asent.com/email_white_paper.htm

As for the actual code to send and receive XML, I will need to dig that 
out of an application and I'll post it tomorrow hopefully.

Regards,

Rob Wills
(rob dot wills at tigerinfotech dot com)

[EMAIL PROTECTED] wrote on 25/08/2005 15:20:08:

 In a message dated 8/25/2005 12:41:26 AM Pacific Standard Time, 
 [EMAIL PROTECTED] writes:
 
 VB  including using standard Microsoft 
 XML libraries which include methods for  sending and receiving XML via 
HTTP 
 
 
 Do you have example code where you do this?
 Thanks
 
 I would also be interested in seeing any examples you have of that.
 thanks
 Victor St. Clair 
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-25 Thread Glen B
  Interesting. If you have a registered ActiveX or DLL, then you can create an 
instance of it using 2K and 2K2's VBA scripting. You
also will need documentation on the methods and elements that the object 
contains. I've been using 97 for many years now, so I never
knew about that. I just recently upgraded to 2K2. Thanks for the info.

  So, there is a possibility to use an ActiveX object that can post and 
retrieve XML documents. The white paper is specifically for
integrating Accuterm into Office, with a focus on Outlook. In order to post and 
retrieve XML documents, the ActiveX control or DLL
will have to do that behind the scenes. Maybe there are some free or non-free 
controls out there specifically for that. I dunno. I
still prefer to do things like that from MV using platform independant tools

Glen

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Thursday, August 25, 2005 2:42 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] XML and Accuterm


 In my original post, I admitted to not actually using Accuterm.  I was
 basically saying that if Accuterm supported VBA then it should definitely
 be possible to send and receive XML just as you could in VB.

 I've since been on the Accuterm site just to check what it can do.  It
 does seem to have the capability to use VB object libraries and here's a
 URL link to a page on their site which goes into a lot of detail:

 http://www.asent.com/email_white_paper.htm

 As for the actual code to send and receive XML, I will need to dig that
 out of an application and I'll post it tomorrow hopefully.

 Regards,

 Rob Wills
 (rob dot wills at tigerinfotech dot com)

 [EMAIL PROTECTED] wrote on 25/08/2005 15:20:08:

  In a message dated 8/25/2005 12:41:26 AM Pacific Standard Time,
  [EMAIL PROTECTED] writes:
 
  VB  including using standard Microsoft
  XML libraries which include methods for  sending and receiving XML via
 HTTP
 
 
  Do you have example code where you do this?
  Thanks
 
  I would also be interested in seeing any examples you have of that.
  thanks
  Victor St. Clair
  ---
  u2-users mailing list
  u2-users@listserver.u2ug.org
  To unsubscribe please visit http://listserver.u2ug.org/
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] XML and Accuterm

2005-08-25 Thread FFT2001
In a message dated 8/25/05 11:49:01 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:

 I've since been on the Accuterm site just to check what it can do.  It 
 does seem to have the capability to use VB object libraries and here's a 
 URL link to a page on their site which goes into a lot of detail:
 
 http://www.asent.com/email_white_paper.htm 

Tony this link as you can see goes into detail on how to use VB Object 
libraries.  I think it's really horrible that you think it's just fine to go 
into 
long-winded detail discussions of what a piece of crap I am.

I have posted dozens of code examples myself here and am always trying to be 
helpful to others in this forum. I do not just come here for help, I actively 
seek to help others.  And yes I also make my living by selling my services, 
but I know as you do, that most of the people who use this list, aren't looking 
to buy anything. So when I ask for a little help in an area I'm not comforable 
with suddenly I'm a troll, a loser, a waste, a user of other's knowledge 
without contributing.

That's not how it works Tony Gravagno.  How it works is we each contribute 
and we each gain.  Sorry if you feel like you have no need to help anyone 
except 
by your occasional advertisements without putting [AD] in your heading, and 
thereby causing all of us to read through your long diatribes about your great 
software/service that we can't all live without.

Well guess what Tony, Mr perfect who-never-needs-any-help-from-anyone-else?  
I don't care what you think.  So have a nice day.

Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] XML and Accuterm

2005-08-24 Thread FFT2001
Does someone have a code example where they are sending an XML request using 
Accuterm scripting ?
Thanks
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-24 Thread Tony Gravagno
Will wrote:
 Does someone have a code example where they are sending
 an XML request using Accuterm scripting ?
 Thanks

An XML request for what?  Can you give us an example of how you would use
that?  XML is just a blob of text so it's no different than any other text.


AccuTerm is a good raw data pipe so you can use it from code rather than as
an emulator, and thus use it to pass XML to/from the server.  There is no
native parsing mechanism in AccuTerm so you'd have to write that part of it
yourself.

Now if you want to use the emulator to pass XML... I don't get the
application.

As always, the answer is that anything is possible, there's only that
little question of : do you really want to do what you're asking.

Tony
TG@ removethisNebula-RnD
.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] XML and Accuterm

2005-08-24 Thread FFT2001
In a message dated 8/24/05 1:04:59 PM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:

 An XML request for what?  Can you give us an example of how you would use
 that?  XML is just a blob of text so it's no different than any other text. 


Here is a name, look up this person's address, using an internet service.
The internet service can read XML and respond in some way.
I can write the XML, I just don't have any examples in Accuterm script of 
people sending and getting a response.  So I'm anticipating some sort of code 
like

Response = SendHttp(myhttpstring, wait=5 seconds, error)
If error then quit else ProcessResponse(Response)

Thats all I'm really looking for is an example of sending and receiving back 
the response.
Thanks
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-24 Thread Glen B
 Why bother with Accuterm? You can do what you want straight from the command 
line using BASIC. I'm pretty sure that Accuterm has no
capability to perform socket connections using scripts. It has VBA(Visual Basic 
for Applications) capabilities, which is nothing
like VB. You could write an XML bridge in VB or VC++ and then load it. Using a 
DDE server in the application, you can post DDE
client requests from Accuterm to the application using VBA calls. However, 
that's like building a speed bump out of glass. It'll do
the job, sort of, but it'll end up breaking at some point and cost way too much 
time and money to build in the first place.

Here's a (extremely trimmed) UPS XML tracking example I've done with cURL and 
directory Q-pointers under D3. Took me about 30
minutes to implement it.

tbuffer=fill in this with the XML request header and document
open 'tmp' to tmp.f else stop
filen=tracknum:rnd(100):.txt
write tbuffer on tmp.f, filen
CMD = '!curl -s -H Content-type: text/xml 
https://www.ups.com/ups.app/xml/Track -d @/tmp/':FILEN
EXECUTE CMD CAPTURING OUTPUT
EXECUTE !rm -f /tmp/':FILEN
CALL XMLPARSERSUB(OUTPUT,ELEMENTS,'0')
LOCATE TrackResponse.Shipment.Package.Activity.Status.StatusType.Description 
IN ELEMENTS1 SETTING VM THEN
 PACKAGEACTIVITY = ELEMENTS3,VM
END

 Since curl runs on just about all platforms, this is a cross-platform solution.

Glen
http://mvdevcentral.com
http://picksource.com

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED]
 Sent: Wednesday, August 24, 2005 6:53 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] XML and Accuterm


 In a message dated 8/24/05 1:04:59 PM Pacific Daylight Time,
 [EMAIL PROTECTED] writes:

  An XML request for what?  Can you give us an example of how you would use
  that?  XML is just a blob of text so it's no different than any other text.
 

 Here is a name, look up this person's address, using an internet service.
 The internet service can read XML and respond in some way.
 I can write the XML, I just don't have any examples in Accuterm script of
 people sending and getting a response.  So I'm anticipating some sort of code 
 like

 Response = SendHttp(myhttpstring, wait=5 seconds, error)
 If error then quit else ProcessResponse(Response)

 Thats all I'm really looking for is an example of sending and receiving back
 the response.
 Thanks
 Will Johnson
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] XML and Accuterm

2005-08-24 Thread Tony Gravagno
Glen hit it all on the head.
Will, when you say you want AccuTerm to do something, in this case AccuTerm
is doing nothing but passing the message along to some other process that
will actually do the function.  The only need to ever include AccuTerm or
wIntegrate in a complex function is when you Need the client to perform the
operation because the server cannot.  If all you want to do is call Web
Services, you can do that directly from your MV platforms.  If you Need the
_client_ to do the function then have the client shell out, execute the
function, return data to a local file, then send the local file to the
server for processing.  I dunno about glass speedbump but that's sure the
sort of unnecessary Rube Goldberg contraption that Pick people create way
too often.

To _execute_ the function, use the sequence ESC STX  thefunction CR.
Check the AT Help for details and alternatives.

The magic bit I have to leave out is exactly what is that function/code on
the client that calls a web service and parses XML?  Well, the world is
full of examples and it's up to you to roll your own or find some code to
do what you need - but the Accuterm part is as easy as it is unnecessary.

As always I can help if required.

Good luck,
Tony
Author, Web Services and .NET article series, Spectrum Magazine


Glen B wrote:
  Why bother with Accuterm? You can do what you want
 straight from the command line using BASIC.

From Will:
 Here is a name, look up this person's address, using an
 internet service.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/