2
我正在構建一個SOAP客戶端,用於將信息發送到使用WSDL定義的SOAP服務。將數據發佈到SoapUI中的服務時,我可以省略我沒有值的字段,但是在PHP中,我收到了一個致命錯誤。SOAP請求中的省略字段致命錯誤
有沒有辦法讓PHP中的SOAPClient省略字段?我傳遞給的SOAPClient對象看起來是這樣的:
Kunde Object
(
[kundenr] => 1008911
[contact_id] => 10941
[kundenavn] =>
[organisasjonsnr] =>
[addresse] => Addresse Object
(
[postadresse1] =>
[postadresse2] =>
[postadresse3] =>
[postadresse] =>
[gateadresse1] =>
[gateadresse2] =>
[gateadresse3] =>
[gateadresse] =>
[county] =>
[kommunenr] =>
[stat] =>
[postnr] =>
[poststed] =>
[landkode] =>
[land] =>
[adresslayout] =>
)
[kontakt] => Kontakt Object
(
[tlfnr] =>
[tlfbeskrivelse] =>
[faxnr] =>
[faxbeskrivelse] =>
[mailadresse] =>
[webadresse] =>
)
[person] => Person Object
(
[customerId] =>
[personId] =>
[contact_id] =>
[fornavn] =>
[etternavn] =>
[brukernavn] =>
[epost] =>
[tlf] =>
[kundetype] => 40
[addresse] => Addresse Object
(
[postadresse1] =>
[postadresse2] =>
[postadresse3] =>
[postadresse] =>
[gateadresse1] =>
[gateadresse2] =>
[gateadresse3] =>
[gateadresse] =>
[county] =>
[kommunenr] =>
[stat] =>
[postnr] =>
[poststed] =>
[landkode] =>
[land] =>
[adresslayout] =>
)
)
[faultmsg] => Faultmsg Object
(
[Type] =>
[Melding] =>
[Detalj] =>
)
[avdeling] =>
[kundetype] => 40
[informasjon] =>
[aktiv] =>
[stopputsendelse] =>
[aco_kunde] =>
[uf_kunde] =>
[gan_kunde] =>
[kunde] => 10941
)
我想例如省略Kunde-> kundenavn從對象屬性,但是這給了我這個致命的錯誤:
[13-Aug-2012 07:01:50] PHP Fatal error: SOAP-ERROR: Encoding: object has no 'kundenavn' property in...
我想是這樣的......我現在已經有所行動了,但最好不要那麼做。字段不是必需的,所以我認爲這是前一個問題... – kristoffer 2012-10-25 06:34:50