Invalid mime format - soap

while uploading file to irs in mef ifa platform, when file is uploaded its preliminary validation failed and an error occurred "invalid mime format".
I have tried in many ways and with different formats but not fixed.
Here is my file to transmit
MIME-Version: 1.0
Content-Type: multipart/related;
boundary=MIMEBoundary941; Content-Type: text/xml; charset=UTF-8
Content-Description: Transmission File containing one Submission.
X-eFileRoutingCode: MEF
--MIMEBoundary941
Content-Type: text/xml
Content-Transfer-Encoding: 8bit
Content-Location: Envelope941
<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns="http://www.irs.gov/efile"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:efile="http://www.irs.gov/efile"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ ../message/SOAP.xsd
http://www.irs.gov/efile ../message/efileMessage.xsd">
<SOAP:Header>
<TransmissionHeader>
<TransmissionId>******</TransmissionId>
<Timestamp>2022-07-18T14:05:57+06:43</Timestamp>
<Transmitter>
<ETIN>******</ETIN>
</Transmitter>
</TransmissionHeader>
</SOAP:Header>
<SOAP:Body>
<TransmissionManifest>
<SubmissionDataList>
<Count>1</Count>
<SubmissionData>
<SubmissionId>*******************</SubmissionId>
<ElectronicPostmark>2022-06-30T14:05:57+06:43</ElectronicPostmark>
</SubmissionData>
</SubmissionDataList>
</TransmissionManifest>
</SOAP:Body>
</SOAP:Envelope>
--MIMEBoundary941
Content-Type: application/octet-steam
Content-Transfer-Encoding: Binary
Content-Location: SubmissionZip
<<ZipFile here >>
--MIMEBoundary941—

Related

SOAP Request Error (The requested operation was rejected)

