You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/09/29 04:24:18 UTC

svn commit: r1527264 - in /juddi/trunk/juddi-client.net: juddi-client.net-sample/ juddi-client.net/ juddi-client.net/org.apache.juddi.v3.client.config/ juddi-client.net/org.apache.juddi.v3.client.mapping/

Author: alexoree
Date: Sun Sep 29 02:24:18 2013
New Revision: 1527264

URL: http://svn.apache.org/r1527264
Log:
JUDDI-567 adding WADL2UDDI

Added:
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WADL2UDDI.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/wadl.cs
Modified:
    juddi/trunk/juddi-client.net/juddi-client.net-sample/Program.cs
    juddi/trunk/juddi-client.net/juddi-client.net-sample/uddi.xml
    juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj
    juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/Properties.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/TokenResolver.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIKeyConvention.cs

Modified: juddi/trunk/juddi-client.net/juddi-client.net-sample/Program.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net-sample/Program.cs?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net-sample/Program.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net-sample/Program.cs Sun Sep 29 02:24:18 2013
@@ -1,4 +1,5 @@
-/*
+using net.java.dev.wadl;
+/*
  * Copyright 2001-2008 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,6 +17,7 @@
  */
 using org.apache.juddi.v3.client;
 using org.apache.juddi.v3.client.config;
+using org.apache.juddi.v3.client.mapping;
 using org.apache.juddi.v3.client.transport;
 using org.uddi.apiv3;
 using System;
@@ -29,7 +31,7 @@ namespace juddi_client.net_sample
     {
         static void Main(string[] args)
         {
-            UDDIClient clerkManager=null;
+            UDDIClient clerkManager = null;
             Transport transport = null;
             UDDIClerk clerk = null;
             try
@@ -41,6 +43,7 @@ namespace juddi_client.net_sample
 
                 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();
 
                 clerk = clerkManager.getClerk("default");
 
@@ -55,7 +58,76 @@ namespace juddi_client.net_sample
                 {
                     Console.WriteLine(bl.businessInfos[i].name[0].Value);
                 }
-               
+
+
+                //Wadl Import example
+
+                application app = WADL2UDDI.ParseWadl("sample.wadl");
+                List<Uri> urls = WADL2UDDI.GetBaseAddresses(app);
+                Uri url = urls[0];
+                String domain = url.Host;
+
+                tModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
+                //save the keygen
+                save_tModel stm = new save_tModel();
+                stm.authInfo = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
+                stm.tModel = new tModel[] { keygen };
+
+                publish.save_tModel(stm);
+                Properties properties = new Properties();
+
+                properties.put("keyDomain", domain);
+                properties.put("businessName", domain);
+                properties.put("serverName", url.Host);
+                properties.put("serverPort", url.Port.ToString());
+                //wsdlURL = wsdlDefinition.getDocumentBaseURI();
+                WADL2UDDI wadl2UDDI = new WADL2UDDI(clerk, properties);
+
+                businessService businessServices = wadl2UDDI.createBusinessService(new QName("MyWasdl.namespace", "Servicename"), app);
+
+
+                HashSet<tModel> portTypeTModels = wadl2UDDI.createWADLPortTypeTModels(url.ToString(), app);
+
+                //When parsing a WSDL, there's really two things going on
+                //1) convert a bunch of stuff (the portTypes) to tModels
+                //2) convert the service definition to a BusinessService
+
+                //Since the service depends on the tModel, we have to save the tModels first
+                save_tModel tms = new save_tModel();
+                tms.authInfo = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
+                HashSet<tModel>.Enumerator it = portTypeTModels.GetEnumerator();
+                List<tModel> ts = new List<tModel>();
+                while (it.MoveNext())
+                {
+                    ts.Add(it.Current);
+                }
+                tModel[] tmodels = ts.ToArray();
+
+                tms.tModel = tmodels;
+                if (tms.tModel.Length > 0)
+                    //important, you'll need to save your new tModels, or else saving the business/service may fail
+                    publish.save_tModel(tms);
+
+
+
+                //finaly, we're ready to save all of the services defined in the WSDL
+                //again, we're creating a new business, if you have one already, look it up using the Inquiry getBusinessDetails
+
+
+
+
+                save_business sb = new save_business();
+                //  sb.setAuthInfo(rootAuthToken.getAuthInfo());
+                businessEntity be = new businessEntity();
+                be.businessKey = (businessServices.businessKey);
+                //TODO, use some relevant here
+                be.name = new name[] { new name(domain, "en") };
+
+
+                be.businessServices = new businessService[] { businessServices };
+                sb.authInfo = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
+                sb.businessEntity = new businessEntity[] { be };
+                publish.save_business(sb);
             }
             catch (Exception ex)
             {
@@ -74,6 +146,9 @@ namespace juddi_client.net_sample
                 if (clerk != null)
                     clerk.Dispose();
             }
+
+
+
             Console.WriteLine("Press any key to exit");
             Console.Read();
         }

