@Test
public void testWebserviceProtocol() throws Exception {

    DemoService service = new DemoServiceImpl();
    protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("webservice://127.0.0.1:9019/" + DemoService.class.getName())));
    service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("webservice://127.0.0.1:9019/" + DemoService.class.getName() + "?timeout=3000")));
    assertEquals(service.create(1,"kk").getName(), "kk");
    assertEquals(service.getSize(null), -1);
    assertEquals(service.getSize(new String[]{"", "", ""}), 3);
    Object object = service.invoke("webservice://127.0.0.1:9019/" + DemoService.class.getName() + "", "invoke");
    System.out.println(object);
    assertEquals("webservice://127.0.0.1:9019/com.alibaba.dubbo.rpc.protocol.webservice.DemoService:invoke", object);
    StringBuffer buf = new StringBuffer();
    for (int i = 0; i < 1024 * 32 + 32; i++)
        buf.append('A');
    assertEquals(32800,service.stringLength(buf.toString()));
a method start with $ is illegal in soap
      // cast to EchoService
      EchoService echo = proxy.getProxy(protocol.refer(EchoService.class, URL.valueOf("webservice://127.0.0.1:9010/" + DemoService.class.getName() + "?client=netty")));
      assertEquals(echo.echo(buf.toString()), buf.toString());
      assertEquals(echo.$echo("test"), "test");
      assertEquals(echo.$echo("abcdefg"), "abcdefg");
      assertEquals(echo.$echo(1234), 1234);
}