Jump to content

XF021209

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by XF021209

  1. Hello, I'm very new to using AutoIT for SOAP access. I've looked and tried to work with several of the examples located in the forum, but am having no luck. I have a system I'm trying to access and can do so with SoapUI, but when I try to duplicate what it's doing in AutoIT I am not getting anywhere. Below is what I do in SoapUI and the response I get from the system I'm connecting to. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="https://soap.COMPANY.com/"> <soapenv:Header/> <soapenv:Body> <soap:doLogin> <Login>USERNAME@COMPANY.COM</Login> <Password>PASSWORD</Password> </soap:doLogin> </soapenv:Body> </soapenv:Envelope> The response is: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://soap.COMPANY.com/"> <SOAP-ENV:Body> <ns1:doLoginResponse> <result> <session>08dkOGMwZDUyOTYyMTQzMjZjZTlhZGFjZGUxNTIa</session> <user_id>922707</user_id> <user_name>USER NAME</user_name> <user_email>USERNAME@COMPANY.COM</user_email> <organisation_id>115531</organisation_id> <organisation_name>COMPANY</organisation_name> <limit_storage>9610844</limit_storage> <limit_proofs>119994057</limit_proofs> <max_file_size>4505600</max_file_size> <default_subject/> <default_message/> <default_email_notifications>3</default_email_notifications> <default_authorized_only>false</default_authorized_only> <default_enable_subscriptions>false</default_enable_subscriptions> <default_validate_subscriptions>false</default_validate_subscriptions> <default_auto_lock>false</default_auto_lock> <default_lock_after_first_decision>false</default_lock_after_first_decision> <default_enable_download>true</default_enable_download> <default_enable_team_url>true</default_enable_team_url> <default_enable_embed_player>true</default_enable_embed_player> <default_show_dashboard_link>true</default_show_dashboard_link> <default_show_workspace_link>true</default_show_workspace_link> <default_show_details_page_link>true</default_show_details_page_link> <default_show_versions_link>true</default_show_versions_link> <default_show_help_link>true</default_show_help_link> <default_show_help_quick_start_link>true</default_show_help_quick_start_link> <default_show_help_user_guide_link>true</default_show_help_user_guide_link> <default_show_help_welcome_screen_link>true</default_show_help_welcome_screen_link> <default_show_help_forum_link>true</default_show_help_forum_link> <default_show_help_blog_link>true</default_show_help_blog_link> </result> </ns1:doLoginResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> For such a simple logon request a lot of user account data is included. This is fine, but no matter what code I write in AutoIT I can't seem to even get a connection established. I've looked at several AutoIT examples from advanced users such as https://beamtic.com/http-requests-autoit but I'm simply not understanding the format. I would appreciate some help or advice on figuring this out. Essentially for starters I'd like to be able to send and get the same results as I do with SoapUI. Thanks for any assistance you can provide. Todd
  2. Thanks Water, I'll take a look. The modified Lod3n's code ran this morning almost perfectly. I didn't include the $item.Delete() until after it had run so that'll be a live test for tomorrow. The $item.Delete() actually works better for me, one less thing to delete out of the folder where the email with the attachment is delivered. In manual testing it worked so hopefully I'll see the same results in live testing. As mentioned I'm a system admin much more than a coder, and I really don't understand much of what you all write or how it all works, but I'm learning bit by bit. I am also amazed at how many different ways AutoIT can be used to accomplish the same task - so I will certainly look at your code, and learn as much as I can about it. I'm also looking to see how I can interface with an API for our companies Project Management (PPM) application. The current process I'm using Lod3n's code is for a report generated by the PPM, emailed to my Outlook, Lod3n's code strips off the report and places it in SharePoint. I use DataSyncStudio to read the previously attached file (it's user account information) and update a List in SharePoint. A SharePoint workflow then sends me an email for each account that does not reflect the data in our HR personnel system. All that is automated - now comes the manual part. I update the accounts in our PPM app manually. I'm looking into how I can make that part automated, so the PPM app reflects the data in our HR personnel system. It's so much fun having convoluted systems that don't like to talk to each other, a place I've found AutoIT fits in nicely, allowing me to automate otherwise manual only processes. The PPM app has limited API',s but hopefully I'll be able to get AutoIT to talk to the app and update the user account records. Thanks again, Todd
  3. I can't believe how much I enjoy this application and community. I've been trying to write my own routine to do exactly what this does and feel stupid for not looking here first. I usually do come here and almost always find what I need. Some minor changes to the code and the problem I was having is solved. Some of you are geniuses. I'm not a coder, I'm a systems admin, so down deep coding is just not something I do well. In most cases I can get what I need done with my dirty coding methods, but saving an attachment from an email wasn't one of them. This routine though posted almost 14 years ago works like a champ with few modifications I needed. If anyone is listening, I do have two questions - first is that the $attachment.Delete() does not work well for me for some reason. What I mean by that is when I was first testing, it appeared to work a few times, but in most cases the attachment isn't deleted. This isn't a major issue as I delete the email after the routine has run, but it would be better if the routine deleted the attachment. I am running the routine on a PC that is logged in with my user account but locked. Outlook 2013 is running on that PC minimized. Another option and the second question is that I noticed $item is used in the routine. Would I be able to add in $item.Delete() to delete the actual email itself? I've added in an If/EndIf line so the only file the attachment is saved from meets the file name I'm looking for: If $attachment.DisplayName = "filename.xxx" Then $attachment.SaveasFile("Y:\" & $attachment.DisplayName) EndIf I have the $attachment.Delete() uncommented but as mentioned above, it doesn't usually delete the file from the email. So, can I add $item.Delete() and try to have the entire email deleted? (Never mind - I got bold and tried it - and it worked perfectly - The particular email was deleted! That resolves the problem of the attachment not always being deleted.) Thank you again lod3n for posting this code. Even though posted 14 years ago, it's still very useful today. It just saved me manually having to save this file each morning for further processing by another system, that doesn't accept email or email attachments. Thank you, Todd
  4. Thank you for the direction. I'll try that and see how it works. Greatly appreciated. Of course looking at it now, I clearly see that I needed to look at SEND and not at BinaryToString which is what I kept searching for an answer. One of the best things about AutoIT is that the Help file is extremely helpful if you look in the right place. I maintain a lot of commercial apps that don't even come close. Thanks again. Todd
  5. I'm having a small issue with use of the BinaryToString function and not finding anything in search on the forum. Here's the short of it: I am encrypting a password and storing that in a file. I open the file reading in the encrypted password into a variable. I use a msgbox function to display the un-encrypted password. It shows correctly. I use the Send function to type the password into a password box in IE. When I click on the password unmask icon (the dot with the curved underscore line), the password is missing the last character. The last character happens to be an exclamation point "!". So, the password is encrypted as: ThisPassword! The password displays in the msgbox using the variable assigned to hold the decrypted password as: ThisPassword! After using the send function and the ******* appears in the password window, clicking on the password unmask icon, what is displayed is: ThisPassword Missing the "!" I'm not sure why this is occurring. Local $dEncrypted = FileRead("C:\Users\_user\Documents\AutoIT\Credential.txt") Local $bEncrypted = _Crypt_DecryptData($dEncrypted, $sUserKey, $CALG_RC4) Local $Password = BinaryToString($bEncrypted) msgbox(0,"",$Password,0); Displays ThisPassword! in the message box window Send($Password); Displays ThisPassword when the password unmask icon is clicked I know I'm missing something simple, but can't seem to figure out what it is. Any help is greatly appreciated. Sincerely, Todd C.
×
×
  • Create New...