Hi,
 
Is there a full example of client & server for Xmlbeans using the embedded XfireHttpServer and the dynamic client ?
 
I have the server and client built but just keep getting an XFire Fault which does not identify what the issue is other than I keep getting an HTTP 500 error from the client.
Manually accessing the server URL gives me a HTML page containing 'Invalid SOAP request'.
 
There is no WSDL available either at the http://host:port/TestService?wsdl, however Telnet shows the port is open as does the 'Invalid SOAP request'. The server code is:-
 
public class TestServer {
 
 /**
  * @param args
  */
 public static void main(String[] args) {
  XFire xfire = XFireFactory.newInstance().getXFire();
  XmlBeansServiceFactory factory = new XmlBeansServiceFactory(xfire.getTransportManager());
  Service service = factory.create(TestService.class);
  service.setProperty(XmlBeansType.XMLBEANS_NAMESPACE_HACK, "true"); 
  xfire.getServiceRegistry().register(service);
  XFireHttpServer server = new XFireHttpServer();
  server.setPort(8191);
  try {
   server.start();
  } catch (Exception e) {
   e.printStackTrace();
  }  
 }
}
 
whilst the client is :-
 
//   Create a service model for the client
  XmlBeansServiceFactory serviceFactory = new XmlBeansServiceFactory();
  Service serviceModel = serviceFactory.create(TestService.class);
 
//   Create a client proxy
  XFireProxyFactory proxyFactory = new XFireProxyFactory();
  try {
   client = new Client(new URL("
http://localhost:8191/TestService"));
   //client2 = (TestService) proxyFactory.create(serviceModel, "
http://localhost:8191/TestService");
 
the HTTP 500 occurs on the line client = new Client(new URL("http://localhost:8191/TestService"));
 
Any help would be much appreciated.
 
Regards
 
Don
 

Reply via email to