My xml post seems to work only i get a unknown error

Hi Guys,
Thanks to this forum my post finally works. But i get an unknown error in this script:
# Setup data in variables$Login = "login"
$Password = "password"
$Reference = "Technisch beheer"
$BodyType = "Text"
$BodyHeader = "Test"
$Message = "TestMessage"
$ToOperator="My name"
$ToNumber="My phone"
# Create a XML document
function sendXML{
$url = "https://secure.cm.nl/smssgateway/cm/gateway.ashx"
$parameters = '<?xml version="1.0" encoding="utf-8"?>`
<MESSAGES>`
<CUSTOMER ID="$Login" />`
<USER LOGIN="$Login" PASSWORD="$Password" />`
<REFERENCE>"Standby"</REFERENCE>`
<MSG>`
<BODY TYPE="$BodyType" HEADER="$BodyHeader">$Message</BODY>`
<TO OPERATOR="$ToOperator">"$ToNumber"</TO>`
</MSG>`
</MESSAGES>'
Invoke-WebRequest -Uri $url -Method POST -Body $parameters
sendXML
Error when i start the code:
StatusCode        : 200
StatusDescription : OK
Content           : Error: ERROR Unknown error
RawContent        : HTTP/1.1 200 OK
                    Content-Length: 26
                    Cache-Control: private
                    Content-Type: text/plain; charset=utf-8
                    Date: Wed, 04 Jun 2014 13:34:08 GMT
                    Server: Microsoft-IIS/7.5
                    X-AspNet-Version: 4.0.30319
                    X-Pow...
Unknown error is hard to troubleshoot.
Any ideas?
Kind regards,
André

Yes, I have an idea: do not use a string for $parameters; use a double-quoted here-string:
$parameters=@"
<?xml version="1.0" encoding="utf-8"?>
etc...
( and don't forget to delete the grave accents - back ticks )

Similar Messages

  • All of a sudden my iTunes stopped working, and I get the following error messages:   1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem   and   2. iTunes was not installed correct

    All of a sudden my iTunes stopped working, and I get the following error messages:
    1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem
    and
    2. iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 126).
    Now I've checked the forums and followed the advice of uninstalling all Apple applications, rebooting, and reinstalling iTunes.
    This is not working. I've tried installing as Administrator but doesn't make any difference at all.
    There must be a way to fix this? I'm not a tech geek but I want to avoid having to take my laptop back to factory settings to sort this out.
    Thanks

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99192)

  • Can anyone tell me why my various Mice seem to work only part of the time..

    Hello All...
    I'm having some trouble with my new MacBook(s). I have two different Mice (one wired... one wireless) all via USB and they work only "sometimes"...
    When they do work (about 1 in 12 times) they stop after the computer goes to sleep... when I wake everything up... the mice do not respond...
    Strange...
    Hopefully this is simple to fix/modify...
    Thanks...
    mls
    [email protected]
    www.av123.com
    MacBook   Mac OS X (10.4.7)  

    Welcome to
    the discussions!
    Which mice are you having trouble with?
    Hi Eric... thanks for your reply...
    I have a SONY Vaio mouse PCGA-UMS3 and a Logitech Wireless mouse... (sorry no model number here with me at the moment)...
    Both of these work perfectly with ALL of my PowerBook G4's... (I have 5 of these in various locations...)...
    I'm really baffled by this... They just do not work --- or work for short intervals only... very odd...
    I'd love to hear any ideas here...
    With humble thanks...
    mls

  • I upgraded from leopard to lion and my epson printer will not work. I get a communication error

    I upgraded from leopard to lion and my Epson printer will not work. I get a error message comunication error. What can Ido to fix this I bought a new USB cord and it did no good.

    I suddenly had the same thing happen. I've had my new iMac for 3 months and at first my Epson Artisan 50 worked okay then yesterday I started getting the same error message other people on this support site have gotten. I tried ALL the advice given (deleating the Epson files from the library folder, etc. reinstalling older software) and nothing worked. With the newest iMac (and operating system) you cannot pick and choose which version of Epson software you want. You must use the 10.8 version or it simply will not open when you've downloaded it. Finally I found the comment above by den.thed and tried the OS X Mountain Lion: Reset the printing system suggested. As much as I hated to lose all my printing presets that took a lot of expiermentation to set up, I was desperate. I tried it and it worked. Now I just have to consult my old computer and try to recreate all my printing set ups.  So to others with Epson / Apple 10.8 issues this may help when everything else fails. Thanks den.thed for your advice.

  • My button function seems to work only once

    When I tell Flash to go back frames the buttons cease to work, in other words, the button only works once. I've tried tracing it to find the problem and when I tell it to go back frames it won't run the function.  I'm using actionscript 3 on Flash CS4.
    hap.addEventListener(MouseEvent.CLICK,clickFunction2);
        trace("addEventListener worked!");
    function clickFunction2(evt:MouseEvent):void {
        trace("clickFunction2 worked!");
    this.gotoAndPlay(191);
        trace("gotoAndPlay worked!");
    sad.addEventListener(MouseEvent.CLICK,clickFunction3);
        trace("addEventListener worked!");
    function clickFunction3(evt:MouseEvent):void {
        trace("clickFunction3 worked!");
    this.gotoAndPlay(1,"sadness");
        trace("gotoAndPlay worked!");
    ang.addEventListener(MouseEvent.CLICK,clickFunction4);
        trace("addEventListener worked!");
    function clickFunction4(evt:MouseEvent):void {
        trace("clickFunction4 worked!");
    this.gotoAndPlay(1,"anger");
        trace("gotoAndPlay worked!");
    rewind.addEventListener(MouseEvent.CLICK,clickFunction5);
        trace("addEventListener worked!");
    function clickFunction5(evt:MouseEvent):void {
        trace("clickFunction5 worked!");
    this.gotoAndPlay(120,"happiness");
        trace("gotoAndPlay worked!");

    Thanks for the answer.  I was having the same issue with something I was writting.  I was wondering, if it would be better to remove eht event listener and then add them after the frame has changed.
    Would one approach be bettor or worse that the other.
    -Thanks

  • Resizing of the navegation and search bars seems to work only with the default set of icons.

    Unless the default set is restored, the double-headed arrows do not appear.

    Do you happen to have Dial Assist on? This is in Settings>Phone. This is what helps the phone identify international numbers when dialing, based on location. See if turning that off/on makes a difference. Unless you are making a number of international calls, I believe this can be left off. See the User Guide http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf  Page 49 has info regarding Dial Assist.

  • Feed doesn't seem to work for iTunes submission (gives me error message)

    So I've typed up the code for my podcast and literally copy and pasted the example rss feed from the specs page and just replaced it with all the info for my podcast. I tested out the feed through the Podcast Subscription through the iTunes "Advanced" menu and it worked fine, but for some reason when I submit to the iTunes directory, it gives me the following error:
    Error parsing feed: Invalid XML:Error on the line 12: The element type "META" must be terminated by the matching end-tag "</META>".
    I checked the feed on the Feed Validator page and it seems like everything is in order but iTunes keeps giving me this error.
    Here's the URL to my feed: http://download872.mediafire.com/99y5kdmwkvtg/bf4omzzdglk/example.rss
    someone please help me and tell me what I'm missing or doing wrong! Thanks!

    The address you give for your feed bounces on to
    http://www.mediafire.com/?bf4omzzdglk
    which is a downloading page. The feed must be a plain text file in the format described, strictly with the extension .xml; and you must post a direct link to it in iTunes.

  • POST is not working in IE11, GET works.

    Hi,
    There is a problem while execution of POST function using XMLHttpRequest, the same code works fine in IE8,
    here is the code.
    if (window.XMLHttpRequest !== undefined)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    var httpOb=new XMLHttpRequest();
    else
    {// code for IE6, IE5
    var httpOb=new ActiveXObject("Msxml2.XMLHTTP");
    httpOb.open("POST",hostString,false);
    httpOb.setRequestHeader("Content-Type","text/xml");
    httpOb.send(xmlString);
    var headers = httpOb.getAllResponseHeaders();
    document.write(httpOb.responseText);
    I can clearly see the httpOb gets assigned to XMLHttpRequest, while debugging in IE11,
    The error message is "The System Cannot locate the resource specified", and this error comes on httpOb.send(xmlString);
    assuming the url is wrong, how can it work in IE8 and gets data??
    please help me, it's kind of urgent.
    Thanks,
    Sarva.

    error message is "The System Cannot locate the resource specified", and this error comes on httpOb.send(xmlString);
    FWIW I would run ProcMon to try to supplement what the message really means.  E.g. if it is written to a log file it will be associated with a WRiteFile event with an appropriate length specified.  Then you can go back from there to see what
    other registry and file accesses may have been involved in its generation.
    Good luck
    Robert Aldwinckle

  • I installed Office:mac 2011 on my new iMac running 10.8.3 and discovoed my file transfer from my old macbook installed Office:mac 2088. Now I have both installed and none of the office apps work - I keep getting the same error message

    I recently purchased an iMac to replace my 2008 macbook.
    I used migration assitant to transfer all of my macbook files to the iMac. I noticed that I had the old 2008 version of Office:mac 2008 on the iMac and decided to install Office:mac 2011 which installed successfully.
    However, now I can't open excel or word or powwerpoint now using either 2008 or 2011.... I just get an error message saying there was an error and the app had to close. It offers to send a report to Microsoft.
    I tried moving Office:mac 2008 to trash but this didn't resolve the issue.
    Can anyone help (I am not a really sohpisticated user so be gentle)
    Thanks Dave

    Hello Dave,
    This forum is for troubleshooting Apple Software Update for Windows, a software package for Windows designed to update Apple products that run on Windows, and not related to Microsoft Office in any way. I suggest you post Office related questions on Microsoft's own forums for their Mac products.
    http://www.officeformac.com/productforums

  • I did the recent update and now itunes no longer works and I get a MobileMe error in Outlook

    I can't get Itunes to work since the latest upgrade and I get an error in outlook about MobileMe.   I tried to reinstall Itunes but there is an error thaere and the program aborts.

    MobileMe was discontinued at the end of June 2012. The control panel should be removed if still present. See HT2992: MobileMe: Uninstalling the MobileMe Control Panel for Windows for details.
    tt2

  • Firefox suddenly quit working and I get the following error message: Could not initialize the application's security component. The most

    Error message: Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write
    restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application
    behaviour when accessing security features.

    See:
    *https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

  • Gmail not working on Ipad getting Imail.gmail error?

    Gmail has quit download mail for one account, getting the imail.gmail error, any solutions?

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Using a POP account with multiple devices
    http://support.apple.com/kb/ht3228
    iOS: Adding an email account
    http://support.apple.com/kb/HT4810
    iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
    http://support.apple.com/kb/ht1694
    iPhone, iPad, iPod touch: Microsoft Outlook 2003, Outlook 2007, Outlook 2010 may not display contacts and calendars after sync
    http://support.apple.com/kb/TS1944
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say “Cannot Connect to Server”?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    Gmail Account Will Not Connect to Gmail Server
    http://support.apple.com/kb/ts3058
    How to Delete Email on the iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Delete-Email-On-The-Ipad.htm
    How to Mass Delete Emails from iPhone and iPad Inbox (with video)
    http://suiteminute.com/how-to-mass-delete-emails-from-iphone-and-ipad-inbox/
    How to delete ALL mail messages from iPhone/iPad in one step
    http://www.conferencesthatwork.com/index.php/technology/2014/01/how-to-delete-al l-mail-messages-from-iphoneipad-in-one-step/
    How to add, send and open iPad email attachments
    http://www.iskysoft.com/apple-ipad/ipad-email-attachments.html
    How to Sync Contacts with Your iPad Using iTunes
    http://www.dummies.com/how-to/content/how-to-sync-contacts-with-your-ipad-using- itunes.html
    Importing a Contact List CSV to the iPad
    http://techchannel.radioshack.com/importing-contact-list-csv-ipad-2235.html
    iOS: ‘Mailbox Locked’, account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iCloud: Create a group and add contacts to it
    http://support.apple.com/kb/PH2667
    eMail Groups - You can use a third party app that many users recommend.
    MailShot -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    Group Email -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
    How to delete an email account on your iPad
    http://www.shoppepro.com/support/knowledgebase/228/How-to-delete-an-email-accoun t-on-your-iPad.html
     Cheers, Tom

  • How can I sum up raws? the sum function seems to work for columns only and right now I have to create a separate formula for each raw

    How can I sum up raws? the Sum function seems to work only on columns. Right now I have to create a separate formula for each raw

    Hi dah,
    "Thanks, but can I do one formula for all present and future raws? as raws are being added, I have to do the sum function again and again"
    You do need a separate formula for each group of values to be summed.
    If the values are in columns, you need a copy of the formula for each column.
    If the values are in rows, you need a copy of the formula for for each row.
    If you set up your formulas as SGIII did in his example (shown below), where every non-header row has the same formula, Numbers will automtically add the formula to new rows as you add them.
    "Same formula" in this context means exactly the same as all the formulas above, with one exception: the row reference in each formula is incremented (by Numbers) to match the row containing the formula.
    Here the formula looks like this in the three rows shown.
    B2: =SUM(2)
    B3: =SUM(3)
    B4: =SUM(4)
    That pattern will continue as rows are added to the table.
    Also, because the row token (2) references all of the non-header cells in row 2, the formula will automatically include new columns as they are added to the table.
    Regards,
    Barry

  • Subwoofer doesnt seem to work on new envy model 4-1203sa

    as in title, doesnt seem to work, only bought the laptop today from pc world. the laptop was a display model, is there any way i can test the speaker? i have the beats audio interface too but i cant hear no bass

    Hi Dylan5084,
    Thank you for visiting the HP Support Forums and Welcome. I have read your thread on your HP ENVY TouchSmart 4-1203sa Sleekbook and sound issues. Here is a link to troubleshoot the sound.
    Hope this helps.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • In OpenScript, is there anyway to have an XML post pass if a 500 error is returned?

    Hello,
    We're using OpenScript 9.3.1.0 and are automating some Web Service tests.  One of the scenarios is to test when data is sent to the service where no valid session exists, we expect a 500 Interval Server error to be returned.  I have created a test using XML Post Data, however because the server throws a 500 error, this always reports as failed even though the "Text Match Test" with a regex testing the error message passes as expected (as you can see in the attached screenshot).  Is there anyway to tell OpenScript that we expect a [500 Internal Server] error when creating the test, or not to fail on when a condition occurs?
    Thanks in advance,
    Michael.

    You probably need to keep that cookie and create an exception as well, so you can't use Private Browsing or clear the Cookies and Site Preferences via [[Clear Recent History]]. You can let all cookies expire if you close Firefox. That will keep the cookies that have an exception.
    In [[Private Browsing]] mode all cookies are session cookies that expire if that session is ended, so websites won't remember you.

Maybe you are looking for