0

ive got a running WCF Service with MTOM Encoding. my own c# client can consume this Service without Problems.

When i try to send a Request through SOAP UI i get the Message :

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <s:Fault>
      <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
      <faultstring xml:lang="de-DE">MIME part with Content-ID 'cid:123456' not found.</faultstring>
      <detail>
        <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <HelpLink i:nil="true"/>
          <InnerException i:nil="true"/>
          <Message>MIME part with Content-ID 'cid:123456' not found.</Message>
          <StackTrace>at System.Xml.XmlMtomReader.ReadMimePart(String uri)
   at System.Xml.XmlMtomReader.Read()
   at System.Xml.XmlDictionaryWriter.WriteNode(XmlDictionaryReader reader, Boolean defattr)
   at System.ServiceModel.Channels.ReceivedMessage.OnWriteBodyContents(XmlDictionaryWriter writer)
   at System.ServiceModel.Channels.Message.OnWriteMessage(XmlDictionaryWriter writer)
   at System.ServiceModel.Channels.Message.OnCreateBufferedCopy(Int32 maxBufferSize, XmlDictionaryReaderQuotas quotas)
   at System.ServiceModel.Channels.Message.CreateBufferedCopy(Int32 maxBufferSize)
   at VAMS.Web.FE.Inspector.ValidXmlMessageInspector.AfterReceiveRequest(Message&amp; request, IClientChannel channel, InstanceContext instanceContext) in ValidXmlMessageInspector.cs:line 63
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.AfterReceiveRequestCore(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
          <Type>System.Xml.XmlException</Type>
        </ExceptionDetail>
      </detail>
    </s:Fault>
  </s:Body>
</s:Envelope>

any suggestions ?

Skary
  • 387
  • 1
  • 4
  • 18

2 Answers2

2

Make sure the content id used in the request (cid:) is the same as the ContentID of the element in your Attachments list.

SoapUI request sample: SoapUI request sample

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Terje Holene
  • 145
  • 7
0

Its no WCF Problem:

SOAPUI automatic generates a ContentID for your Attachment. But you dont need this. Just delete the ContentID and everything works fine

Greetz Skary

Skary
  • 387
  • 1
  • 4
  • 18