Improved: Converted createInvoiceContactMech service from simple to entity auto, and fixed service definition for same, removed unused out parameter contactMechId from service definition, I don't understand purpose of this out parameter, and this service is used only in 3 places and not SECA rule define on it. So I think we can modify service definition.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1769755 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/applications/accounting/minilang/invoice/InvoiceServices.xml b/applications/accounting/minilang/invoice/InvoiceServices.xml
index 8b2ba2a..e50ca79 100644
--- a/applications/accounting/minilang/invoice/InvoiceServices.xml
+++ b/applications/accounting/minilang/invoice/InvoiceServices.xml
@@ -1013,10 +1013,4 @@
         </if-compare-field>
         <field-to-result field="isForeign"/>
     </simple-method>
-    <simple-method method-name="createInvoiceContactMech" short-description="Create a ContactMech for an invoice">
-        <make-value value-field="invoiceContactMech" entity-name="InvoiceContactMech"/>
-        <set-pk-fields map="parameters" value-field="invoiceContactMech"/>
-        <create-value value-field="invoiceContactMech"/>
-        <field-to-result field="contactMechId" result-name="invoiceContactMech"/>
-    </simple-method>
 </simple-methods>
diff --git a/applications/accounting/servicedef/services_invoice.xml b/applications/accounting/servicedef/services_invoice.xml
index 5f414f6..1b506a4 100644
--- a/applications/accounting/servicedef/services_invoice.xml
+++ b/applications/accounting/servicedef/services_invoice.xml
@@ -301,12 +301,10 @@
         <description>Checks to see if the payments applied to an invoice total up to the invoice total; if so sets to PAID</description>
         <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
     </service>
-    <service name="createInvoiceContactMech" engine="simple" location="component://accounting/minilang/invoice/InvoiceServices.xml"
-             invoke="createInvoiceContactMech" default-entity-name="InvoiceContactMech">
+    <service name="createInvoiceContactMech" engine="entity-auto" invoke="create" default-entity-name="InvoiceContactMech">
         <description>Create a ContactMech for an invoice</description>
         <permission-service service-name="acctgInvoicePermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
-        <attribute name="contactMechId" type="String" mode="OUT" optional="true"/>
     </service>
     <service name="deleteInvoiceContactMech" engine="entity-auto" invoke="delete" default-entity-name="InvoiceContactMech">
         <description>Delete a ContactMech for an invoice</description>