Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.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
Xml SoapUI在请求有效时将错误作为格式错误的请求_Xml_Wcf_Soap_Soapui_Xml Namespaces - Fatal编程技术网

Xml SoapUI在请求有效时将错误作为格式错误的请求

Xml SoapUI在请求有效时将错误作为格式错误的请求,xml,wcf,soap,soapui,xml-namespaces,Xml,Wcf,Soap,Soapui,Xml Namespaces,下面是由我的.net代码生成的xml片段,它被发送到第三方soap服务端点 <?xml version="1.0" encoding="utf-16"?> <ProgramInterface xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vnsState_request xmlns

下面是由我的.net代码生成的xml片段,它被发送到第三方soap服务端点

<?xml version="1.0" encoding="utf-16"?>
  <ProgramInterface 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
    <vnsState_request xmlns="http://www.statewide.Request.com">
.....
....
...
  • 关于额外标记:如果您从任何客户端访问SOAP服务,则需要SOAP头。你可以找到更多的细节
  • 关于前缀:如果使用了
    .net
    案例中的默认名称空间,则不需要该前缀。其中,与SoapUI中一样,它使用显式名称空间,因此使用了
    前缀
    。您可以找到有关名称空间的更多详细信息
  • 例如,以你为例。下面两者都是相同的

    <vnsState_request xmlns="http://www.statewide.Request.com">
    <!--the above one is using default namespace -->
    
    
    

    
    
    如果您看一下SoapUI中的一个,它在第一行本身添加了名称空间。所以,正如你所展示的那样

    希望这有帮助

  • 关于额外标记:如果您从任何客户端访问SOAP服务,则需要SOAP头。你可以找到更多的细节
  • 关于前缀:如果使用了
    .net
    案例中的默认名称空间,则不需要该前缀。其中,与SoapUI中一样,它使用显式名称空间,因此使用了
    前缀
    。您可以找到有关名称空间的更多详细信息
  • 例如,以你为例。下面两者都是相同的

    <vnsState_request xmlns="http://www.statewide.Request.com">
    <!--the above one is using default namespace -->
    
    
    

    
    
    如果您看一下SoapUI中的一个,它在第一行本身添加了名称空间。所以,正如你所展示的那样

    希望这有帮助

    <soapenv:Envelope >
       <soapenv:Header/>
       <soapenv:Body>
    
    <vnsState_request xmlns="http://www.statewide.Request.com">
    <!--the above one is using default namespace -->
    
    <ns:vnsState_request xmlns:ns="http://www.statewide.Request.com">
    <!--using explicit namespace "ns", hence the same is prefixed for the tag -->