Are both web services running on the same Java version? Or is one of them running on a non-Oracle Java implementation (for example with IBM's Java implementation)?
The reason you are not supposed to use sun.* or com.sun.* classes is because they are undocumented, and subject to change between Java versions, and also these classes don't exist in Java implementations other than Oracle's; so if you're for example running this on IBM's Java implementation, it will fail.
You'll have to change the code to something that doesn't use that internal class.