This is the message I need to send to wsdl
:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://WSDLPROVIDER" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:enqueue>
<domain xsi:type="xsd:string">STH</domain>
<messageBodies SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:string">STHE</item>
</messageBodies>
<recipientNumbers SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:string">09xxxxxxxx</item>
<item xsi:type="xsd:string">09xxxxxxxx</item>
</recipientNumbers>
<senderNumbers SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:string">3000xxxxx</item>
</senderNumbers>
<encodings xsi:nil="true" xsi:type="SOAP-ENC:Array" />
<udhs xsi:nil="true" xsi:type="SOAP-ENC:Array" />
<messageClasses xsi:nil="true" xsi:type="SOAP-ENC:Array" />
<priorities xsi:type="SOAP-ENC:Array" />
<checkingMessageIds SOAP-ENC:arrayType="xsd:long[2]" xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:long">100</item>
<item xsi:type="xsd:long">101</item>
</checkingMessageIds>
</ns1:enqueue>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And so far, I've made this:
var args = {
domain: 'STHE',
messageBodies: {
item: {
attributes: {
'xsi:type': 'xsd:string'
},
$value: "hi"
}
},
"recipientNumbers": {
attributes:{
"SOAP-ENC:arrayType": "xsd:string[2]",
"xsi:type": "SOAP-ENC:Array"
},
"item": {
attributes:{
"xsi:type": "xsd:string"
},
$value: "09xxxxxx"
}
},
"senderNumbers": {
attributes:{
"SOAP-ENC:arrayType": "xsd:string[1]",
"xsi:type": "SOAP-ENC:Array"
},
"item": {
attributes: {
"xsi:type": "xsd:string"
},
$value: "30xxxxx"
}
Which results this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:impl="WSDLPROVIDER" xmlns:intf="WSDLPROVIDER" xmlns:tns1="urn:SOAPSmsQueue">
<soap:Header></soap:Header>
<soap:Body>
<impl:enqueue>
<domain>STHE</domain>
<messageBodies>
<item xsi:type="xsd:string">hi</item>
</messageBodies>
<recipientNumbers>
<item xsi:type="xsd:string">09xxxxxx</item>
</recipientNumbers>
<senderNumbers>
<item xsi:type="xsd:string">30xxxxx</item>
</senderNumbers>
</impl:enqueue>
</soap:Body>
</soap:Envelope>
I tried to use attributes on messageBodies
part, but any combination I used failed with no change in the output.
Is there any way to pass the message in XML
instead of Json
interface?
Any help will be appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…