Joe Vieira Posted November 12, 2010 Share Posted November 12, 2010 Hey, I've got a REALLY complicated issue. I'll do my best to explain it. I have a 3rd party API (soap) that I'm trying to integrate, I'd like to use namespaces to keep their objects/classes separate from ours. In a nut shell what is happening is that I have a soap struct which maps down to a php object (Transaction) inside that object are more objects. as i build out the parameter array to pass to soapCall everything looks good. however the xml that gets generated by soapCall is missing the transaction value, the tag is their <transaction/> but no value. Now, I assumed this is due to namespacing ruining the automated object detection in the soap client. SO i did: $auth->transaction = new \soapVar($bank_trans, XSD_ANYTYPE, "Transaction" , "http://masked/Transactions"); this gets the value into the xml however now i get a really weird error soapFault: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://masked/Transactions:transaction. The InnerException message was 'Error in line 2 position 4965. Element 'http://masked/Transactions:transaction' contains data of the 'http://masked/Transactions:Transaction' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'Transaction' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details. in /home/jvieira/dev/www/trunk/include/CWS/CWSBankcard.php on line 1001 Call Stack #TimeMemoryFunctionLocation 10.0061930576{main}( )../TransactionManagement.php:0 20.00822682296CWS\CWSClient->authorize( )../TransactionManagement.php:156 30.00832695680CWS\CWSBankcard->Authorize( )../CWSClient.php:418 40.00832696736SoapClient->__soapCall( )../CWSBankcard.php:1001 ) ) any ideas? Thanks, Joe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.