SOAP Body
NSString *soapMessage = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<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/>\">\n"
"<soap:Body>\n"
" <Ins_VIP xmlns=\"http://tempuri.org/>\">\n"
"<strVIPNo>%@</name>\n"
"</name>\n"
"</soap:Body>\n"
"</soap:Envelope>\n" , str];
这是一个简单的肥皂消息你知道吗。如果我想使用函数传递str的值,我是如何构造它的?
但是,我想通过该对象的值传递它是如何实现的?
答案 0 :(得分:1)
您可以执行以下操作,您必须根据您的要求进行修改:
<button id="rec" onclick="onBtnRecordClicked()">Record</button>
<button id="stop" onclick="onBtnStopClicked()" disabled>Stop</button>
<div id="videos-container"></div>
<script>
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
document.getElementById('rec').onclick = function() {
var htmlElement = document.createElement('video');
htmlElement.setAttribute('autoplay', true);
htmlElement.setAttribute('controls', true);
videosContainer.insertBefore(htmlElement, videosContainer.firstChild);
var mediaConfig = {
video: htmlElement,
onsuccess: function(stream) {
src: URL.createObjectURL(stream);
},
onerror: function() {
alert('unable to get access to your webcam');
}
};
getUserMedia(mediaConfig);
}
var videosContainer = document.getElementById('videos-container') || document.body;
</script>