Some XPS foam board products can be detailed into a code-compliant weather resistant barrier, others not. Even those that comply are likely to run into long term reliability as a WRB, since foam experience dimensional changes over time (it's been reduced, but not eliminated over the past ~30-40 years.)
Whether the housewrap or felt goes between the foam & OSB or over the foam depends on how you intend to install the windows. "Outie" windows mounted roughly flush with the siding would have the housewrap on the exterior side of the foam to make the window flashing continuous with the WRB. "Innie" windows mounted inside the OSB would require the WRB to live between the foam & OSB.
In order to meet code on 2x6 construction without a class-I or II interior vapor retarder in your climate (US zone 6) requires a minimum of R11.25 of exterior foam. You'd meet the letter of the code at 2" with polyisocyanurate (aka "iso", "poliso", "PIR"), but not with XPS or EPS. If XPS, you'd need another 1/4", such as fan-fold XPS underlayment.
In practice the performance at temperatures that matter aren't all that great (derated to 25F average temp within the foam layer iso derates to ~ R5.6/ inch, whereas e XPS performance increases to about R5.5/inch.) But iso is blown with pentane whereas XPS is blown with HFC134fa. This has a real lifecycle performance impact- it means that XPS delivers 150-200x more greenhouse gases to the environment than iso, which makes iso a MUCH greener choice (when you have a choice.)
See:
http://www.buildingscience.com/documents/guides-and-manuals/irc-faqs/irc-faq-insulating-sheathing-vapor-retarder-requirements also:
http://www2.buildinggreen.com/blogs...insulation