jody
jody
  • 发布:2015-05-23 16:04
  • 更新:2019-08-16 15:09
  • 阅读:2353

请问该种post请求如何处理

分类:HTML5+

请问如下的post请求如何才能正确获取到数据?

GetTrack
获取位置
Test
The test form is only available for requests from the local machine.
SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /GnssService.asmx HTTP/1.1
Host: 127.0.0.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GetTrack"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTrack xmlns="http://tempuri.org/">
<Plate>string</Plate>
</GetTrack>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

下面是正确返回的内容:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTrackResponse xmlns="http://tempuri.org/">
<GetTrackResult>
<D>int</D>
<Des>string</Des>
<Flag>boolean</Flag>
<T>string</T>
<V>int</V>
<X>float</X>
<Y>float</Y>
</GetTrackResult>
</GetTrackResponse>
</soap:Body>
</soap:Envelope>

2015-05-23 16:04 负责人:无 分享
已邀请:
DCloud_UNI_FXY

DCloud_UNI_FXY

function beginSaveProduct(Plate) {    
                    var soapMessage = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetTrack xmlns="http://tempuri.org/"><Plate>苏E8792Z</Plate></GetTrack></soap:Body></soap:Envelope>';    
                    mui.ajax({      
                        url: productServiceUrl,  
                        type: "post",  
                        dataType: "xml",  
                        contentType: 'text/xml; charset=utf-8',  
                        data: soapMessage,  
                        success: endSaveProduct,  
                        processData: false,  
                        error: function(xhr) {  
                            console.log(JSON.stringify(xhr));  
                        }  
                    });  
                }
6***@qq.com

6***@qq.com

请问大佬这种请求用vue最后是怎么解决了~谢谢

该问题目前已经被锁定, 无法添加新回复