View Single Post
 
Old June 9th, 2008, 01:03 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You'll need to do some kind of conversion between the custom web service type and the local type. This may be a good place to use the Adapter Pattern. As the HFDP book (which I know you have Rob!) says:

"The Adapter Pattern converts the interface of a class into another interface that clients expect..." [HFDP, 243]

So you need to build an adapter class that is composed of the web service type and implements the interface of the custom type. If your custom type is not already an interface then you may need to refactor it a bit.

- Head First Design Patterns (HFDP), O'Reilly Press (Sorry, Wrox)

-Peter
compiledthoughts.com