KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > webservice > jbws68 > JBWS68TestCase


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.webservice.jbws68;
23
24 import junit.framework.Test;
25 import org.jboss.test.webservice.WebserviceTestBase;
26
27 import javax.naming.InitialContext JavaDoc;
28 import javax.xml.rpc.Service JavaDoc;
29
30 /**
31  * The type associated with a message part references a complex schema type and not a schema element that uses the schema type.
32  *
33  * <message name="ItolEndPoint_getAccountResponse">
34  * <part name="result" type="ns2:AccountTO"/>
35  * </message>
36  *
37  * For the element name jboss-4.0.1 defaults to the schema type name instead of the wsdl part name, which indeed is probably incorrect.
38  *
39  * http://jira.jboss.com/jira/browse/JBWS-68
40  *
41  * @author Thomas.Diesler@jboss.org
42  * @since 08-Feb-2005
43  */

44 public class JBWS68TestCase extends WebserviceTestBase
45 {
46    /** Construct the test case with a given name
47     */

48    public JBWS68TestCase(String JavaDoc name)
49    {
50       super(name);
51    }
52
53    /** Deploy the test */
54    public static Test suite() throws Exception JavaDoc
55    {
56       return getDeploySetup(JBWS68TestCase.class, "ws4ee-jbws68.war, ws4ee-jbws68-client.jar");
57    }
58
59    /**
60     * Test JSE endpoint
61     */

62    public void testEndpoint() throws Exception JavaDoc
63    {
64       InitialContext JavaDoc iniCtx = getClientContext();
65       Service JavaDoc service = (Service JavaDoc)iniCtx.lookup("java:comp/env/service/HelloService");
66       Hello hello = (Hello)service.getPort(Hello.class);
67
68       UserType in0 = new UserType("Kermit");
69       UserType retObj = hello.echoUserType(in0);
70       assertEquals(in0, retObj);
71    }
72 }
73
Popular Tags