Question: What we need:
=============

My team is maintaining and adding features to a product that's already in production. We are trying to figure out how to improve our deployment strategy so that we can begin deploying one feature at-a-time instead of large chunks of features. Ideally, when a feature passes QA and Business Acceptance, we would like to deploy JUST that feature to production (at any time). 

What we are doing now: (that doesn't work)
==========================================

We are already following the concept of "Branch per Feature". Right now, we are creating new feature branches off of our development branch. When we are finished with a feature, we create a pull-request back to the dev branch. That pull request looks GREAT... it only has the changes that are relevant to the feature. After code-review, the branch is merged into dev master (and deployed to dev) and QA takes a look. Once QA approves the feature, we merge the original feature branch into the staging branch (and deploy to staging). Once the business accepts the new feature, the original feature branch is merged into production. Our problem is that the original feature branch seems to snowball by the time it gets to production with many changes that don't seem relevant to the feature branch. In the end, we have deployed to production many things that were not QAed or accepted by the business.

Answer: 
You could try to supress errors as [this question](https://stackoverflow.com/questions/3710147/php-get-content-of-http-400-response) mentions to get rid of the status = 400. Perhaps with `simplexml_load_file('url', null, LIBXML_NOERROR);`

If it still doesnt work, there are a lot of things that can go wrong. `simplexml_load_file` doesnt have a lot of options to debug. You could try using `curl`.

```
<?php
// make request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://XXXXXXXXX:8080/symws/rest/standard/searchCatalog?clientID=StorageClient&term1=ocm00576702"); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
$output = curl_exec($ch);   

// handle error; error output
if(curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
  var_dump($output);
} else {

  //load xml
  $xml= simplexml_load_string($output);
}
curl_close($ch);

if (empty($xml)) {
  echo 'Something went wrong';
  exit;
}
?>

```

UPDATE:

Give this a try please and see if you get some info back:

```
<?php
$content = file_get_contents('http://XXXXXXXXX:8080/symws/rest/standard/searchCatalog?clientID=StorageClient&term1=ocm00576702');
var_dump($http_response_header);
?>

```
checkout the request being sent by simplexml\_load\_file. 

you could also try accessing the 'url' directly in the browser (assuming you are performing a GET request)

you also need to consider the server side. Your server might be throwing a response with a 400 code even though everything is working normal. It might also not programmed to accept the request you are sending.