juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1528703 - in /juddi/trunk: juddi-client.net/ juddi-client.net/example/AspnetServiceLifeCycle/ juddi-client.net/juddi-client.net.test/ juddi-client.net/juddi-client.net/bindings/ juddi-examples/uddi-samples/src/org/apache/juddi/samples/
Date Thu, 03 Oct 2013 02:21:50 GMT
Author: alexoree
Date: Thu Oct  3 02:21:49 2013
New Revision: 1528703

URL: http://svn.apache.org/r1528703
Log:
JUDDI-567 adding additional test cases, bb-win7 test script
JUDDI-242 adding a simple example program which was used to verify find_business variants

Added:
    juddi/trunk/juddi-client.net/bb-win7.bat
Modified:
    juddi/trunk/juddi-client.net/example/AspnetServiceLifeCycle/Program.cs
    juddi/trunk/juddi-client.net/juddi-client.net.test/SerializationTests.cs
    juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj
    juddi/trunk/juddi-client.net/juddi-client.net/bindings/datamodel-mono.cs
    juddi/trunk/juddi-examples/uddi-samples/src/org/apache/juddi/samples/FindBusinessBugHunt.java

Added: juddi/trunk/juddi-client.net/bb-win7.bat
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/bb-win7.bat?rev=1528703&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/bb-win7.bat (added)
+++ juddi/trunk/juddi-client.net/bb-win7.bat Thu Oct  3 02:21:49 2013
@@ -0,0 +1,5 @@
+rem Hi, this is for running nunit tests on ASF's build bot CI servers
+
+rem "C:\Program Files\NUnit 2.6.2\bin\nunit-console.exe" juddi-client.net\juddi-client.net.test\bin\Debug\juddi-client.net.test.dll
+
+c:\juddi\NUnit-2.6.1\bin\nunit-console.exe juddi-client.net\juddi-client.net.test\bin\Debug\juddi-client.net.test.dll
\ No newline at end of file

