Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Axis2 MTOM Webservice和使用它的.NET客户端_C#_.net_Web Services_Axis2_Mtom - Fatal编程技术网

C# Axis2 MTOM Webservice和使用它的.NET客户端

C# Axis2 MTOM Webservice和使用它的.NET客户端,c#,.net,web-services,axis2,mtom,C#,.net,Web Services,Axis2,Mtom,因此,我有了这个新的Axis2 MTOM Web服务,它可以正确地服务于基于java的Web服务客户端 当我尝试将服务(或web)引用添加到vs2008并使用生成的代码时,问题就出现了。直到现在,一切都好吗。。。情况就是这样: 我们创建必要的对象 (客户端、请求和参数) (对象) 我们称之为服务 当接收到响应时,它抛出一个异常,并显示以下消息: 客户端发现响应内容类型为“多部分/相关”; 边界=MIMEBoundaryurn_uuid_6C47CADDECCCB90D9512827764064

因此,我有了这个新的Axis2 MTOM Web服务,它可以正确地服务于基于java的Web服务客户端

当我尝试将服务(或web)引用添加到vs2008并使用生成的代码时,问题就出现了。直到现在,一切都好吗。。。情况就是这样:

  • 我们创建必要的对象 (客户端、请求和参数) (对象)
  • 我们称之为服务
  • 当接收到响应时,它抛出一个异常,并显示以下消息:

  • 客户端发现响应内容类型为“多部分/相关”;
    边界=MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454;
    type=“应用程序/xop+xml”;开始=”
    "; start info=“text/xml”,
    但应为“text/xml”。
    请求失败,出现错误消息:
    MIMEBoundaryurn_uuid_6C47CADDECCB90D951282776406454
    内容类型:应用程序/xop+xml;字符集=utf-8;type=“text/xml”
    内容传输编码:二进制
    内容ID:
    1060错误ejecutando el SERVICIO 1060
    MIMEBoundaryurn_uuid_6C47CADDECCB90D951282776406454
    
    否则问题就来了


    如何将axis2 Web服务的响应设置为非mimetype?您需要在配置中使用MTOM编码。请参阅MSDN中的simple,将其与wsHttpBinding一起使用(也可以与basicHttpBinding一起使用)。选中此选项,它描述了如何使用自定义绑定使用oracle web服务。如果您想尝试如示例中所示的自定义绑定,可能需要将messageVersion设置为Soap11而不是Soap12。

    您使用的是哪种绑定?完成后,问题仍然存在。。。无论如何,我将在几个小时后再试一次……在对响应对象(XMLElement)属性的元素进行了一些研究之后,以及您的良好帮助。。。它现在正在工作。Thanks@GarisMSuero-你能发布你为使它工作所做的工作吗?我也遇到了同样的问题(Axis2 webservice使用mtom,我正在实现一个c#client),您的回答是有希望的。抱歉@djbyter我刚才看到了这个。但我不再在那家公司和/或.net工作了。但如果你在这里发帖,我可能会有所帮助。
      Client found response content type of 'multipart/related; 
      boundary=MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454; 
      type="application/xop+xml"; start="
      <0.urn:uuid:6C47CADDECCCB90D951282776406455@apache.org>"; start-info="text/xml"', 
      but expected 'text/xml'.
    
      The request failed with the error message:
    
    
    MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454
    Content-Type: application/xop+xml; charset=utf-8; type="text/xml"
    Content-Transfer-Encoding: binary
    Content-ID: <0.urn:uuid:6C47CADDECCCB90D951282776406455@apache.org>
    
    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:sendImageResponse xmlns:ns="http://org/company/ws/services/filetransfer/"><ns:return xmlns:ax213="http://filetransfer.objects.ws.company.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ax215="http://filetransfer.responses.objects.ws.company.com/xsd" xsi:type="ax215:SendImageResponse"><ax215:errorCode>1060</ax215:errorCode><ax215:errorMessage>Error ejecutando el servicio</ax215:errorMessage><ax215:output>1060</ax215:output></ns:return></ns:sendImageResponse></soapenv:Body></soapenv:Envelope>
    MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454