Why I get javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerExcept

I used NetBeans IDE 5.5 to create a Web Services (JAX-WS).I test many simple services(like add(i,j)),and then create a simple main class to test it,it works find

but if I code

try{

JAXBContext jc=JAXBContext.newInstance("sample.schema");

}catch (JAXBException ex){

ex.printStackTrace();

}

into the web service

the client recieved:

javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException

,I try many ways it just can't work.I can't find what the wrong is...

ps:client is created by right-clicking in main.java, choose Web Service Client Resources > Call Web Service Operation

[864 byte] By [wisea] at [2007-11-26 20:22:01]
# 1

> try {

> JAXBContext

> jc=JAXBContext.newInstance("sample.schema");

> } catch (JAXBException ex) {

> ex.printStackTrace();

> }

Why would NetBeans IDE 5.5 be giving you code like that if you said you followed the instructions you said on how to create a client?

benicelya at 2007-7-10 0:47:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...