2015-12-01 12:46
浏览 34


I am currently integrating with Kashflow and using SOAP calls to send Customer data to my Kashflow account from my Symfony2 site, and it should return the ID of the new customer - I need this in order to save it in the database at my end.

However, upon return, I get the HTTP header and not just the ID, which means it is not inserting it into the database as it needs to be an integer.

Here is the SOAP response:

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap12="">
    <InsertCustomerResponse xmlns="KashFlow">

I am trying to retrieve the new ID by using:

return new Response((int)$response->soapBody->InsertCustomerResponse->InsertCustomerResult);

But even though the ID does get returned, it spits out the HTTP header above it. Is there any way of removing this? I have tried using preg_replace like this (where $return is the response from the SOAP call):


But it just returns a blank.

Any ideas?

Thanks in advance

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题