Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 23569 invoked from network); 21 Dec 2005 08:11:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Dec 2005 08:11:59 -0000 Received: (qmail 39434 invoked by uid 500); 21 Dec 2005 08:11:58 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 38833 invoked by uid 500); 21 Dec 2005 08:11:56 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 38822 invoked by uid 99); 21 Dec 2005 08:11:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 00:11:56 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 21 Dec 2005 00:11:55 -0800 Received: (qmail 63454 invoked from network); 21 Dec 2005 08:11:33 -0000 Received: from unknown (HELO ?127.0.0.1?) (unknown) by unknown with SMTP; 21 Dec 2005 08:11:33 -0000 X-pair-Authenticated: 222.165.172.126 Message-ID: <43A90E31.1070000@wso2.com> Date: Wed, 21 Dec 2005 14:11:29 +0600 From: Thilini User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: [Axis2]Test Case for AxisServiceBuilder Content-Type: multipart/mixed; boundary="------------060507020805060900040309" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------060507020805060900040309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Attached is the test case written for AxisServiceBuilder.java. Please review and apply the patch Thanks Thilini --------------060507020805060900040309 Content-Type: text/plain; name="patch-21-12-05.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-21-12-05.patch" Index: test-resources/PingService.wsdl =================================================================== --- test-resources/PingService.wsdl (revision 0) +++ test-resources/PingService.wsdl (revision 0) @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: test/org/apache/axis2/deployment/AxisServiceBuilderTest.java =================================================================== --- test/org/apache/axis2/deployment/AxisServiceBuilderTest.java (revision 0) +++ test/org/apache/axis2/deployment/AxisServiceBuilderTest.java (revision 0) @@ -0,0 +1,61 @@ +/* + * Created on Dec 21, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.apache.axis2.deployment; + +import java.io.FileInputStream; + +import javax.xml.namespace.QName; + +import org.apache.axis2.description.AxisMessage; +import org.apache.axis2.description.AxisOperation; +import org.apache.axis2.description.AxisService; +import org.apache.wsdl.WSDLConstants; + +import junit.framework.TestCase; + +/** + * @author Thilini + * + * TODO To change the template for this generated type comment go to Window - + * Preferences - Java - Code Style - Code Templates + */ +public class AxisServiceBuilderTest extends TestCase { + private AxisServiceBuilder builder; + + public AxisServiceBuilderTest(String args) { + super(args); + } + + protected void setUp() throws Exception { + builder = new AxisServiceBuilder(); + super.setUp(); + } + + public void testWSDLTOAxisService() throws Exception { + + assertNotNull(builder); + + AxisService service = builder.getAxisService(new FileInputStream( + "./test-resources/PingService.wsdl")); + + assertNotNull(service); + assertEquals(service.getName(), "PingService"); + AxisOperation operation = service.getOperation(new QName("Ping")); + assertNotNull(operation); + AxisMessage inMessage = operation + .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); + assertNotNull(inMessage); + assertEquals("PingRequest", inMessage.getElementQName().getLocalPart()); + AxisMessage outMessage = operation + .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE); + assertNotNull(outMessage); + assertEquals("PingResponse", outMessage.getElementQName() + .getLocalPart()); + + } + +} \ No newline at end of file --------------060507020805060900040309--