Modified: juddi/trunk/juddi-client.net/example/AspnetServiceLifeCycle/Program.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/example/AspnetServiceLifeCycle/Program.cs?rev=1528703&r1=1528702&r2=1528703&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/example/AspnetServiceLifeCycle/Program.cs (original)
+++ juddi/trunk/juddi-client.net/example/AspnetServiceLifeCycle/Program.cs Thu Oct  3 02:21:49
2013
@@ -32,6 +32,9 @@ namespace AspnetServiceLifeCycle
     {
         static void Main(string[] args)
         {
+            //Normally, this coder snippet would be executed by some kind of web service
life cycle listener
+            //such as global.asax
+            //a web service contructor
             Type t = typeof(HelloImpl);
             Console.Out.WriteLine(t.AssemblyQualifiedName);
             UDDIClient clerkManager = null;
@@ -49,6 +52,8 @@ namespace AspnetServiceLifeCycle
             clerk = clerkManager.getClerk("default");
             clerkManager.registerAnnotatedServices();
             HelloImpl x = new HelloImpl();
+
+            //this is more of an "onShutdown" event
             clerkManager.unRegisterAnnotatedServices();
             Thread.Sleep(15000);
 

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/SerializationTests.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/SerializationTests.cs?rev=1528703&r1=1528702&r2=1528703&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/SerializationTests.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/SerializationTests.cs Thu Oct  3 02:21:49
2013
@@ -15,6 +15,9 @@
  *
  */
 using NUnit.Framework;
+using org.apache.juddi.v3.client;
+using org.apache.juddi.v3.client.config;
+using org.apache.juddi.v3.client.transport;
 using org.uddi.apiv3;
 using System;
 using System.Collections.Generic;
@@ -31,6 +34,7 @@ namespace juddi_client.net_mono_test
     public class SerializationTests
     {
 
+        #region basic serialization tests
         [Test]
         public void xr_subscriptionResultsList()
         {
@@ -239,6 +243,304 @@ namespace juddi_client.net_mono_test
         {
 
             overviewDoc r = new overviewDoc();
+            description d = new description("v", "en");
+            overviewURL ol = new overviewURL("http://url", "website");
+
+            r.Items = new object[] { d, ol };
+            XmlSerializer xr = new XmlSerializer(typeof(overviewDoc));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+        #endregion
+
+
+
+
+
+        #region calls using web services
+
+        [Test]
+        public void xr_subscriptionResultsListws()
+        {
+            subscriptionResultsList r = new subscriptionResultsList();
+            UDDIClient clerkManager = null;
+            Transport transport = null;
+            UDDIClerk clerk = null;
+            try
+            {
+                clerkManager = new UDDIClient("uddi.xml");
+                UDDIClientContainer.addClient(clerkManager);
+                transport = clerkManager.getTransport("default");
+                org.uddi.apiv3.UDDI_Security_SoapBinding security = transport.getUDDISecurityService();
+                org.uddi.apiv3.UDDI_Inquiry_SoapBinding inquiry = transport.getUDDIInquiryService();
+                org.uddi.apiv3.UDDI_Publication_SoapBinding publish = transport.getUDDIPublishService();
+                org.uddi.apiv3.UDDI_CustodyTransfer_SoapBinding custody = transport.getUDDICustodyTransferService();
+                org.uddi.apiv3.UDDI_Subscription_SoapBinding sub = transport.getUDDISubscriptionService();
+                clerk = clerkManager.getClerk("default");
+
+            }
+            catch (Exception ex)
+            {
+                while (ex != null)
+                {
+                    System.Console.WriteLine("Error! " + ex.Message);
+                    ex = ex.InnerException;
+                }
+            }
+            finally
+            {
+                if (transport != null && transport is IDisposable)
+                {
+                    ((IDisposable)transport).Dispose();
+                }
+                if (clerk != null)
+                    clerk.Dispose();
+            }
+        }
+
+        [Test]
+        public void xr_subscriptionFilterws()
+        {
+
+            subscriptionFilter r = new subscriptionFilter();
+            UDDIClient clerkManager = null;
+            Transport transport = null;
+            UDDIClerk clerk = null;
+            try
+            {
+                clerkManager = new UDDIClient("uddi.xml");
+                UDDIClientContainer.addClient(clerkManager);
+                transport = clerkManager.getTransport("default");
+                org.uddi.apiv3.UDDI_Security_SoapBinding security = transport.getUDDISecurityService();
+                org.uddi.apiv3.UDDI_Inquiry_SoapBinding inquiry = transport.getUDDIInquiryService();
+                org.uddi.apiv3.UDDI_Publication_SoapBinding publish = transport.getUDDIPublishService();
+                org.uddi.apiv3.UDDI_CustodyTransfer_SoapBinding custody = transport.getUDDICustodyTransferService();
+                org.uddi.apiv3.UDDI_Subscription_SoapBinding sub = transport.getUDDISubscriptionService();
+                clerk = clerkManager.getClerk("default");
+
+                save_subscription ss = new save_subscription();
+                ss.subscription = new subscription[] { new subscription() };
+                ss.subscription[0].subscriptionFilter = r;
+                sub.save_subscription(ss);
+            }
+            catch (Exception ex)
+            {
+                String s = "";
+                while (ex != null)
+                {
+                    s = s + ex.Message;
+                    ex = ex.InnerException;
+                }
+                if (ContainsSerializationError(s))
+                    Assert.Fail(s);
+
+            }
+            finally
+            {
+                if (transport != null && transport is IDisposable)
+                {
+                    ((IDisposable)transport).Dispose();
+                }
+                if (clerk != null)
+                    clerk.Dispose();
+            }
+        }
+
+        private bool ContainsSerializationError(string s)
+        {
+
+            if (s.Contains("There was an error reflecting type"))
+                return true;
+            return false;
+        }
+        /*
+        [Test]
+        public void xr_categoryBag()
+        {
+
+            categoryBag r = new categoryBag();
+            XmlSerializer xr = new XmlSerializer(typeof(categoryBag));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_find_relatedBusinesses()
+        {
+
+            find_relatedBusinesses r = new find_relatedBusinesses();
+            XmlSerializer xr = new XmlSerializer(typeof(find_relatedBusinesses));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_keysOwned()
+        {
+
+            keysOwned r = new keysOwned();
+            XmlSerializer xr = new XmlSerializer(typeof(keysOwned));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_bindingTemplate()
+        {
+
+            bindingTemplate r = new bindingTemplate();
+            XmlSerializer xr = new XmlSerializer(typeof(bindingTemplate));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_instanceDetails()
+        {
+
+            instanceDetails r = new instanceDetails();
+            XmlSerializer xr = new XmlSerializer(typeof(instanceDetails));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_TransformType()
+        {
+
+            TransformType r = new TransformType();
+            XmlSerializer xr = new XmlSerializer(typeof(TransformType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+
+        [Test]
+        public void xr_KeyInfoType()
+        {
+
+            KeyInfoType r = new KeyInfoType();
+            XmlSerializer xr = new XmlSerializer(typeof(KeyInfoType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+
+        [Test]
+        public void xr_KeyValueType()
+        {
+
+            KeyValueType r = new KeyValueType();
+            XmlSerializer xr = new XmlSerializer(typeof(KeyValueType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+
+
+        [Test]
+        public void xr_PGPDataType()
+        {
+
+            PGPDataType r = new PGPDataType();
+            XmlSerializer xr = new XmlSerializer(typeof(PGPDataType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+
+        [Test]
+        public void xr_X509DataType()
+        {
+
+            X509DataType r = new X509DataType();
+            XmlSerializer xr = new XmlSerializer(typeof(X509DataType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_keyBag1()
+        {
+
+            keyBag1 r = new keyBag1();
+            XmlSerializer xr = new XmlSerializer(typeof(keyBag1));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+
+        [Test]
+        public void xr_SignaturePropertyType()
+        {
+
+            SignaturePropertyType r = new SignaturePropertyType();
+            XmlSerializer xr = new XmlSerializer(typeof(SignaturePropertyType));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_validate_values()
+        {
+
+            validate_values r = new validate_values();
+            XmlSerializer xr = new XmlSerializer(typeof(validate_values));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+        [Test]
+        public void xr_discard_transferToken()
+        {
+
+            discard_transferToken r = new discard_transferToken();
+            XmlSerializer xr = new XmlSerializer(typeof(discard_transferToken));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_get_changeRecords()
+        {
+
+            get_changeRecords r = new get_changeRecords();
+            XmlSerializer xr = new XmlSerializer(typeof(get_changeRecords));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_changeRecordNewData()
+        {
+
+            changeRecordNewData r = new changeRecordNewData();
+            XmlSerializer xr = new XmlSerializer(typeof(changeRecordNewData));
+            StringWriter sw = new StringWriter();
+            xr.Serialize(sw, r);
+            System.Console.Out.WriteLine(sw.ToString());
+        }
+
+        [Test]
+        public void xr_overviewDoc()
+        {
+
+            overviewDoc r = new overviewDoc();
             description d = new description("v","en");
             overviewURL ol = new overviewURL("http://url","website");
             
@@ -247,7 +549,15 @@ namespace juddi_client.net_mono_test
             StringWriter sw = new StringWriter();
             xr.Serialize(sw, r);
             System.Console.Out.WriteLine(sw.ToString());
-        }
+        }*/
 
     }
+        #endregion
+
+
+
+
+
+
 }
+

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj?rev=1528703&r1=1528702&r2=1528703&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj Thu Oct
 3 02:21:49 2013
@@ -37,6 +37,7 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data" />
+    <Reference Include="System.Web.Services" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
@@ -68,6 +69,12 @@
       <Name>juddi-client.net</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="uddi.xml">
+      <SubType>Designer</SubType>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and
uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Modified: juddi/trunk/juddi-client.net/juddi-client.net/bindings/datamodel-mono.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/bindings/datamodel-mono.cs?rev=1528703&r1=1528702&r2=1528703&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/bindings/datamodel-mono.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/bindings/datamodel-mono.cs Thu Oct  3 02:21:49
2013
@@ -2705,7 +2705,7 @@ namespace org.uddi.apiv3
 
         /// <remarks/>
         [System.Xml.Serialization.XmlTextAttribute()]
-        [System.Xml.Serialization.XmlAnyElementAttribute(Name="Any")]
+        [System.Xml.Serialization.XmlAnyElementAttribute(Name = "Any")]
         public System.Xml.XmlNode[] Any
         {
             get
@@ -5470,10 +5470,10 @@ namespace org.uddi.apiv3
         }
 
         /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("bindingKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName="bindingKey")]
-        [System.Xml.Serialization.XmlElementAttribute("businessKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName="businessKey")]
-        [System.Xml.Serialization.XmlElementAttribute("serviceKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName="serviceKey")]
-        [System.Xml.Serialization.XmlElementAttribute("tModelKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName="tModelKey")]
+        [System.Xml.Serialization.XmlElementAttribute("bindingKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName = "bindingKey")]
+        [System.Xml.Serialization.XmlElementAttribute("businessKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName = "businessKey")]
+        [System.Xml.Serialization.XmlElementAttribute("serviceKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName = "serviceKey")]
+        [System.Xml.Serialization.XmlElementAttribute("tModelKey", typeof(string), Namespace
= "urn:uddi-org:api_v3", DataType = "anyURI", ElementName = "tModelKey")]
         [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
         public string[] Items
         {
@@ -5522,11 +5522,11 @@ namespace org.uddi.apiv3
 
         /// <remarks/>
         //[System.Xml.Serialization.XmlEnumAttribute("urn:uddi-org:api_v3:serviceKey")]
-[System.Xml.Serialization.XmlEnumAttribute("serviceKey")]
+        [System.Xml.Serialization.XmlEnumAttribute("serviceKey")]
         serviceKey,
 
         /// <remarks/>
-//        [System.Xml.Serialization.XmlEnumAttribute("urn:uddi-org:api_v3:tModelKey")]
+        //        [System.Xml.Serialization.XmlEnumAttribute("urn:uddi-org:api_v3:tModelKey")]
         [System.Xml.Serialization.XmlEnumAttribute("tModelKey")]
         tModelKey,
     }

Modified: juddi/trunk/juddi-examples/uddi-samples/src/org/apache/juddi/samples/FindBusinessBugHunt.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-samples/src/org/apache/juddi/samples/FindBusinessBugHunt.java?rev=1528703&r1=1528702&r2=1528703&view=diff
==============================================================================
--- juddi/trunk/juddi-examples/uddi-samples/src/org/apache/juddi/samples/FindBusinessBugHunt.java
(original)
+++ juddi/trunk/juddi-examples/uddi-samples/src/org/apache/juddi/samples/FindBusinessBugHunt.java
Thu Oct  3 02:21:49 2013
@@ -170,7 +170,7 @@ public class FindBusinessBugHunt {
         org.uddi.api_v3.FindQualifiers fq = new org.uddi.api_v3.FindQualifiers();
         fq.getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
         fb.setFindQualifiers(fq);
-        fb.getName().add((new Name(UDDIConstants.WILDCARD, "")));
+        fb.getName().add((new Name(UDDIConstants.WILDCARD, null)));
         return inquiry.findBusiness(fb);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message