You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/10/19 12:31:49 UTC

svn commit: r465561 - in /webservices/axis2/trunk/c: axiom/src/util/ modules/core/clientapi/ modules/core/description/ util/src/ woden/include/ woden/samples/wsdl10/ woden/src/builder/ woden/src/wsdl10/

Author: dinesh
Date: Thu Oct 19 03:31:48 2006
New Revision: 465561

URL: http://svn.apache.org/viewvc?view=rev&rev=465561
Log:
fixed:trailing slash in namespace uri causes service load error

Modified:
    webservices/axis2/trunk/c/axiom/src/util/om_util.c
    webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
    webservices/axis2/trunk/c/modules/core/description/client_utils.c
    webservices/axis2/trunk/c/util/src/qname.c
    webservices/axis2/trunk/c/woden/include/woden_schema_constants.h
    webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c
    webservices/axis2/trunk/c/woden/src/builder/resolver.c
    webservices/axis2/trunk/c/woden/src/wsdl10/woden_wsdl10_constants.h

Modified: webservices/axis2/trunk/c/axiom/src/util/om_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/util/om_util.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/util/om_util.c (original)
+++ webservices/axis2/trunk/c/axiom/src/util/om_util.c Thu Oct 19 03:31:48 2006
@@ -1057,12 +1057,30 @@
     /* This is temporary code. Later complete the code to read from uri and build
      * the document
      */
-    path = AXIS2_URI_GET_PATH((axis2_uri_t *) uri, env);
+	 if (uri)
+		  path = AXIS2_URI_GET_PATH((axis2_uri_t *) uri, env);
+	 else
+		  return AXIS2_FAILURE;
 
-    reader = axiom_xml_reader_create_for_file(env, path, NULL);
-    om_builder = axiom_stax_builder_create(env, reader);
-    doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env);
-    AXIOM_DOCUMENT_BUILD_ALL(doc, env);
+	 if (path)
+		  reader = axiom_xml_reader_create_for_file(env, path, NULL);
+	 else
+		  return AXIS2_FAILURE;
+
+	 if(reader)
+		  om_builder = axiom_stax_builder_create(env, reader);
+	 else
+		  return AXIS2_FAILURE;
+
+	 if (om_builder)
+		  doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env);
+	 else
+		  return AXIS2_FAILURE;
+
+	 if (doc)
+		  AXIOM_DOCUMENT_BUILD_ALL(doc, env);
+	 else
+		  return AXIS2_FAILURE;
 
     return doc;
 }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Thu Oct 19 03:31:48 2006
@@ -311,6 +311,9 @@
             AXIS2_PHASES_INFO_SET_OP_PHASES(info, env, op);
         }
     }
+	 else
+		  return AXIS2_FAILURE;
+
     /** add the service to the config context if it isn't in there already */
     if (NULL == AXIS2_CONF_GET_SVC(svc_client_impl->conf, env,
             AXIS2_SVC_GET_NAME(svc_client_impl->svc, env)))

Modified: webservices/axis2/trunk/c/modules/core/description/client_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/client_utils.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/client_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/client_utils.c Thu Oct 19 03:31:48 2006
@@ -69,7 +69,14 @@
     doc = axiom_util_new_document(env, wsdl_uri);
     resolver = woden_resolver_create(env);
 
-    desc = WODEN_RESOLVER_READ(resolver, env, doc, (axis2_char_t *)doc_base_uri);
+	 if (resolver)
+		  desc = WODEN_RESOLVER_READ(resolver, env, doc, (axis2_char_t *)doc_base_uri);
+	 else
+		  return AXIS2_FAILURE;
+
+	 if (!desc)
+		  return AXIS2_FAILURE;
+
     spec = WODEN_RESOLVER_GET_SPEC(resolver, env);
     if (WODEN_WSDL20 == spec)
     {
@@ -459,3 +466,13 @@
     }
     return axis2_svc;
 }
+
+
+
+
+
+
+
+
+
+

Modified: webservices/axis2/trunk/c/util/src/qname.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/qname.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/util/src/qname.c (original)
+++ webservices/axis2/trunk/c/util/src/qname.c Thu Oct 19 03:31:48 2006
@@ -19,6 +19,7 @@
 #include <axis2_utils.h>
 #include <axis2_utils_defines.h>
 #include <string.h>
+#include <stdio.h>
 
 /********************************** Function prototypes *****************/
 
@@ -263,6 +264,17 @@
         uris_differ =
             axis2_strcmp(qn1->namespace_uri,
                     qn2->namespace_uri);
