This question is regarding using the ExactTarget SOAP API. I am trying to use the SOAP envelope sample given in http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_an_email_via_the_web_service_api/
I replaced the USERNAME & PASSWORD fields with appropriate values and modified the reference to http://exacttarget.com/wsdl/partnerAPI to the S1 endpoint link https://webservice.exacttarget.com/Service.asmx. When I post the SOAP envelope using the Chrome plug-in POSTMAN, I get a response back with a Soap:Fault that readsWSE012: The input was not a valid SOAP message because the following
information is missing: actionWhat does this error signify and how do I correct this and proceed?
I am using POSTMAN to test the flow before I code the process in nodes.jsHere is the SOAP packet (As I said earlier, the USERNAME & PASSWORD have been replaced with my credentials and reference to “http://exacttarget.com/wsdl/partnerAPI” has been changed to https://webservice.exacttarget.com/Service.asmx. I took this SOAP Packet from the sample given on the example). I am doing the POST to https://webservice.exacttarget.com/Service.asmx
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>USERNAME</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password> <wsu:Created>2008-07-02T13:01:11Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </SOAP-ENV:Header> <SOAP-ENV:Body> <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI"> <Options/> <Objects xsi:type="Email"> <ObjectID xsi:nil="true"/> <Name>Text Only in API</Name> <Description>Description</Description> <TextBody>Example email body for an email that is text only</TextBody> <Subject>Example Subject</Subject> <EmailType>Text Only</EmailType> <IsHTMLPaste>True</IsHTMLPaste> </Objects> </CreateRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Answer
POSTMAN is not sending any headers with the SOAP Packet. Try adding this to test:
POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "Create"
Content-Length: 1925
Host: webservice.exacttarget.com
Connection: Keep-Alive
ALSO during my testing of your packet I found that this:
<IsHTMLPaste>True</IsHTMLPaste>
Should be
<IsHTMLPaste>true</IsHTMLPaste>
Hope this helps you.
Attribution
Source : Link , Question Author : user5336 , Answer Author : Kelly J Andrews