[jboss-user] [EJB 3.0] - Re: need some help for session bean web service

shupingChen do-not-reply at jboss.com
Sun Apr 8 06:41:02 EDT 2007


when i use the axis to rewrite my ws client, i have another problem:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXParseException: Premature end of file.
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at csp.jx.ws.test.TestByJNDI.main(TestByJNDI.java:27)

	{http://xml.apache.org/axis/}hostname:lanneret

org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at csp.jx.ws.test.TestByJNDI.main(TestByJNDI.java:27)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
	... 9 more


my client code :

  | package csp.jx.ws.test;
  | 
  | import java.net.MalformedURLException;
  | import java.net.URL;
  | import java.rmi.RemoteException;
  | 
  | import javax.xml.namespace.QName;
  | import javax.xml.rpc.ServiceException;
  | 
  | import org.apache.axis.client.Call;
  | import org.apache.axis.client.Service;
  | 
  | public class TestByJNDI {
  | 
  | 	/**
  | 	 * @param args
  | 	 */
  | 	public static void main(String[] args) {
  | 		try {
  | 			String endpoint = "http://localhost:8080/ejb3test/HelloBean";
  | 			Service service = new Service();
  | 			Call  call = (Call)service.createCall();
  | 			
  | 			call.setTargetEndpointAddress(new URL(endpoint));
  | 			call.setOperationName(new QName("http://stateless.session.examples","hello"));
  | 		
  | 			String ret = (String)call.invoke(new Object[]{});
  | 			
  | 			System.out.println(ret);
  | 		} catch (MalformedURLException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		} catch (ServiceException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		} catch (RemoteException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 	}
  | 
  | }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035582#4035582

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035582



More information about the jboss-user mailing list