Soap Sorunum
-
merhaba
baslık için daha düzgün bişey bulamadım özür dilerim
bi sisteme soapla bişey eklemeye çalışıyorum.sürekli hata alıyorum hata da detaylı bi açıklama yok,
ilk defa soap kullanıyorum çok mal bişey yapıyo da olabilirim. kendi tarafımda nesne oluşturup bişeyleri nesne olarak mı göndermem gerekiyo acaba ?
aradaki bağlantıda/yetkilendirmede bi sorun yok. GetServerTime diye method var, onu çapırıp sunucunun saatini alıyorum düzgün bi şekilde. ya da __getFunctions() yapabiliyorum.
aşağıdaki fonksiyon var, gönderince soyle bişey alıyorum :
object(stdClass)#14 (2) { ["Success"]=> bool(false) ["ResponseMessages"]=> object(stdClass)#18 (0) { } }
wsdl in linkini istersiniz belki : http://barcelona.plentymarkets-x4.com/plenty/api/soap/version112/?xml
ne gönderiyorum/nasıl gönderiyoruma gelince :
required dediği herşeyi dolduruyorum :
$result = $client->AddItemsBase(array(
'ItemNo' => 123,
'ExternalItemID' => '345',
'EAN1' => '4011200296908',
'Model' => 'Model '
));
var_dump($result);wsdl de ilgili kısmı kopyalıyorum aşağıya :
<xsd:complexType name="PlentySoapObject_AddItemsBaseItemBase"> <xsd:all> <xsd:element name="ItemID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ItemNo" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ExternalItemID" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="EAN1" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="EAN2" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="EAN3" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="EAN4" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ISBN" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ASIN" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Type" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Model" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ProducerID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="VATInternalID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Marking1ID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Marking2ID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="CustomsTariffNumber" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="FSK" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Condition" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Position" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="WebShopSpecial" type="xsd:string" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Published" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="LastUpdate" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="ParcelServicePresetIDs" type="tns:ArrayOfPlentysoapobject_integer" nillable="true"/> <xsd:element name="ProducingCountryID" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="FreeTextFields" type="tns:PlentySoapObject_ItemFreeTextFields" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Texts" type="tns:PlentySoapObject_ItemTexts" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="PriceSet" type="tns:PlentySoapObject_ItemPriceSet" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Stock" type="tns:PlentySoapObject_ItemStock" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Availability" type="tns:PlentySoapObject_ItemAvailability" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Others" type="tns:PlentySoapObject_ItemOthers" minOccurs="0" nillable="true" maxOccurs="1"/> <xsd:element name="Categories" type="tns:ArrayOfPlentysoapobject_itemcategory" nillable="true"/> <xsd:element name="ItemSuppliers" type="tns:ArrayOfPlentysoapobject_itemsupplier" nillable="true"/> <xsd:element name="StoreIDs" type="tns:ArrayOfPlentysoapobject_integer" nillable="true"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ArrayOfPlentysoapobject_additemsbaseitembase"> <xsd:sequence> <xsd:element name="item" type="tns:PlentySoapObject_AddItemsBaseItemBase" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PlentySoapRequest_AddItemsBase"> <xsd:all> <xsd:element name="BaseItems" type="tns:ArrayOfPlentysoapobject_additemsbaseitembase" nillable="true"/> <xsd:element name="CallItemsLimit" type="xsd:int" minOccurs="0" nillable="true" maxOccurs="1"/> </xsd:all> </xsd:complexType> <xsd:complexType name="PlentySoapResponse_AddItemsBase"> <xsd:all> <xsd:element name="Success" type="xsd:boolean" minOccurs="1" maxOccurs="1"/> <xsd:element name="ResponseMessages" type="tns:ArrayOfPlentysoapresponsemessage" nillable="true"/> </xsd:all> </xsd:complexType>
-
Edit : Up olsun bari sorunu yanlış anlamışım zaten yetkilendirme yapmasan diğer methodları da kullanamzsın
MhmdAlmz tarafından 13/Tem/16 17:55 tarihinde düzenlenmiştir