none
error in Custom encoder-MIME Parser RRS feed

  • Question

  • Have implemented custom encoder available at below post.

    http://shankarsbiztalk.wordpress.com/2012/10/16/sending-soap-with-attachments-swa-using-biztalk-part-1/#comment-57

    But I am getting error in MIME parser. Http content type is missing start tag of SOAP responseand throws exception.
    When I see soap response, its not having start , only boundry and type are available.
    I tried to comment start in the code and also tried to give some static values.to start even, but no luck. during debugging. error non-negative,param count. Failing at

    string TransferEncoding = ParserEncoding.GetString(binaryContent, TransferEncodingIdx + TransferEncodingKeyBytes.Length, ContentIdIdx – (TransferEncodingIdx + TransferEncodingKeyBytes.Length)).TrimStart().TrimEnd();

    ContentIdIdx lengths is less….

    Only one attachment will come in soap response and its txt file.
    name of the attachment will be available in one xml tag of soap body response

    Apologize as I couldn’t upload exact soap response. However just briefing the structure
    multipart/ , contenty type “text/xml” boundry :”uuid: ”

    contenttype : application/ocstream
    content id : same as in the soap body
    encoder:binery

    –boundery

    –boundary–

    Hope you understand this.

    request nyour assitance on proceeding.

    Awaiting for your sooner response

    Tuesday, January 7, 2014 7:56 PM

All replies

  • Hi,

    Could you please try to post the details information here?

    Also please try to enable the wcf tracing to find the root cause:

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 10, 2014 11:34 AM
    Moderator
  • I know the issuee......

    But want to know whether it is bug in the component or any other issue...

    noticed that the method(DeserializeMimeContent) is not adding soap response . I have seen only attachment getting added to MIME and not SOAP Response.

    –uuid:GUID
    Content-Type: text/xml; charset=utf-8
    ?xml version=’1.0′ encoding=’UTF-8′?><SOAP envelope>

    –uuid:Same GUID
    Content-Id:XXXX@example.jaxws.sun.com>
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary
    ——-TestFile—-
    Attachment COntent
    –uuid:Same GUID–

    In the above, I am extracking text between <Soap Envelope> and adding it to mime message response. 

    But want to know why the component is not returning SOAP response

    Saturday, January 11, 2014 4:45 PM