Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 87435 invoked from network); 15 Feb 2005 08:19:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Feb 2005 08:19:27 -0000 Received: (qmail 53054 invoked by uid 500); 15 Feb 2005 08:19:26 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 53005 invoked by uid 500); 15 Feb 2005 08:19:26 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 52991 invoked by uid 99); 15 Feb 2005 08:19:26 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 15 Feb 2005 00:19:24 -0800 Received: (qmail 87378 invoked by uid 65534); 15 Feb 2005 08:19:23 -0000 Message-ID: <20050215081923.87377.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Tue, 15 Feb 2005 08:19:23 -0000 Subject: svn commit: r153910 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1: ./ conf/ conf/META-INF/ src/samples/userguide/sample1/client/ src/samples/userguide/sample1/server/ To: axis-cvs@ws.apache.org From: chathura@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: chathura Date: Tue Feb 15 00:19:19 2005 New Revision: 153910 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D153910 Log: Sample 1 Completed with Hot deployment Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/build.xml webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/conf/ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/conf/META-INF/ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/conf/META-INF/service.xml Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoInt.java webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoString.java webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/InteropTest_Stub.java webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/server/SampleEnvironmentCreator.java Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userg= uide/sample1/build.xml URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/build.xml?view=3Dauto&rev=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/build.xml (added) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/build.xml Tue Feb 15 00:19:19 2005 @@ -0,0 +1,109 @@ + + + + + + + + + + + +=09 +=09 +=09 +=09 + + + =20 + + +=09 + + + +=09 + + + +=09 + +=09 + + + + + + + + + =09 + +=09 + + =09 + +=09 + + + +=09 + + + + + + + + + + + + + + + =09 + =09 + =20 + =09 + + + + + + + =20 + + +=09 + + =09 + +=09 + + + + + + + +=09 + + + + + + + +=09 + + Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userg= uide/sample1/conf/META-INF/service.xml URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/conf/META-INF/service.xml?view=3Da= uto&rev=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/conf/META-INF/service.xml (added) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/conf/META-INF/service.xml Tue Feb 15 00:19:19 2005 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + =20 + + + + + =20 + \ No newline at end of file Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/us= erguide/sample1/src/samples/userguide/sample1/client/EchoInt.java URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/src/samples/userguide/sample1/clie= nt/EchoInt.java?view=3Ddiff&r1=3D153909&r2=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoInt.java (original) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoInt.java Tue Feb 15 00:1= 9:19 2005 @@ -19,7 +19,6 @@ =20 import org.apache.axis.addressing.AddressingConstants; import org.apache.axis.addressing.EndpointReference; -import org.apache.axis.engine.EngineUtils; =20 /** * @author chathura@opensource.lk @@ -28,10 +27,14 @@ public class EchoInt { =09 public static void main(String[] args) throws Exception { + if(2!=3D args.length ){ + System.out.println("Usage "); + =09 + } InteropTest_Stub clientStub =3D new InteropTest_Stub(); - URL url =3D new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis2/= services/sample1"); + URL url =3D new URL("http","127.0.0.1",new Integer(args[0]).intValue(),"= /axis2/services/sample1"); clientStub.setEndPointReference(new EndpointReference(AddressingConstant= s=2EWSA_TO, url.toString())); - Integer echoInt =3D clientStub.echoInt(new Integer(794)); + Integer echoInt =3D clientStub.echoInt(new Integer(args[1])); System.out.println(echoInt); =09 } Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/us= erguide/sample1/src/samples/userguide/sample1/client/EchoString.java URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/src/samples/userguide/sample1/clie= nt/EchoString.java?view=3Ddiff&r1=3D153909&r2=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoString.java (original) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/EchoString.java Tue Feb 15 0= 0:19:19 2005 @@ -19,7 +19,6 @@ =20 import org.apache.axis.addressing.AddressingConstants; import org.apache.axis.addressing.EndpointReference; -import org.apache.axis.engine.EngineUtils; =20 /** * @author chathura@opensource.lk @@ -29,9 +28,9 @@ =20 public static void main(String[] args) throws Exception{ InteropTest_Stub stub =3Dnew InteropTest_Stub(); - URL url =3D new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis/s= ervices/sample1"); + URL url =3D new URL("http","127.0.0.1", new Integer(args[0]).intValue(),= "/axis2/services/sample1"); stub.setEndPointReference(new EndpointReference(AddressingConstants.WSA_= TO, url.toString())); - System.out.println(stub.echoString("Hi Chinthaka")); + System.out.println(stub.echoString(args[1])); =09 =09 } Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/us= erguide/sample1/src/samples/userguide/sample1/client/InteropTest_Stub.java URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/src/samples/userguide/sample1/clie= nt/InteropTest_Stub.java?view=3Ddiff&r1=3D153909&r2=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/InteropTest_Stub.java (origi= nal) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/client/InteropTest_Stub.java Tue Fe= b 15 00:19:19 2005 @@ -104,6 +104,9 @@ Iterator childrenIter =3D body.getChildren(); while(childrenIter.hasNext()){ OMNode child =3D (OMNode) childrenIter.next(); + if(child instanceof OMElement && "Fault".equalsIgnoreCase(((OMElement)c= hild).getLocalName())){ + throw new AxisFault("Fault in server side"); + } if(child instanceof OMElement && "echoStringResponse".equalsIgnoreCase(= ((OMElement)child).getLocalName())){ response =3D (OMElement)child; =09 } @@ -130,6 +133,9 @@ Iterator childrenIter =3D body.getChildren(); while(childrenIter.hasNext()){ OMNode child =3D (OMNode) childrenIter.next(); + if(child instanceof OMElement && "Fault".equalsIgnoreCase(((OMElement)c= hild).getLocalName())){ + throw new AxisFault("Fault in server side"); + } if(child instanceof OMElement && "echoIntResponse".equalsIgnoreCase(((O= MElement)child).getLocalName())){ response =3D (OMElement)child; =09 } Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/us= erguide/sample1/src/samples/userguide/sample1/server/SampleEnvironmentCreat= or.java URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/= prototype2/src/samples/userguide/sample1/src/samples/userguide/sample1/serv= er/SampleEnvironmentCreator.java?view=3Ddiff&r1=3D153909&r2=3D153910 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/server/SampleEnvironmentCreator.jav= a (original) +++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguid= e/sample1/src/samples/userguide/sample1/server/SampleEnvironmentCreator.jav= a Tue Feb 15 00:19:19 2005 @@ -15,17 +15,8 @@ */ package samples.userguide.sample1.server; =20 -import java.io.FileReader; -import java.net.URL; - import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; =20 -import org.apache.axis.AbstractTestCase; -import org.apache.axis.addressing.AddressingConstants; -import org.apache.axis.addressing.EndpointReference; -import org.apache.axis.clientapi.Call; import org.apache.axis.context.MessageContext; import org.apache.axis.description.AxisGlobal; import org.apache.axis.description.AxisOperation; @@ -34,8 +25,6 @@ import org.apache.axis.engine.EngineRegistry; import org.apache.axis.engine.EngineRegistryImpl; import org.apache.axis.engine.EngineUtils; -import org.apache.axis.om.SOAPEnvelope; -import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder; import org.apache.axis.testUtils.SimpleJavaProvider; import org.apache.axis.transport.http.SimpleHTTPReceiver; import org.apache.commons.logging.Log; @@ -45,7 +34,7 @@ * @author chathura@opensource.lk *=20 */ -public class SampleEnvironmentCreator extends AbstractTestCase{ +public class SampleEnvironmentCreator { =09 private Log log =3D LogFactory.getLog(getClass()); private QName serviceName =3D new QName("","sample1"); @@ -59,21 +48,8 @@ private SimpleHTTPReceiver sas; =20 public SampleEnvironmentCreator(){ - super(SampleEnvironmentCreator.class.getName()); -// try { -// this.setUp(); -// this.testInt(); -// this.tearDown(); -// } catch (Exception e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } =20 } - - public SampleEnvironmentCreator(String testName) { - super(testName); - } =20 public void setUp() throws Exception { AxisGlobal global =3D new AxisGlobal(); @@ -103,69 +79,7 @@ } =20 =20 -public void testInt() throws Exception{ - try{ - =20 - Call call =3D new Call(); - URL url =3D new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/= axis/services/EchoXMLService"); - EndpointReference epr =3D new EndpointReference(AddressingConstant= s=2EWSA_TO, url.toString()); - call.setTo(epr); - SOAPEnvelope reply =3D call.sendReceive(this.getechoIntEnvelope())= ; - reply.serialize(XMLOutputFactory.newInstance().createXMLStreamWrit= er(System.out), false); - =20 - }catch(Exception e){ - e.printStackTrace(); - tearDown(); - throw e; - } =20 -} -public void testString() throws Exception{ -// try{ -// OMFactory fac =3D OMFactory.newInstance(); -// -// OMNamespace omNs =3D fac.createOMNamespace("http://localhost/my"= ,"my"); -// OMElement method =3D fac.createOMElement("echoOMElement",omNs) = ; -// OMElement value =3D fac.createOMElement("myValue",omNs) ; -// value.setValue("Isaac Assimov, the foundation Sega"); -// method.addChild(value); -// =20 -// Call call =3D new Call(); -// URL url =3D new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,= "/axis/services/EchoXMLService"); -// =20 -// CallBack callback =3D new CallBack() { -// public void doWork(OMElement ele) { -// System.out.print("got the result =3D " + ele +" :)"); -// -// } -// public void reportError(Exception e) { -// log.info("reporting error from callback !"); -// e.printStackTrace(); -// } -// }; -// =20 -// call.asyncCall(method,url,callback); -// log.info("send the reqest"); -// =20 -// Thread.sleep(1000); -// }catch(Exception e){ -// e.printStackTrace(); -// tearDown(); -// throw e; -// } =20 -} =20 - public static void main(String[] args) { - new SampleEnvironmentCreator(); -=09 -} - -private SOAPEnvelope getechoIntEnvelope() throws Exception { - - SOAPEnvelope envelope =3D new StAXSOAPModelBuilder(XMLInputFactory.new= Instance().createXMLStreamReader( - new FileReader(getTestResourceFile("echo/echoInt.xml")))).getS= OAPEnvelope(); - envelope.serialize(XMLOutputFactory.newInstance().createXMLStreamWrite= r(System.out), false); - return envelope; -} =09 =20 }