Fix: WSDL of productorservice was not valid. Normalize field names.
This commit is contained in:
parent
710ea872a9
commit
fe072d992c
@ -113,15 +113,13 @@ $server->wsdl->addComplexType(
|
|||||||
|
|
||||||
'price_net' => array('name'=>'price_net','type'=>'xsd:string'),
|
'price_net' => array('name'=>'price_net','type'=>'xsd:string'),
|
||||||
'price' => array('name'=>'price','type'=>'xsd:string'),
|
'price' => array('name'=>'price','type'=>'xsd:string'),
|
||||||
'price_ttc' => array('name'=>'price_ttc','type'=>'xsd:string'),
|
'price_min_net' => array('name'=>'price_min_net','type'=>'xsd:string'),
|
||||||
'price_min' => array('name'=>'price_min','type'=>'xsd:string'),
|
'price_min' => array('name'=>'price_min','type'=>'xsd:string'),
|
||||||
'price_min_ttc' => array('name'=>'price_min_ttc','type'=>'xsd:string'),
|
|
||||||
|
|
||||||
'price_base_type' => array('name'=>'price_base_type','type'=>'xsd:string'),
|
'price_base_type' => array('name'=>'price_base_type','type'=>'xsd:string'),
|
||||||
|
|
||||||
'vat_rate' => array('name'=>'vat_rate','type'=>'xsd:string'),
|
'vat_rate' => array('name'=>'vat_rate','type'=>'xsd:string'),
|
||||||
'tva_tx' => array('name'=>'tva_tx','type'=>'xsd:string'),
|
'vat_npr' => array('name'=>'vat_npr','type'=>'xsd:string'),
|
||||||
'tva_npr' => array('name'=>'tva_npr','type'=>'xsd:string'),
|
|
||||||
'localtax1_tx' => array('name'=>'localtax1_tx','type'=>'xsd:string'),
|
'localtax1_tx' => array('name'=>'localtax1_tx','type'=>'xsd:string'),
|
||||||
'localtax2_tx' => array('name'=>'localtax2_tx','type'=>'xsd:string'),
|
'localtax2_tx' => array('name'=>'localtax2_tx','type'=>'xsd:string'),
|
||||||
|
|
||||||
@ -132,36 +130,39 @@ $server->wsdl->addComplexType(
|
|||||||
'import_key' => array('name'=>'import_key','type'=>'xsd:string'),
|
'import_key' => array('name'=>'import_key','type'=>'xsd:string'),
|
||||||
|
|
||||||
'dir' => array('name'=>'dir','type'=>'xsd:string'),
|
'dir' => array('name'=>'dir','type'=>'xsd:string'),
|
||||||
'photos' => array('name'=>'photos','type'=>'tns:PhotosArray')
|
'images' => array('name'=>'images','type'=>'tns:ImagesArray')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Image of product
|
* Image of product
|
||||||
*/
|
*/
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'PhotosArray',
|
'ImagesArray',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'array',
|
||||||
|
'sequence',
|
||||||
'',
|
'',
|
||||||
'SOAP-ENC:Array',
|
|
||||||
array(),
|
|
||||||
array(
|
array(
|
||||||
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:image[]')
|
'image' => array(
|
||||||
|
'name' => 'image',
|
||||||
|
'type' => 'tns:image',
|
||||||
|
'minOccurs' => '0',
|
||||||
|
'maxOccurs' => 'unbounded'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An image
|
* An image
|
||||||
*/
|
*/
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'image',
|
'image',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'struct',
|
||||||
|
'all',
|
||||||
'',
|
'',
|
||||||
'SOAP-ENC:Array',
|
|
||||||
array(),
|
|
||||||
array(
|
array(
|
||||||
'photo' => array('name'=>'photo','type'=>'xsd:string'),
|
'photo' => array('name'=>'photo','type'=>'xsd:string'),
|
||||||
'photo_vignette' => array('name'=>'photo_vignette','type'=>'xsd:string'),
|
'photo_vignette' => array('name'=>'photo_vignette','type'=>'xsd:string'),
|
||||||
@ -186,7 +187,7 @@ $server->wsdl->addComplexType(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
/*$server->wsdl->addComplexType(
|
||||||
'ProductsArray',
|
'ProductsArray',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'array',
|
||||||
@ -197,7 +198,7 @@ $server->wsdl->addComplexType(
|
|||||||
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:product[]')
|
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:product[]')
|
||||||
),
|
),
|
||||||
'tns:product'
|
'tns:product'
|
||||||
);
|
);*/
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'ProductsArray2',
|
'ProductsArray2',
|
||||||
'complexType',
|
'complexType',
|
||||||
@ -272,7 +273,7 @@ $server->register(
|
|||||||
// Entry values
|
// Entry values
|
||||||
array('authentication'=>'tns:authentication','id'=>'xsd:string'),
|
array('authentication'=>'tns:authentication','id'=>'xsd:string'),
|
||||||
// Exit values
|
// Exit values
|
||||||
array('result'=>'tns:result','products'=>'ProductsArray'),
|
array('result'=>'tns:result','products'=>'tns:ProductsArray2'),
|
||||||
$ns,
|
$ns,
|
||||||
$ns.'#getProductsForCategory',
|
$ns.'#getProductsForCategory',
|
||||||
$styledoc,
|
$styledoc,
|
||||||
@ -345,22 +346,18 @@ function getProductOrService($authentication,$id='',$ref='',$ref_ext='')
|
|||||||
'country_code' => $product->country_code,
|
'country_code' => $product->country_code,
|
||||||
'custom_code' => $product->customcode,
|
'custom_code' => $product->customcode,
|
||||||
|
|
||||||
'price_net' => $product->price, // todo : DEPRECATED ?
|
'price_net' => $product->price,
|
||||||
//'price' => ($product->price_ttc-$product->price),
|
'price' => $product->price_ttc,
|
||||||
'price' => $product->price,
|
'price_min_net' => $product->price_min,
|
||||||
'price_ttc' => $product->price_ttc,
|
'price_min' => $product->price_min_ttc,
|
||||||
'price_min' => $product->price_min,
|
|
||||||
'price_min_ttc' => $product->price_min_ttc,
|
|
||||||
'price_base_type' => $product->price_base_type,
|
'price_base_type' => $product->price_base_type,
|
||||||
'vat_rate' => $product->tva_tx, // todo : DEPRECATED ?
|
'vat_rate' => $product->tva_tx,
|
||||||
'tva_tx' => $product->tva_tx,
|
|
||||||
//! French VAT NPR
|
//! French VAT NPR
|
||||||
'tva_npr' => $product->tva_npr,
|
'vat_npr' => $product->tva_npr,
|
||||||
//! Spanish local taxes
|
//! Spanish local taxes
|
||||||
'localtax1_tx' => $product->localtax1_tx,
|
'localtax1_tx' => $product->localtax1_tx,
|
||||||
'localtax2_tx' => $product->localtax2_tx,
|
'localtax2_tx' => $product->localtax2_tx,
|
||||||
|
|
||||||
'price_ttc' => $product->price_ttc,
|
|
||||||
'price_base_type' => $product->price_base_type,
|
'price_base_type' => $product->price_base_type,
|
||||||
|
|
||||||
'stock_real' => $product->stock_reel,
|
'stock_real' => $product->stock_reel,
|
||||||
@ -368,7 +365,7 @@ function getProductOrService($authentication,$id='',$ref='',$ref_ext='')
|
|||||||
'pmp' => $product->pmp,
|
'pmp' => $product->pmp,
|
||||||
'import_key' => $product->import_key,
|
'import_key' => $product->import_key,
|
||||||
'dir' => $pdir,
|
'dir' => $pdir,
|
||||||
'photos' => $product->liste_photos($dir,$nbmax=10)
|
'images' => $product->liste_photos($dir,$nbmax=10)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -651,9 +648,9 @@ function getProductsForCategory($authentication,$id)
|
|||||||
'custom_code' => $obj->customcode,
|
'custom_code' => $obj->customcode,
|
||||||
|
|
||||||
'price_net' => $obj->price,
|
'price_net' => $obj->price,
|
||||||
'price' => ($obj->price_ttc-$obj->price),
|
'price' => $obj->price_ttc,
|
||||||
'vat_rate' => $obj->tva_tx,
|
'vat_rate' => $obj->tva_tx,
|
||||||
'price_ttc' => $obj->price_ttc,
|
|
||||||
'price_base_type' => $obj->price_base_type,
|
'price_base_type' => $obj->price_base_type,
|
||||||
|
|
||||||
'stock_real' => $obj->stock_reel,
|
'stock_real' => $obj->stock_reel,
|
||||||
@ -661,7 +658,7 @@ function getProductsForCategory($authentication,$id)
|
|||||||
'pmp' => $obj->pmp,
|
'pmp' => $obj->pmp,
|
||||||
'import_key' => $obj->import_key,
|
'import_key' => $obj->import_key,
|
||||||
'dir' => $pdir,
|
'dir' => $pdir,
|
||||||
'photos' => $obj->liste_photos($dir,$nbmax=10)
|
'images' => $obj->liste_photos($dir,$nbmax=10)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user