Fix: Update must be done with id
This commit is contained in:
parent
957ff08458
commit
2061739371
@ -548,7 +548,7 @@ function updateProductOrService($authentication,$product)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
$newobject=new Product($db);
|
$newobject=new Product($db);
|
||||||
$newobject->fetch($product['id'],$product['ref']);
|
$newobject->fetch($product['id']);
|
||||||
|
|
||||||
if (isset($product['ref'])) $newobject->ref=$product['ref'];
|
if (isset($product['ref'])) $newobject->ref=$product['ref'];
|
||||||
if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext'];
|
if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext'];
|
||||||
|
|||||||
@ -858,6 +858,14 @@
|
|||||||
<part name="result" type="tns:result"/>
|
<part name="result" type="tns:result"/>
|
||||||
<part name="id" type="xsd:string"/>
|
<part name="id" type="xsd:string"/>
|
||||||
</message>
|
</message>
|
||||||
|
<message name="updateProductOrServiceRequest">
|
||||||
|
<part name="authentication" type="tns:authentication"/>
|
||||||
|
<part name="product" type="tns:product"/>
|
||||||
|
</message>
|
||||||
|
<message name="updateProductOrServiceResponse">
|
||||||
|
<part name="result" type="tns:result"/>
|
||||||
|
<part name="id" type="xsd:string"/>
|
||||||
|
</message>
|
||||||
<message name="getListOfProductsOrServicesRequest">
|
<message name="getListOfProductsOrServicesRequest">
|
||||||
<part name="authentication" type="tns:authentication"/>
|
<part name="authentication" type="tns:authentication"/>
|
||||||
<part name="filterproduct" type="tns:filterproduct"/>
|
<part name="filterproduct" type="tns:filterproduct"/>
|
||||||
@ -885,6 +893,11 @@
|
|||||||
<input message="tns:createProductOrServiceRequest"/>
|
<input message="tns:createProductOrServiceRequest"/>
|
||||||
<output message="tns:createProductOrServiceResponse"/>
|
<output message="tns:createProductOrServiceResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
|
<operation name="updateProductOrService">
|
||||||
|
<documentation>WS to update a product or service</documentation>
|
||||||
|
<input message="tns:updateProductOrServiceRequest"/>
|
||||||
|
<output message="tns:updateProductOrServiceResponse"/>
|
||||||
|
</operation>
|
||||||
<operation name="getListOfProductsOrServices">
|
<operation name="getListOfProductsOrServices">
|
||||||
<documentation>WS to get list of all products or services id and ref</documentation>
|
<documentation>WS to get list of all products or services id and ref</documentation>
|
||||||
<input message="tns:getListOfProductsOrServicesRequest"/>
|
<input message="tns:getListOfProductsOrServicesRequest"/>
|
||||||
@ -916,6 +929,15 @@
|
|||||||
<soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
<soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
</output>
|
</output>
|
||||||
</operation>
|
</operation>
|
||||||
|
<operation name="updateProductOrService">
|
||||||
|
<soap:operation soapAction="http://www.dolibarr.org/ns/#updateProductOrService" style="rpc"/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
<operation name="getListOfProductsOrServices">
|
<operation name="getListOfProductsOrServices">
|
||||||
<soap:operation soapAction="http://www.dolibarr.org/ns/#getListOfProductsOrServices" style="rpc"/>
|
<soap:operation soapAction="http://www.dolibarr.org/ns/#getListOfProductsOrServices" style="rpc"/>
|
||||||
<input>
|
<input>
|
||||||
@ -940,7 +962,7 @@
|
|||||||
<soap:address location="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php"/>
|
<soap:address location="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php"/>
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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/">
|
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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:Body>
|
<SOAP-ENV:Body>
|
||||||
<ns8543:createProductOrService xmlns:ns8543="http://www.Dolibarr.org/ns/">
|
<ns8543:createProductOrService xmlns:ns8543="http://www.Dolibarr.org/ns/">
|
||||||
<authentication>
|
<authentication>
|
||||||
@ -978,7 +1000,7 @@
|
|||||||
</product>
|
</product>
|
||||||
</ns8543:createProductOrService>
|
</ns8543:createProductOrService>
|
||||||
</SOAP-ENV:Body>
|
</SOAP-ENV:Body>
|
||||||
</SOAP-ENV:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Request 2"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
</SOAP-ENV:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Request 2"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<soapenv:Header/>
|
<soapenv:Header/>
|
||||||
<soapenv:Body>
|
<soapenv:Body>
|
||||||
<ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
@ -1105,7 +1127,58 @@
|
|||||||
<id xsi:type="xsd:string">5</id>
|
<id xsi:type="xsd:string">5</id>
|
||||||
</ns:getProductsForCategory>
|
</ns:getProductsForCategory>
|
||||||
</soapenv:Body>
|
</soapenv:Body>
|
||||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getProductsForCategory"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrUserBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrUserBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/webservices/server_user.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/webservices/server_user.php?wsdl"><con:part><con:url>http://localhostdolibarr/webservices/server_user.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getProductsForCategory"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#updateProductOrService" name="updateProductOrService" bindingOperationName="updateProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<ns:updateProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
|
<authentication xsi:type="ns:authentication">
|
||||||
|
<!--You may enter the following 5 items in any order-->
|
||||||
|
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
||||||
|
<sourceapplication xsi:type="xsd:string">aaa</sourceapplication>
|
||||||
|
<login xsi:type="xsd:string">admin</login>
|
||||||
|
<password xsi:type="xsd:string">admin</password>
|
||||||
|
<entity xsi:type="xsd:string"></entity>
|
||||||
|
</authentication>
|
||||||
|
<product xsi:type="ns:product">
|
||||||
|
<!--You may enter the following 32 items in any order-->
|
||||||
|
<id xsi:type="xsd:string">1</id>
|
||||||
|
<ref xsi:type="xsd:string"></ref>
|
||||||
|
<ref_ext xsi:type="xsd:string">111</ref_ext>
|
||||||
|
<type xsi:type="xsd:string"></type>
|
||||||
|
<label xsi:type="xsd:string"></label>
|
||||||
|
<description xsi:type="xsd:string"></description>
|
||||||
|
<date_creation xsi:type="xsd:dateTime"></date_creation>
|
||||||
|
<date_modification xsi:type="xsd:dateTime"></date_modification>
|
||||||
|
<note xsi:type="xsd:string"></note>
|
||||||
|
<status_tobuy xsi:type="xsd:string"></status_tobuy>
|
||||||
|
<status_tosell xsi:type="xsd:string"></status_tosell>
|
||||||
|
<barcode xsi:type="xsd:string"></barcode>
|
||||||
|
<barcode_type xsi:type="xsd:string"></barcode_type>
|
||||||
|
<country_id xsi:type="xsd:string"></country_id>
|
||||||
|
<country_code xsi:type="xsd:string"></country_code>
|
||||||
|
<customcode xsi:type="xsd:string"></customcode>
|
||||||
|
<price_net xsi:type="xsd:string"></price_net>
|
||||||
|
<price xsi:type="xsd:string"></price>
|
||||||
|
<price_min_net xsi:type="xsd:string"></price_min_net>
|
||||||
|
<price_min xsi:type="xsd:string"></price_min>
|
||||||
|
<price_base_type xsi:type="xsd:string"></price_base_type>
|
||||||
|
<vat_rate xsi:type="xsd:string"></vat_rate>
|
||||||
|
<vat_npr xsi:type="xsd:string"></vat_npr>
|
||||||
|
<localtax1_tx xsi:type="xsd:string"></localtax1_tx>
|
||||||
|
<localtax2_tx xsi:type="xsd:string"></localtax2_tx>
|
||||||
|
<stock_alert xsi:type="xsd:string"></stock_alert>
|
||||||
|
<stock_real xsi:type="xsd:string"></stock_real>
|
||||||
|
<stock_pmp xsi:type="xsd:string"></stock_pmp>
|
||||||
|
<canvas xsi:type="xsd:string"></canvas>
|
||||||
|
<import_key xsi:type="xsd:string"></import_key>
|
||||||
|
<dir xsi:type="xsd:string"></dir>
|
||||||
|
<images xsi:type="ns:ImagesArray">
|
||||||
|
<!--Zero or more repetitions:-->
|
||||||
|
</images>
|
||||||
|
</product>
|
||||||
|
</ns:updateProductOrService>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#updateProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrUserBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrUserBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/webservices/server_user.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/webservices/server_user.php?wsdl"><con:part><con:url>http://localhostdolibarr/webservices/server_user.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
||||||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user