I'm having similar issues with the supplied charger.
Immediately out of the box, my device wouldn't charge from either the wall socket or connect to my laptop.
I have found that the socket into the iphone is very 'touchy'. The lead has to be inserted at a very slight angle for the connect to be made. Moving the device too much may break this poor connection(and result in the problems your having, I guess?)
While my solution above means the phone works, of sorts, its extremely dissapointing. I've never had an iphone before, I brought one because I thought it was better made than this.