+		  if (uris_differ)
+			 {
+				  if ((qn1->namespace_uri[strlen(qn1->namespace_uri) - 1] != '/') 
+						&& (qn2->namespace_uri[strlen(qn2->namespace_uri) - 1] == '/') )
+						fprintf (stderr, "you may need to add / to your wsdl namespace %s \n", qn1->namespace_uri);
+				  else if ((qn1->namespace_uri[strlen(qn1->namespace_uri) - 1] == '/') 
+							  && (qn2->namespace_uri[strlen(qn2->namespace_uri) - 1] != '/') )
+						fprintf (stderr, "you may need to add / to your wsdl namespace %s \n", qn2->namespace_uri);
+
+			 }
+
     }
     else
     {

Modified: webservices/axis2/trunk/c/woden/include/woden_schema_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_schema_constants.h?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_schema_constants.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_schema_constants.h Thu Oct 19 03:31:48 2006
@@ -105,3 +105,10 @@
 #endif /* WODEN_SCHEMA_CONSTANTS_H */
 
 
+
+
+
+
+
+
+

Modified: webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c (original)
+++ webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c Thu Oct 19 03:31:48 2006
@@ -75,8 +75,17 @@
     desc = WODEN_RESOLVER_READ(resolver, env, om_doc, doc_base_uri);
     AXIS2_FREE(env->allocator, doc_base_uri);
     WODEN_RESOLVER_FREE(resolver, env);
-    intfaces = WODEN_WSDL10_DESC_GET_INTERFACES(desc, env);
-    intface = AXIS2_ARRAY_LIST_GET(intfaces, env, 0);
+
+	 if (desc)
+		  intfaces = WODEN_WSDL10_DESC_GET_INTERFACES(desc, env);
+	 else
+		  return -1;
+
+	 if (intfaces)
+		  intface = AXIS2_ARRAY_LIST_GET(intfaces, env, 0);
+	 else 
+		  return -1;
+
     if (intface)
     {
         intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env);

Modified: webservices/axis2/trunk/c/woden/src/builder/resolver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/builder/resolver.c?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/woden/src/builder/resolver.c (original)
+++ webservices/axis2/trunk/c/woden/src/builder/resolver.c Thu Oct 19 03:31:48 2006
@@ -20,6 +20,7 @@
 #include <woden_schema_constants.h>
 #include <woden_qname_util.h>
 #include <axis2_uri.h>
+#include <axis2_qname.h>
 
 #include "../wsdl20/woden_constants.h"
 #include "../wsdl10/woden_wsdl10_constants.h"

Modified: webservices/axis2/trunk/c/woden/src/wsdl10/woden_wsdl10_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/woden_wsdl10_constants.h?view=diff&rev=465561&r1=465560&r2=465561
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/woden_wsdl10_constants.h (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/woden_wsdl10_constants.h Thu Oct 19 03:31:48 2006
@@ -65,30 +65,30 @@
 #define WODEN_WSDL10_ELEM_PART "part"
 
 /* Top-level WSDL 1.0 qualified element names. */
-#define WODEN_WSDL10_Q_ELEM_DEFINITIONS "definitions|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_DOCUMENTATION "documentation|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_ACTION "action|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_IMPORT "import|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_INCLUDE "include|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_TYPES "types|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_MSG_REF "message|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_PART "part|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_INTERFACE "portType|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_BINDING "binding|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_SERVICE "service|http://schemas.xmlsoap.org/wsdl"
+#define WODEN_WSDL10_Q_ELEM_DEFINITIONS "definitions|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_DOCUMENTATION "documentation|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_ACTION "action|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_IMPORT "import|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_INCLUDE "include|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_TYPES "types|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_MSG_REF "message|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_PART "part|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_INTERFACE "portType|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_BINDING "binding|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_SERVICE "service|http://schemas.xmlsoap.org/wsdl/"
 
 /* Nested WSDL 1.0 qualified element names. */
-#define WODEN_WSDL10_Q_ELEM_FAULT "fault|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_OPERATION "operation|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_INPUT "input|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_OUTPUT "output|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_INFAULT "infault|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_OUTFAULT "outfault|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_FEATURE "feature|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_PROPERTY "property|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_VALUE "value|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_CONSTRAINT "constraint|http://schemas.xmlsoap.org/wsdl"
-#define WODEN_WSDL10_Q_ELEM_ENDPOINT "port|http://schemas.xmlsoap.org/wsdl"
+#define WODEN_WSDL10_Q_ELEM_FAULT "fault|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_OPERATION "operation|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_INPUT "input|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_OUTPUT "output|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_INFAULT "infault|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_OUTFAULT "outfault|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_FEATURE "feature|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_PROPERTY "property|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_VALUE "value|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_CONSTRAINT "constraint|http://schemas.xmlsoap.org/wsdl/"
+#define WODEN_WSDL10_Q_ELEM_ENDPOINT "port|http://schemas.xmlsoap.org/wsdl/"
 
 /* Attribute names. */
 #define WODEN_WSDL10_ATTR_ID "id"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org