I sent a request via postman and it works fine and received a response, but in other environment I received an error message as below.
Url as e.g. https://URL/secure?Username=ABCD&Password=ABCD
Header:
Content-Type: text/xml
Accept: application/json, text/xml, application/xml, */*, application/soap+xml
User-Agent: APP
Accept-Encoding: gzip, deflate, br
SOAPAction: URL
Username: ABCD
Password: ABCD
ClientID: 123
OrgUnitGuid: abc-1234
OrgUnitID: 123
Body as example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:post="url" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:core="http://Core.Model" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>ABCD</wsse:Username>
<wsse:Password>ABCD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<----->
<-------->
</------->
</--------->
</soapenv:Body>
</soapenv:Envelope>
Response Body:
Connection=close
Pragma=no-cache
Content-Length=359
Cache-Control=no-cache
Content-Type=text/xml; charset=utf-8
<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>The requested operation was rejected. Please consult with your administrator.Your support ID is: 17985204652528471489</faultstring><detail/></soap:Fault></soap:Body></soap:Envelope>
in "Accept-Encoding: gzip, deflate, br" I remove the br and it works but with another error as below :
Connection=close
Content-Length=311
Content-Type=text/html; charset=us-ascii
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>
I edited the Header as follow and it works fine.
some headers are extra and there is no need for most of them
Accept-Encoding:gzip, deflate
SOAPAction: URL
Content-Type: text/xml

RestSharp latest version breaks my API's post method (add Guid before and after the body)

Since latest version of RestSharp, all my post API's are failing because something has been added to the bodies I send.
Looks like a Guid id is generated and is added before and after the body for each call; the issue is it's not accepted by all my API's providers.
FYI, I created 2 identical console apps, one with version "106.12.0", and one with latest version "107.3.0". please see below the result:
Thanks in advance to help me with this
BR
-Vince
Examples:
Working with Version="106.12.0" :
before:
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name="application/xml"
<SMSBoxXMLRequest>
<username>cnoxxxx</username>
<!-- password hidden -->
<command>WEBSEND</command>
<parameters>
<service>VALAIS</service>
<text>Test de Message Sms 1</text>
<test></test>
<receiver>+4177222333444</receiver>
</parameters>
</SMSBoxXMLRequest>
after:
Not Working with Version="107.3.0" :
**--497993c6-3ef7-47fb-b527-403c1eefedf8**
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name="application/xml"
<SMSBoxXMLRequest>
<username>cnoxxxx</username>
<!-- password hidden -->
<command>WEBSEND</command>
<parameters>
<service>VALAIS</service>
<text>Test de Message Sms 1</text>
<test></test>
<receiver>+4177222333444</receiver>
</parameters>
</SMSBoxXMLRequest>
**--497993c6-3ef7-47fb-b527-403c1eefedf8--**
**--3277a8db-bd83-4f3c-af2e-d34efe76fe98**
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name="application/xml"
<SMSBoxXMLRequest>
<username>cnoxxxx</username>
<!-- password hidden -->
<command>WEBSEND</command>
<parameters>
<service>VALAIS</service>
<text>Test de Message Sms 2</text>
<test></test>
<receiver>+4177222333444</receiver>
</parameters>
</SMSBoxXMLRequest>
**--3277a8db-bd83-4f3c-af2e-d34efe76fe98--**
**--5b81fa95-a0b9-4f5c-9242-742734b0241e**
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name="application/xml"
<SMSBoxXMLRequest>
<username>cnoxxxx</username>
<!-- password hidden -->
<command>WEBSEND</command>
<parameters>
<service>VALAIS</service>
<text>Test de Message Sms 3</text>
<test></test>
<receiver>+4177222333444</receiver>
</parameters>
</SMSBoxXMLRequest>
**--5b81fa95-a0b9-4f5c-9242-742734b0241e-**-

QuickBooks Web Connector - Can't find SOAP response

I'm trying to build a SOAP server to interact with the QuickBooks Web Connector, but can't find any examples of what the SOAP response to it's request to authenticate should be.
How do we respond to this?
I tried to find a way to response this action, but there is no document or example.
{'soapaction': '"http://developer.intuit.com/authenticate"', 'host': 'api:3000', 'user-agent': 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)', 'content-type': 'text/xml; charset=utf-8', 'cookie': None, 'content-length': '382', 'ssl-client-verify': 'NONE', 'x-forwarded-for': '12.34.567.89', 'x-real-ip': '12.34.567.89', 'anvil-host': 'Jeremiah.QB.app'}
WSDL
You can find a WSDL for this service at the link below, which may help you develop:
https://test.developer.intuit.com/QBWC/TroubleshootWebServiceFS/Service.asmx?wsdl
Example SOAP request
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<authenticate xmlns="http://developer.intuit.com/">
<strUserName xsi:type="xsd:string">username</strUserName>
<strPassword xsi:type="xsd:string">password</strPassword>
</authenticate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example SOAP response for a VALID login
HTTP/1.1 200 OK
Date: Sat, 02 May 2009 17:45:48 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.9
X-Powered-By: PHP/5.2.9
Content-Length: 416
Connection: close
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
<SOAP-ENV:Body>
<ns1:authenticateResponse>
<ns1:authenticateResult>
<ns1:string>15c9ce293bd3f41b761c21635b14fa06</ns1:string>
<ns1:string></ns1:string>
</ns1:authenticateResult>
</ns1:authenticateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example SOAP response for an INVALID login
HTTP/1.1 200 OK
Date: Sat, 02 May 2009 17:43:09 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.9
X-Powered-By: PHP/5.2.9
Content-Length: 387
Connection: close
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
<SOAP-ENV:Body>
<ns1:authenticateResponse>
<ns1:authenticateResult>
<ns1:string></ns1:string>
<ns1:string>nvu</ns1:string>
</ns1:authenticateResult>
</ns1:authenticateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Source:
authenticate: http://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector_soap_authenticate
all of the other Web Connector SOAP methods: http://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector#array_authenticate_string_strusername_string_strpassword

Zimbra SOAP SearchRequest returns unknown document error

I am trying to send the SearchRequest to find the stuff I need in the mailbox. However, I keep on getting the unknown Document error.
POST /service/soap HTTP/1.1
SOAPAction: ""
Content-Type: text/xml;charset="utf-8"
Accept: text/xml
Host: 192.168.138.133
Content-Length: 514
Expect: 100-continue
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<authToken>%token acquired from AuthRequest%</authToken>
<context xmlns="urn:zimbra" />
</soap:Header>
<soap:Body>
<SearchRequest xlmns="urn:zimbraMail">
<query>is:unread</query>
</SearchRequest>
</soap:Body>
</soap:Envelope>
It seems to me, that I have the wrong xmlns specified, but the zimbra soap api reference says that the namespace should be zimbraMail. Still I keep on getting the error.
Shouldn't there be a session somewhere in the headers ? (inside context)
http://dropcanvas.com/521xc/91
Try
<soap:Header>
<context xmlns="urn:zimbra" >
<authToken>%token acquired from AuthRequest%</authToken>
</context>
</soap:Header>

Malformed multipart body youtube video upload

I am trying to upload video to youtube from iPhone app. But i am getting "Malformed multipart body".
Here is my request format :-
Headers :
Authorization: Bearer ya29.AHES6ZRfVWRgOe78g4eHz8v85yFztU-ea3jEy6d_4mbEkAMVD33_1w
GData-Version: 2
Host: uploads.gdata.youtube.com
X-GData-Key: key=AI39si5TXQBExBk3eT3cn4eCOSKr1GEOJd5_HJ-RjUGPErby1Qn4aOL-HlecdrxZ3Ur7QocO8Di9wHxUdV2fSYTM3mtFCyzl_A
Slug: summer_vacation.mp4
Content-Type: multipart/related; boundary="f93dcbA3"
Request Body:
--f93dcbA3
Content-Type: application/atom+xml; charset=UTF-8
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:yt="http://gdata.youtube.com/schemas/2007">
<media:group>
<yt:incomplete/>
<media:category
scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Travel
</media:category>
</media:group>
</entry>
--f93dcbA3
Content-Type: video/mp4
Content-Transfer-Encoding: binary
--f93dcbA3--
Please help me.
I think it is because of the extra line after your second boundary (just before the Content-Type: video/mp4 header). Also, be sure to add a line between the Content-Transfer-Encoding: binary header and your binary data.
Take the Google Example as model :
POST /feeds/api/users/default/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=adf15ee97731bca89da876c...a8dc
Slug: video-test.mp4
Content-Type: multipart/related; boundary="f93dcbA3"
Content-Length: 1941255
Connection: close
--f93dcbA3
Content-Type: application/atom+xml; charset=UTF-8
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:yt="http://gdata.youtube.com/schemas/2007">
<media:group>
<media:title type="plain">Bad Wedding Toast</media:title>
<media:description type="plain">
I gave a bad toast at my friend's wedding.
</media:description>
<media:category
scheme="http://gdata.youtube.com/schemas/2007/categories.cat">People
</media:category>
<media:keywords>toast, wedding</media:keywords>
</media:group>
</entry>
--f93dcbA3
Content-Type: video/mp4
Content-Transfer-Encoding: binary
<Binary File Data>
--f93dcbA3--