Modified: juddi/trunk/juddi-client.net/juddi-client.net-sample/uddi.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net-sample/uddi.xml?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net-sample/uddi.xml (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net-sample/uddi.xml Sun Sep 29 02:24:18 2013
@@ -47,7 +47,7 @@
     </nodes>
 
     <clerks registerOnStartup="false">
-      <clerk name="default" node="default" publisher="root" password="root"  isPasswordEncrypted="false" cryptoProvider=""/>
+      <clerk name="default" node="default" publisher="uddi" password="uddi"  isPasswordEncrypted="false" cryptoProvider=""/>
       <clerk name="medroot" node="med"     publisher="root" password="root"  isPasswordEncrypted="false" cryptoProvider=""/>
       <xregister>
         <servicebinding bindingKey="uddi:juddi.apache.org:servicebindings-subscriptionlistener-ws" fromClerk="default" toClerk="medroot"/>

Modified: juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj Sun Sep 29 02:24:18 2013
@@ -68,6 +68,8 @@
     <Compile Include="org.apache.juddi.v3.client.crypto\CryptorFactory.cs" />
     <Compile Include="org.apache.juddi.v3.client.crypto\DigSigUtil.cs" />
     <Compile Include="org.apache.juddi.v3.client.crypto\TripleDESCryptor.cs" />
+    <Compile Include="org.apache.juddi.v3.client.mapping\wadl.cs" />
+    <Compile Include="org.apache.juddi.v3.client.mapping\WADL2UDDI.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\WSDL2UDDI.cs" />
     <Compile Include="org.apache.juddi.v3.client.transport\AspNetTransport.cs" />
     <Compile Include="org.apache.juddi.v3.client\ConsoleLogger.cs" />

Modified: juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj Sun Sep 29 02:24:18 2013
@@ -33,7 +33,7 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
-	    <Reference Include="System.Core" />
+    <Reference Include="System.Core" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.Security" />
@@ -68,6 +68,8 @@
     <Compile Include="org.apache.juddi.v3.client.crypto\CryptorFactory.cs" />
     <Compile Include="org.apache.juddi.v3.client.crypto\DigSigUtil.cs" />
     <Compile Include="org.apache.juddi.v3.client.crypto\TripleDESCryptor.cs" />
+    <Compile Include="org.apache.juddi.v3.client.mapping\wadl.cs" />
+    <Compile Include="org.apache.juddi.v3.client.mapping\WADL2UDDI.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\WSDL2UDDI.cs" />
     <Compile Include="org.apache.juddi.v3.client.transport\AspNetTransport.cs" />
     <Compile Include="org.apache.juddi.v3.client\ConsoleLogger.cs" />

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/Properties.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/Properties.cs?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/Properties.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/Properties.cs Sun Sep 29 02:24:18 2013
@@ -133,7 +133,7 @@ namespace org.apache.juddi.v3.client.con
 
         public string getProperty(string name, string defaultvalue)
         {
-            if (!map.ContainsKey(name)) return null;
+            if (!map.ContainsKey(name)) return defaultvalue;
             String s = map[name] as String;
             if (s == null)
                 return defaultvalue;

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/TokenResolver.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/TokenResolver.cs?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/TokenResolver.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/TokenResolver.cs Sun Sep 29 02:24:18 2013
@@ -38,26 +38,28 @@ namespace org.apache.juddi.v3.client.con
             //Pattern pattern = Pattern.compile("(?m)\\$\\{.*?\\}");
             //Matcher matcher = pattern.matcher(s);
             Match matcher = System.Text.RegularExpressions.Regex.Match(s, "(?m)\\$\\{.*?\\}");
-            Match temp = matcher.NextMatch();
-            while (temp != null)
+            //Match temp = matcher.NextMatch();
+            //while (temp != null && matcher.Success)
+            foreach (Match m in Regex.Matches(s, "(?m)\\$\\{.*?\\}"))
             {
-                String token = matcher.Value;
+                String token = m.Value;
                 if (token.Length < 3)
                 {
                     return s;
                 }
-                token = token.Substring(2, token.Length - 1);
+                token = token.Substring(2,token.Length - 3);
                 String replacement = properties.getString(token);
                 if (replacement != null)
                 {
                     log.debug("Found token " + token + " and replacement value " + replacement);
-                    s = s.Replace("\\$\\{" + token + "\\}", replacement);
+                    s = s.Replace("${" + token + "}", replacement);
                 }
                 else
                 {
                     log.error("Found token " + token + " but could not obtain its value. Data: " + s);
                 }
-                temp = matcher.NextMatch();
+              //  temp = matcher.NextMatch();
+                
 
             }
             log.debug("Data after token replacement: " + s);

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIKeyConvention.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIKeyConvention.cs?rev=1527264&r1=1527263&r2=1527264&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIKeyConvention.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIKeyConvention.cs Sun Sep 29 02:24:18 2013
@@ -1,4 +1,5 @@
-/*
+using org.apache.juddi.v3.client.mapping;
+/*
  * Copyright 2001-2008 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -71,18 +72,6 @@ namespace org.apache.juddi.v3.client.con
             return serviceKey;
         }
 
-        /*public static String getBindingKey(Properties properties, QName serviceName, String portName, URL bindingUrl) {
-		
-            String bindingKey = null;
-            try {
-                URI bindingURI = bindingUrl.toURI();
-                bindingKey =  getBindingKey(properties, serviceName, portName, bindingURI);
-            } catch (URISyntaxException e) {
-			
-            }
-            return bindingKey;
-		
-        }*/
 
 
 
@@ -94,26 +83,34 @@ namespace org.apache.juddi.v3.client.con
          * @param serviceName
          * @param portName
          * @return the bindingKey
-	
-        public static String getBindingKey(Properties properties, QName serviceName, String portName, URI bindingUrl) {
+    */
+
+        public static String getBindingKey(Properties properties, QName serviceName, String portName, Uri bindingUrl)
+        {
             Properties tempProperties = new Properties();
             tempProperties.putAll(properties);
             tempProperties.put("serviceName", serviceName.getLocalPart());
             tempProperties.put("portName", portName);
-            int port = bindingUrl.getPort();
-            if (port==-1) {
-                if ("http".equals(bindingUrl.getScheme())) {
+            int port = bindingUrl.Port;
+            if (port < 0)
+            {
+                if ("http".Equals(bindingUrl.Scheme, StringComparison.CurrentCultureIgnoreCase))
+                {
                     port = 80;
-                } else if ("https".equals(bindingUrl.getScheme())) {
+                }
+                else if ("https".Equals(bindingUrl.Scheme))
+                {
                     port = 443;
                 }
             }
-            tempProperties.put("serverPort", String.valueOf(port));
+            if (!tempProperties.containsKey("serverPort"))
+                tempProperties.put("serverPort", port.ToString());
+
             //Constructing the binding Key
             String keyFormat = properties.getProperty(Property.BINDING_KEY_FORMAT, DEFAULT_BINDING_KEY_FORMAT);
-            String bindingKey = TokenResolver.replaceTokens(keyFormat, tempProperties).toLowerCase();
+            String bindingKey = TokenResolver.replaceTokens(keyFormat, tempProperties).ToLower();
             return bindingKey;
-        } */
+        }
     }
 
 }

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WADL2UDDI.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WADL2UDDI.cs?rev=1527264&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WADL2UDDI.cs (added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WADL2UDDI.cs Sun Sep 29 02:24:18 2013
@@ -0,0 +1,497 @@
+using net.java.dev.wadl;
+using org.apache.juddi.v3.client.config;
+using org.apache.juddi.v3.client.log;
+using org.uddi.apiv3;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace org.apache.juddi.v3.client.mapping
+{
+    public class WADL2UDDI
+    {
+        private static Log log = LogFactory.getLog(typeof(WADL2UDDI));
+        private String keyDomainURI;
+        private String businessKey;
+        private String lang;
+        private UDDIClerk clerk = null;
+        private Properties properties = null;
+
+
+        public WADL2UDDI(UDDIClerk clerk, Properties properties)
+        {
+            this.clerk = clerk;
+            this.properties = properties;
+
+            if (clerk != null)
+            {
+                if (!properties.containsKey("keyDomain"))
+                {
+                    throw new ConfigurationException("Property keyDomain is a required property when using WADL2UDDI.");
+                }
+                if (!properties.containsKey("businessKey") && !properties.containsKey("businessName"))
+                {
+                    throw new ConfigurationException("Either property businessKey, or businessName, is a required property when using WADL2UDDI.");
+                }
+                if (!properties.containsKey("nodeName"))
+                {
+                    if (properties.containsKey("serverName") && properties.containsKey("serverPort"))
+                    {
+                        String nodeName = properties.getProperty("serverName") + "_" + properties.getProperty("serverPort");
+                        properties.setProperty("nodeName", nodeName);
+                    }
+                    else
+                    {
+                        throw new ConfigurationException("Property nodeName is not defined and is a required property when using WADL2UDDI.");
+                    }
+                }
+            }
+
+            //Obtaining values from the properties
+            this.keyDomainURI = "uddi:" + properties.getProperty("keyDomain") + ":";
+            if (properties.containsKey(Property.BUSINESS_KEY))
+            {
+                this.businessKey = properties.getProperty(Property.BUSINESS_KEY);
+            }
+            else
+            {
+                //using the BusinessKey Template, and the businessName to construct the key 
+                this.businessKey = UDDIKeyConvention.getBusinessKey(properties);
+            }
+            this.lang = properties.getProperty(Property.LANG, Property.DEFAULT_LANG);
+        }
+
+        public HashSet<tModel> createWADLTModels(String wadlURL, application app)
+        {
+            HashSet<tModel> tModels = new HashSet<tModel>();
+
+            return tModels;
+        }
+
+        public HashSet<tModel> createWADLPortTypeTModels(String wadlURL, application app)
+        {
+            HashSet<tModel> tModels = new HashSet<tModel>();
+            // Create a tModel for each portType
+
+            return tModels;
+        }
+
+        public String getKeyDomainURI()
+        {
+            return keyDomainURI;
+        }
+
+        public void setKeyDomain(String keyDomainURI)
+        {
+            this.keyDomainURI = keyDomainURI;
+        }
+
+        public String getLang()
+        {
+            return lang;
+        }
+
+        public void setLang(String lang)
+        {
+            this.lang = lang;
+        }
+
+        private static String ContentToString(List<Object> content)
+        {
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < content.Count; i++)
+            {
+                sb.Append(content[i].ToString()).Append(" ");
+            }
+            return sb.ToString().Trim();
+        }
+
+        /**
+         * Creates a UDDI Business Service.
+         *
+         * @param serviceQName This must be specified to identify the namespace of
+         * the service, which is used to set the service uddi key
+         * @param waldDefinition
+         * @return
+         */
+        public businessService createBusinessService(QName serviceQName, application wadlDefinition)
+        {
+
+            log.debug("Constructing Service UDDI Information for " + serviceQName);
+            businessService service = new businessService();
+            // BusinessKey
+            service.businessKey = (businessKey);
+            // ServiceKey
+            service.serviceKey = (UDDIKeyConvention.getServiceKey(properties, serviceQName.getLocalPart()));
+            // Description
+            String serviceDescription = properties.getProperty(Property.SERVICE_DESCRIPTION, Property.DEFAULT_SERVICE_DESCRIPTION);
+            // Override with the service description from the WSDL if present
+            bool lengthwarn = false;
+            if (wadlDefinition.doc != null)
+            {
+
+                for (int i = 0; i < wadlDefinition.doc.Length; i++)
+                {
+                    description description = new description();
+                    if (wadlDefinition.doc[i].lang != null)
+                    {
+                        description.lang = (wadlDefinition.doc[i].lang);
+                    }
+                    else
+                    {
+                        description.lang = (lang);
+                    }
+                    if (description.lang != null && description.lang.Length > UDDIConstants.MAX_xml_lang_length)
+                    {
+                        lengthwarn = true;
+                        description.lang = (description.lang.Substring(0, UDDIConstants.MAX_xml_lang_length - 1));
+                    }
+
+                    StringBuilder sb = new StringBuilder();
+                    sb.Append(wadlDefinition.doc[i].title).Append(" ");
+                    sb.Append(ContentToString(wadlDefinition.doc[i].Any));
+
+                    description.Value = (wadlDefinition.doc[i].title);
+                    if (description.Value != null && description.Value.Length > UDDIConstants.MAX_description_length)
+                    {
+                        lengthwarn = true;
+                        description.Value = (description.Value.Substring(0, UDDIConstants.MAX_description_length - 1));
+                    }
+
+                }
+            }
+            else
+            {
+
+                description description = new description();
+                description.lang = (lang);
+                if (description.lang != null && description.lang.Length > UDDIConstants.MAX_xml_lang_length)
+                {
+                    lengthwarn = true;
+                    description.lang = (description.lang.Substring(0, UDDIConstants.MAX_xml_lang_length - 1));
+                }
+                description.Value = (serviceDescription);
+                if (service.description == null)
+                    service.description = new uddi.apiv3.description[] { description };
+
+                if (description.Value != null && description.Value.Length > UDDIConstants.MAX_description_length)
+                {
+                    lengthwarn = true;
+                    description.Value = (description.Value.Substring(0, UDDIConstants.MAX_description_length - 1));
+                }
+            }
+
+
+
+            // Service name
+            name sName = new name();
+            sName.lang = (lang);
+            if (wadlDefinition.doc != null && wadlDefinition.doc.Length > 0)
+            {
+                sName.Value = (wadlDefinition.doc[0].title);
+            }
+            if (sName.Value == null)
+            {
+                sName.Value = (serviceQName.getLocalPart());
+            }
+            service.name = new name[] { sName };
+
+            categoryBag cb = new categoryBag();
+            List<keyedReference> krs = new List<keyedReference>();
+            String ns = serviceQName.getNamespaceURI();
+            if (ns != null && ns != "")
+            {
+                keyedReference namespaceReference = new keyedReference(
+                        "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", ns);
+                krs.Add(namespaceReference);
+            }
+
+            keyedReference serviceReference = new keyedReference(
+                    "uddi:uddi.org:wadl:types", "uddi-org:wadl:types", "service");
+            krs.Add(serviceReference);
+
+            keyedReference localNameReference = new keyedReference(
+                    "uddi:uddi.org:xml:localname", "uddi-org:xml:localName", serviceQName.getLocalPart());
+            krs.Add(localNameReference);
+            cb.Items = krs.ToArray();
+            service.categoryBag = (cb);
+            if (wadlDefinition.resources != null)
+                for (int i = 0; i < wadlDefinition.resources.Length; i++)
+                {
+                    bindingTemplate bindingTemplate = createWADLBinding(serviceQName, getDocTitle(wadlDefinition.resources[i].doc),
+                        new Uri(wadlDefinition.resources[i].@base), wadlDefinition.resources[i]);
+                    service.bindingTemplates = new bindingTemplate[] { bindingTemplate };
+                }
+
+
+            if (lengthwarn)
+            {
+                log.warn("Some object descriptions are longer than the maximum allowed by UDDI and have been truncated.");
+            }
+            return service;
+        }
+
+        private string getDocTitle(doc[] doc)
+        {
+            if (doc == null || doc.Length == 0 || doc[0].title == null)
+            {
+                return "A resource base URL without a description";
+            }
+            return (doc[0].title);
+        }
+
+        private string ContentToString(System.Xml.XmlNode[] xmlNode)
+        {
+            if (xmlNode == null) return "";
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < xmlNode.Length; i++)
+            {
+                sb.Append(xmlNode[i].Value);
+            }
+            return sb.ToString();
+        }
+
+        public static List<Uri> GetBaseAddresses(application app)
+        {
+            List<Uri> urls = new List<Uri>();
+            if (app == null) return urls;
+            if (app.resources != null)
+                for (int i = 0; i < app.resources.Length; i++)
+                {
+                    try
+                    {
+                        urls.Add(new Uri(app.resources[i].@base));
+                    }
+                    catch (Exception ex)
+                    {
+                        log.warn("The base URL " + app.resources[i].@base + " is invalid or could not be parsed", ex);
+                    }
+                }
+            return urls;
+        }
+
+
+        protected bindingTemplate createWADLBinding(QName serviceQName, String portName, Uri serviceUrl, resources res)
+        {
+
+            bindingTemplate bindingTemplate = new bindingTemplate();
+            // Set BusinessService Key
+            bindingTemplate.serviceKey = (UDDIKeyConvention.getServiceKey(properties, serviceQName.getLocalPart()));
+
+            if (serviceUrl != null)
+            {
+                // Set AccessPoint
+                accessPoint accessPoint = new accessPoint();
+                accessPoint.useType = (AccessPointType.endPoint.ToString());
+                accessPoint.Value = ((serviceUrl.ToString()));
+                bindingTemplate.Item = (accessPoint);
+                // Set Binding Key
+                String bindingKey = UDDIKeyConvention.getBindingKey(properties, serviceQName, portName, serviceUrl);
+                bindingTemplate.bindingKey = (bindingKey);
+
+                description description = new description();
+                description.lang = (lang);
+                description.Value = (getDescription(res.doc));
+                bindingTemplate.description = new description[] { description };
+
+                // reference wsdl:binding tModel
+                tModelInstanceInfo tModelInstanceInfoBinding = new tModelInstanceInfo();
+                tModelInstanceInfoBinding.tModelKey = (keyDomainURI + "binding");
+                instanceDetails id = new instanceDetails();
+                id.Items = new object[] { portName };
+                tModelInstanceInfoBinding.instanceDetails = (id);
+                description descriptionB = new description();
+                descriptionB.lang = (lang);
+                descriptionB.Value = ("The binding that this endpoint implements. " + bindingTemplate.description[0].Value
+                        + " The instanceParms specifies the port local name.");
+                tModelInstanceInfoBinding.description = new description[] { descriptionB };
+                tModelInstanceInfo tModelInstanceDetails = new tModelInstanceInfo();
+                //  tModelInstanceDetails.instanceDetails = new instanceDetails[]{tModelInstanceInfoBinding};
+
+
+                tModelInstanceInfo tModelInstanceInfoPortType = new tModelInstanceInfo();
+                tModelInstanceInfoPortType.tModelKey = (keyDomainURI + "rest");
+
+                description descriptionPT = new description();
+                descriptionPT.lang = (lang);
+                descriptionPT.Value = ("The wadl:Resource:base implements.");
+                tModelInstanceInfoPortType.description = new description[] { descriptionPT };
+                //  tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoPortType);
+
+                //bindingTemplate.tModelInstanceDetails = new tModelInstanceInfo
+
+            }
+            return bindingTemplate;
+        }
+
+        private string getDescription(doc[] doc)
+        {
+            if (doc == null) return "";
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < doc.Length; i++)
+            {
+                sb.Append(doc[i].title).Append(" ");
+                sb.Append(ContentToString(doc[i].Any));
+            }
+            return sb.ToString().Trim();
+        }
+
+
+        public const String PACKAGE = "org.apache.juddi.v3.client.mappings.wadl";
+
+
+        public bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
+        {
+            return true;
+        }
+
+        /**
+         * Parses a web accessible WADL file
+         * @param weburl
+         * @param username
+         * @param password
+         * @param ignoreSSLErrors if true, SSL errors are ignored
+         * @return a non-null "application" object, represeting a WADL's application root XML 
+         * Sample code:<br>
+         * <pre>
+         * application app = WADL2UDDI.ParseWadl(new URL("http://server/wsdl.wsdl"), "username", "password", 
+         *      clerkManager.getClientConfig().isX_To_Wsdl_Ignore_SSL_Errors() );
+         * </pre>
+         */
+        public application ParseWadl(Uri weburl, String username, String password, bool ignoreSSLErrors)
+        {
+            WebClient httpclient = null;
+            application unmarshal = null;
+            try
+            {
+                String url = weburl.ToString();
+                if (!url.ToLower().StartsWith("http"))
+                {
+                    return ParseWadl(weburl);
+                }
+
+                bool usessl = false;
+                int port = 80;
+                if (url.ToString().ToLower().StartsWith("https://"))
+                {
+                    port = 443;
+                    usessl = true;
+                }
+
+                if (weburl.Port > 0)
+                {
+                    port = weburl.Port;
+                }
+
+                if (ignoreSSLErrors && usessl)
+                {
+
+                    ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
+                    httpclient = new WebClient();
+                }
+                else
+                {
+                    httpclient = new WebClient();
+                }
+
+                if (username != null && username.Length > 0
+                        && password != null && password.Length > 0)
+                {
+                    httpclient.Credentials = new NetworkCredential(username, password);
+                }
+
+                try
+                {
+
+                    String wadl = httpclient.DownloadString(url);
+                    XmlSerializer xs = new XmlSerializer(typeof(application));
+                    StringReader sr = new StringReader(wadl);
+                    unmarshal = (application)xs.Deserialize(sr);
+
+                }
+                finally
+                {
+                    httpclient.Dispose();
+
+                }
+
+            }
+            catch (Exception e)
+            {
+                log.error("error downloading " + weburl, e);
+            }
+            finally
+            {
+                if (httpclient != null)
+                {
+                    httpclient.Dispose();
+                }
+            }
+            return unmarshal;
+        }
+
+        public static application ParseWadl(String file)
+        {
+            try
+            {
+                XmlSerializer xs = new XmlSerializer(typeof(application));
+                String s = File.ReadAllText(file);
+                StringReader sr = new StringReader(s);
+                return (application)xs.Deserialize(sr);
+            }
+            catch (Exception ex)
+            {
+                log.error("error parsing file", ex);
+            }
+            return null;
+        }
+
+        public static application ParseWadl(Uri file)
+        {
+            return ParseWadl(file.ToString());
+        }
+
+
+       
+
+        private string getDescription(List<doc> doc)
+        {
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < doc.Count; i++)
+            {
+                sb.Append(doc[i].title).Append(" ");
+                sb.Append(ContentToString(doc[i].Any));
+            }
+            return sb.ToString().Trim();
+        }
+
+
+    }
+
+
+    public class QName
+    {
+        string local;
+        string ns;
+        public QName() { }
+        public QName(string ns, string local)
+        {
+            this.local = local;
+            this.ns = ns;
+        }
+        public string getLocalPart()
+        {
+            return local;
+        }
+
+        public string getNamespaceURI()
+        {
+            return ns;
+        }
+    }
+}
\ No newline at end of file

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/wadl.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/wadl.cs?rev=1527264&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/wadl.cs (added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/wadl.cs Sun Sep 29 02:24:18 2013
@@ -0,0 +1,1653 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18052
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System.Xml.Serialization;
+
+// 
+// This source code was auto-generated by xsd, Version=4.0.30319.17929.
+// 
+
+namespace net.java.dev.wadl
+{
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class application
+    {
+
+        private doc[] docField;
+
+        private grammars grammarsField;
+
+        private resources[] resourcesField;
+
+        private object[] itemsField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        public grammars grammars
+        {
+            get
+            {
+                return this.grammarsField;
+            }
+            set
+            {
+                this.grammarsField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("resources")]
+        public resources[] resources
+        {
+            get
+            {
+                return this.resourcesField;
+            }
+            set
+            {
+                this.resourcesField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("method", typeof(method))]
+        [System.Xml.Serialization.XmlElementAttribute("param", typeof(param))]
+        [System.Xml.Serialization.XmlElementAttribute("representation", typeof(representation))]
+        [System.Xml.Serialization.XmlElementAttribute("resource_type", typeof(resource_type))]
+        public object[] Items
+        {
+            get
+            {
+                return this.itemsField;
+            }
+            set
+            {
+                this.itemsField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class doc
+    {
+
+        private System.Xml.XmlNode[] anyField;
+
+        private string titleField;
+
+        private string langField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlTextAttribute()]
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlNode[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string title
+        {
+            get
+            {
+                return this.titleField;
+            }
+            set
+            {
+                this.titleField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://www.w3.org/XML/1998/namespace")]
+        public string lang
+        {
+            get
+            {
+                return this.langField;
+            }
+            set
+            {
+                this.langField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class grammars
+    {
+
+        private doc[] docField;
+
+        private include[] includeField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("include")]
+        public include[] include
+        {
+            get
+            {
+                return this.includeField;
+            }
+            set
+            {
+                this.includeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class include
+    {
+
+        private doc[] docField;
+
+        private string hrefField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string href
+        {
+            get
+            {
+                return this.hrefField;
+            }
+            set
+            {
+                this.hrefField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class resources
+    {
+
+        private doc[] docField;
+
+        private resource[] resourceField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string baseField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("resource")]
+        public resource[] resource
+        {
+            get
+            {
+                return this.resourceField;
+            }
+            set
+            {
+                this.resourceField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string @base
+        {
+            get
+            {
+                return this.baseField;
+            }
+            set
+            {
+                this.baseField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class resource
+    {
+
+        private doc[] docField;
+
+        private param[] paramField;
+
+        private object[] itemsField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string idField;
+
+        private string[] typeField;
+
+        private string queryTypeField;
+
+        private string pathField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        public resource()
+        {
+            this.queryTypeField = "application/x-www-form-urlencoded";
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("param")]
+        public param[] param
+        {
+            get
+            {
+                return this.paramField;
+            }
+            set
+            {
+                this.paramField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("method", typeof(method))]
+        [System.Xml.Serialization.XmlElementAttribute("resource", typeof(resource))]
+        public object[] Items
+        {
+            get
+            {
+                return this.itemsField;
+            }
+            set
+            {
+                this.itemsField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")]
+        public string id
+        {
+            get
+            {
+                return this.idField;
+            }
+            set
+            {
+                this.idField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string[] type
+        {
+            get
+            {
+                return this.typeField;
+            }
+            set
+            {
+                this.typeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        [System.ComponentModel.DefaultValueAttribute("application/x-www-form-urlencoded")]
+        public string queryType
+        {
+            get
+            {
+                return this.queryTypeField;
+            }
+            set
+            {
+                this.queryTypeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string path
+        {
+            get
+            {
+                return this.pathField;
+            }
+            set
+            {
+                this.pathField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class param
+    {
+
+        private doc[] docField;
+
+        private option[] optionField;
+
+        private link linkField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string hrefField;
+
+        private string nameField;
+
+        private ParamStyle styleField;
+
+        private bool styleFieldSpecified;
+
+        private string idField;
+
+        private System.Xml.XmlQualifiedName typeField;
+
+        private string defaultField;
+
+        private bool requiredField;
+
+        private bool repeatingField;
+
+        private string fixedField;
+
+        private string pathField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        public param()
+        {
+            this.requiredField = false;
+            this.repeatingField = false;
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("option")]
+        public option[] option
+        {
+            get
+            {
+                return this.optionField;
+            }
+            set
+            {
+                this.optionField = value;
+            }
+        }
+
+        /// <remarks/>
+        public link link
+        {
+            get
+            {
+                return this.linkField;
+            }
+            set
+            {
+                this.linkField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string href
+        {
+            get
+            {
+                return this.hrefField;
+            }
+            set
+            {
+                this.hrefField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "NMTOKEN")]
+        public string name
+        {
+            get
+            {
+                return this.nameField;
+            }
+            set
+            {
+                this.nameField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public ParamStyle style
+        {
+            get
+            {
+                return this.styleField;
+            }
+            set
+            {
+                this.styleField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlIgnoreAttribute()]
+        public bool styleSpecified
+        {
+            get
+            {
+                return this.styleFieldSpecified;
+            }
+            set
+            {
+                this.styleFieldSpecified = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")]
+        public string id
+        {
+            get
+            {
+                return this.idField;
+            }
+            set
+            {
+                this.idField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public System.Xml.XmlQualifiedName type
+        {
+            get
+            {
+                return this.typeField;
+            }
+            set
+            {
+                this.typeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string @default
+        {
+            get
+            {
+                return this.defaultField;
+            }
+            set
+            {
+                this.defaultField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        [System.ComponentModel.DefaultValueAttribute(false)]
+        public bool required
+        {
+            get
+            {
+                return this.requiredField;
+            }
+            set
+            {
+                this.requiredField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        [System.ComponentModel.DefaultValueAttribute(false)]
+        public bool repeating
+        {
+            get
+            {
+                return this.repeatingField;
+            }
+            set
+            {
+                this.repeatingField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string @fixed
+        {
+            get
+            {
+                return this.fixedField;
+            }
+            set
+            {
+                this.fixedField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string path
+        {
+            get
+            {
+                return this.pathField;
+            }
+            set
+            {
+                this.pathField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class option
+    {
+
+        private doc[] docField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string valueField;
+
+        private string mediaTypeField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string value
+        {
+            get
+            {
+                return this.valueField;
+            }
+            set
+            {
+                this.valueField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string mediaType
+        {
+            get
+            {
+                return this.mediaTypeField;
+            }
+            set
+            {
+                this.mediaTypeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class link
+    {
+
+        private doc[] docField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string resource_typeField;
+
+        private string relField;
+
+        private string revField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string resource_type
+        {
+            get
+            {
+                return this.resource_typeField;
+            }
+            set
+            {
+                this.resource_typeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "token")]
+        public string rel
+        {
+            get
+            {
+                return this.relField;
+            }
+            set
+            {
+                this.relField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "token")]
+        public string rev
+        {
+            get
+            {
+                return this.revField;
+            }
+            set
+            {
+                this.revField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://wadl.dev.java.net/2009/02")]
+    public enum ParamStyle
+    {
+
+        /// <remarks/>
+        plain,
+
+        /// <remarks/>
+        query,
+
+        /// <remarks/>
+        matrix,
+
+        /// <remarks/>
+        header,
+
+        /// <remarks/>
+        template,
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class method
+    {
+
+        private doc[] docField;
+
+        private request requestField;
+
+        private response[] responseField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string idField;
+
+        private string nameField;
+
+        private string hrefField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        public request request
+        {
+            get
+            {
+                return this.requestField;
+            }
+            set
+            {
+                this.requestField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("response")]
+        public response[] response
+        {
+            get
+            {
+                return this.responseField;
+            }
+            set
+            {
+                this.responseField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")]
+        public string id
+        {
+            get
+            {
+                return this.idField;
+            }
+            set
+            {
+                this.idField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string name
+        {
+            get
+            {
+                return this.nameField;
+            }
+            set
+            {
+                this.nameField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string href
+        {
+            get
+            {
+                return this.hrefField;
+            }
+            set
+            {
+                this.hrefField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class request
+    {
+
+        private doc[] docField;
+
+        private param[] paramField;
+
+        private representation[] representationField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("param")]
+        public param[] param
+        {
+            get
+            {
+                return this.paramField;
+            }
+            set
+            {
+                this.paramField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("representation")]
+        public representation[] representation
+        {
+            get
+            {
+                return this.representationField;
+            }
+            set
+            {
+                this.representationField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class representation
+    {
+
+        private doc[] docField;
+
+        private param[] paramField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string idField;
+
+        private System.Xml.XmlQualifiedName elementField;
+
+        private string mediaTypeField;
+
+        private string hrefField;
+
+        private string[] profileField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("param")]
+        public param[] param
+        {
+            get
+            {
+                return this.paramField;
+            }
+            set
+            {
+                this.paramField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")]
+        public string id
+        {
+            get
+            {
+                return this.idField;
+            }
+            set
+            {
+                this.idField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public System.Xml.XmlQualifiedName element
+        {
+            get
+            {
+                return this.elementField;
+            }
+            set
+            {
+                this.elementField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string mediaType
+        {
+            get
+            {
+                return this.mediaTypeField;
+            }
+            set
+            {
+                this.mediaTypeField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string href
+        {
+            get
+            {
+                return this.hrefField;
+            }
+            set
+            {
+                this.hrefField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
+        public string[] profile
+        {
+            get
+            {
+                return this.profileField;
+            }
+            set
+            {
+                this.profileField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class response
+    {
+
+        private doc[] docField;
+
+        private param[] paramField;
+
+        private representation[] representationField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private uint[] statusField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("param")]
+        public param[] param
+        {
+            get
+            {
+                return this.paramField;
+            }
+            set
+            {
+                this.paramField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("representation")]
+        public representation[] representation
+        {
+            get
+            {
+                return this.representationField;
+            }
+            set
+            {
+                this.representationField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
+        public uint[] status
+        {
+            get
+            {
+                return this.statusField;
+            }
+            set
+            {
+                this.statusField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.17929")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://wadl.dev.java.net/2009/02")]
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://wadl.dev.java.net/2009/02", IsNullable = false)]
+    public partial class resource_type
+    {
+
+        private doc[] docField;
+
+        private param[] paramField;
+
+        private object[] itemsField;
+
+        private System.Xml.XmlElement[] anyField;
+
+        private string idField;
+
+        private System.Xml.XmlAttribute[] anyAttrField;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("doc")]
+        public doc[] doc
+        {
+            get
+            {
+                return this.docField;
+            }
+            set
+            {
+                this.docField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("param")]
+        public param[] param
+        {
+            get
+            {
+                return this.paramField;
+            }
+            set
+            {
+                this.paramField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute("method", typeof(method))]
+        [System.Xml.Serialization.XmlElementAttribute("resource", typeof(resource))]
+        public object[] Items
+        {
+            get
+            {
+                return this.itemsField;
+            }
+            set
+            {
+                this.itemsField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyElementAttribute()]
+        public System.Xml.XmlElement[] Any
+        {
+            get
+            {
+                return this.anyField;
+            }
+            set
+            {
+                this.anyField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")]
+        public string id
+        {
+            get
+            {
+                return this.idField;
+            }
+            set
+            {
+                this.idField = value;
+            }
+        }
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+        public System.Xml.XmlAttribute[] AnyAttr
+        {
+            get
+            {
+                return this.anyAttrField;
+            }
+            set
+            {
+                this.anyAttrField = value;
+            }
+        }
+    }
+}
\ No newline at end of file



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