This works, but is still wrong. I pass in Invoice number to the EmailInvoice method, even though it gets it from the current invoice object (has all the detail within the InvoiceNumber type:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:s1="KashFlow/AbstractTypes" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="KashFlow" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<EmailInvoice xmlns="KashFlow">
<UserName xsi:type="xsd:string">ghenry</UserName>
<Password xsi:type="xsd:string">xxx</Password>
<InvoiceNumber xsi:type="xsd:int">
<InvoiceNumber xsi:type="xsd:int">239828</InvoiceNumber>
<FromEmail xsi:type="xsd:string">billing@surevoip.co.uk</FromEmail>
<RecipientEmail xsi:type="xsd:string">ghenry@suretec.co.uk</RecipientEmail>
<SubjectLine xsi:type="xsd:string">Invoice from SureVoIP for February 2015 call charges</SubjectLine>
<FromName xsi:type="xsd:string">SureVoIP Billing</FromName>
<Body xsi:type="xsd:string">Thanks for your business!
SureVoIP
http://www.surevoip.co.uk</Body>
</InvoiceNumber>
</EmailInvoice>
</soap:Body>
</soap:Envelope>
If I don't pass in InvoiceNumber to EmailInvoice, this XML gets produced:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:s1="KashFlow/AbstractTypes" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="KashFlow" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<EmailInvoice xmlns="KashFlow">
<UserName xsi:type="xsd:string">ghenry</UserName>
<Password xsi:type="xsd:string">xxx</Password>
<InvoiceNumber xsi:type="xsd:int">
<SubjectLine xsi:type="xsd:string">Invoice from SureVoIP for February 2015 call charges</SubjectLine>
<FromEmail xsi:type="xsd:string">billing@surevoip.co.uk</FromEmail>
<RecipientEmail xsi:type="xsd:string">ghenry@suretec.co.uk</RecipientEmail>
<InvoiceNumber xsi:type="xsd:int">239829</InvoiceNumber>
<Body xsi:type="xsd:string">Thanks for your business!
SureVoIP
http://www.surevoip.co.uk</Body>
<FromName xsi:type="xsd:string">SureVoIP Billing</FromName>
</InvoiceNumber>
</EmailInvoice>
</soap:Body>
</soap:Envelope>