예제 #1
0
 public void init(ServletConfig servletConfig) throws ServletException {
   super.init(servletConfig);
   ObjectServiceFactory factory = new ObjectServiceFactory(getXFire().getTransportManager(), null);
   factory.addIgnoredMethods("java.lang.Comparable");
   Service service = factory.create(_serviceClass);
   service.setInvoker(new BeanInvoker(_instance));
   getController().getServiceRegistry().register(service);
 }
예제 #2
0
  public void setUp() throws Exception {
    super.setUp();

    Service service = getServiceFactory().create(EchoImpl.class);
    WSDLWriter writer = new ResourceWSDL(getClass().getResource("/org/codehaus/xfire/echo11.wsdl"));
    service.setWSDLWriter(writer);

    getServiceRegistry().register(service);
  }
예제 #3
0
  public void testWSDL() throws Exception {
    Service service = (Service) getServiceRegistry().getService("EchoImpl");

    WSDLWriter wsdl = service.getWSDLWriter();

    assertNotNull(wsdl);

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    getXFire().generateWSDL("EchoImpl", out);
  }
 public LockMessageServiceClient() {
   create0();
   Endpoint LockMessagePortEP =
       service0.addEndpoint(
           new QName("http://schemas.cordys.com/1.0/notification", "LockMessagePort"),
           new QName("http://schemas.cordys.com/1.0/notification", "LockMessageBinding"),
           "http://127.0.0.1/cordys/com.eibus.web.soap.Gateway.wcp?organization=o=system,cn=cordys,o=mss.boco.com");
   endpoints.put(
       new QName("http://schemas.cordys.com/1.0/notification", "LockMessagePort"),
       LockMessagePortEP);
   Endpoint LockMessagePortTypeLocalEndpointEP =
       service0.addEndpoint(
           new QName(
               "http://schemas.cordys.com/1.0/notification", "LockMessagePortTypeLocalEndpoint"),
           new QName(
               "http://schemas.cordys.com/1.0/notification", "LockMessagePortTypeLocalBinding"),
           "xfire.local://LockMessageService");
   endpoints.put(
       new QName("http://schemas.cordys.com/1.0/notification", "LockMessagePortTypeLocalEndpoint"),
       LockMessagePortTypeLocalEndpointEP);
 }
 @SuppressWarnings("unchecked")
 public ProcessWebServiceClient() {
   create0();
   Endpoint ProcessWebServiceSoapEP =
       service0.addEndpoint(
           new QName("http://www.ultimus.com", "ProcessWebServiceSoap"),
           new QName("http://www.ultimus.com", "ProcessWebServiceSoap"),
           "http://"
               + PWSProperties.getValueByKey("pws_server_ip")
               + "/PLWebServices/ProcessWebService.asmx");
   endpoints.put(
       new QName("http://www.ultimus.com", "ProcessWebServiceSoap"), ProcessWebServiceSoapEP);
   Endpoint ProcessWebServiceSoapLocalEndpointEP =
       service0.addEndpoint(
           new QName("http://www.ultimus.com", "ProcessWebServiceSoapLocalEndpoint"),
           new QName("http://www.ultimus.com", "ProcessWebServiceSoapLocalBinding"),
           "xfire.local://ProcessWebService");
   endpoints.put(
       new QName("http://www.ultimus.com", "ProcessWebServiceSoapLocalEndpoint"),
       ProcessWebServiceSoapLocalEndpointEP);
 }
  public void testVisitor() throws Exception {
    WSDLServiceBuilder builder =
        new WSDLServiceBuilder(getResourceAsStream("extendedWrappedTypes.wsdl"));
    builder.setBindingProvider(new MessageBindingProvider());
    builder.build();

    Map serviceMap = builder.getServices();
    assertEquals(1, serviceMap.size());

    Collection services = builder.getAllServices();
    assertEquals(1, services.size());

    Service service = (Service) services.iterator().next();

    Collection operations = service.getServiceInfo().getOperations();
    assertEquals(2, operations.size());

    OperationInfo opInfo = (OperationInfo) operations.iterator().next();
    assertEquals(1, opInfo.getInputMessage().size());
    assertEquals(1, opInfo.getOutputMessage().size());
  }