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 da...@apache.org on 2006/03/28 07:40:51 UTC
svn commit: r389403 [3/3] - in /webservices/axis2/trunk/c: ./ include/
modules/util/ modules/wsdl/ modules/wsdl/builder/ samples/ samples/client/
samples/client/dynamic_invocation/ test/resources/wsdl/
test/wsdl/builder/print/
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_binding.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_binding.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_binding.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_binding.c Mon Mar 27 21:40:46 2006
@@ -357,7 +357,7 @@
AXIS2_QNAME_FREE(binding_impl->qname, env);
binding_impl->qname = NULL;
}
- binding_impl->qname = qname;
+ binding_impl->qname = AXIS2_QNAME_CLONE(qname, env);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_fault.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_fault.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_fault.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_fault.c Mon Mar 27 21:40:46 2006
@@ -161,6 +161,6 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, ref, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(binding_fault)->ref = ref;
+ AXIS2_INTF_TO_IMPL(binding_fault)->ref = AXIS2_QNAME_CLONE(ref, env);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_msg_ref.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_msg_ref.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_msg_ref.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_msg_ref.c Mon Mar 27 21:40:46 2006
@@ -22,7 +22,7 @@
*/
typedef struct axis2_wsdl_binding_msg_ref_impl
{
- axis2_wsdl_binding_msg_ref_t binding_msg_ref;
+ axis2_wsdl_binding_msg_ref_t binding_msg_ref;
/**
* Field messageLabel
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_op.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_op.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_binding_op.c Mon Mar 27 21:40:46 2006
@@ -7,32 +7,26 @@
typedef struct axis2_wsdl_binding_op_impl
{
axis2_wsdl_binding_op_t binding_op;
- /**
+ /**
* Field name
*/
axis2_qname_t *qname;
-
-
/**
* Field in_faults
*/
axis2_linked_list_t *in_faults;
-
/**
* Field out_faults
*/
axis2_linked_list_t *out_faults;
-
/**
* Field op
*/
void *op;
-
/**
* Field input
*/
axis2_wsdl_binding_msg_ref_t *input;
-
/**
* Field output
*/
@@ -415,7 +409,7 @@
AXIS2_QNAME_FREE(binding_op_impl->qname, env);
binding_op_impl->qname = NULL;
}
- binding_op_impl->qname = qname;
+ binding_op_impl->qname = AXIS2_QNAME_CLONE(qname, env);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_endpoint.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_endpoint.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_endpoint.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_endpoint.c Mon Mar 27 21:40:46 2006
@@ -193,7 +193,7 @@
AXIS2_QNAME_FREE(wsdl_endpoint_impl->qname, env);
wsdl_endpoint_impl->qname = NULL;
}
- wsdl_endpoint_impl->qname = qname;
+ wsdl_endpoint_impl->qname = AXIS2_QNAME_CLONE(qname, env);
return AXIS2_SUCCESS;
}
Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_default_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_default_element.c?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_default_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_default_element.c Mon Mar 27 21:40:46 2006
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wsdl.extensions.impl;
+
+import org.apache.wsdl.extensions.DefaultExtensibilityElement;
+import org.apache.wsdl.impl.WSDLExtensibilityElementImpl;
+import org.w3c.dom.Element;
+
+/**
+ * This would be the default Extension class in case that the Extensibility Element
+ * in the WSDL file could not be mapped to a particular Extensibility Element. In
+ * which case the entire Extensibility Element will be kept as a DOM Element
+ */
+public class DefaultExtensibilityElementImpl extends
+ WSDLExtensibilityElementImpl implements DefaultExtensibilityElement {
+
+ private Element element;
+
+ /**
+ * @return The Extensibility Element as a DOM Element
+ */
+ public Element getElement() {
+ return element;
+ }
+
+ /**
+ * Sets the DOM Element as the extensibility Elements
+ * Content.
+ */
+ public void setElement(Element element) {
+ this.element = element;
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_address.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_address.c?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_address.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_address.c Mon Mar 27 21:40:46 2006
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_wsdl_ext_soap_address.h>
+#include <axis2_wsdl.h>
+
+/**
+ * @brief Wsdl Extension Soap Address struct impl
+ * Wsdl Extention Soap Address
+ */
+typedef struct axis2_wsdl_ext_soap_address_impl
+{
+ axis2_wsdl_ext_soap_address_t ext_soap_address;
+ axis2_char_t *location_uri;
+
+} axis2_wsdl_ext_soap_address_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ext_soap_address) \
+ ((axis2_wsdl_ext_soap_address_impl_t *)ext_soap_address)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+ axis2_wsdl_ext_soap_address_free (axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_address_get_location_uri(axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_address_set_location_uri(axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env,
+ axis2_char_t *location_uri);
+
+/************************** End of function prototypes ************************/
+
+axis2_wsdl_ext_soap_address_t * AXIS2_CALL
+axis2_wsdl_ext_soap_address_create (axis2_env_t **env,
+ axis2_qname_t *qtype)
+{
+ axis2_wsdl_ext_soap_address_impl_t *ext_soap_address_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ ext_soap_address_impl = (axis2_wsdl_ext_soap_address_impl_t *) AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_wsdl_ext_soap_address_impl_t));
+
+
+ if(NULL == ext_soap_address_impl)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_address_impl->location_uri = NULL;
+ ext_soap_address_impl->ext_soap_address.ops = NULL;
+ ext_soap_address_impl->ext_soap_address.ext_element = NULL;
+
+ ext_soap_address_impl->ext_soap_address.ext_element =
+ axis2_wsdl_extensible_element_create(env);
+ if(NULL == ext_soap_address_impl->ext_soap_address.ext_element)
+ {
+ axis2_wsdl_ext_soap_address_free(&(ext_soap_address_impl->ext_soap_address), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_address_impl->ext_soap_address.ops =
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_ext_soap_address_ops_t));
+ if(NULL == ext_soap_address_impl->ext_soap_address.ops)
+ {
+ axis2_wsdl_ext_soap_address_free(&(ext_soap_address_impl->ext_soap_address), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ if(!qtype)
+ {
+ qtype = axis2_qname_create(env, "address", AXIS2_SOAP_11_ADDRESS, NULL);
+ if(!qtype) return NULL;
+ }
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(
+ (&(ext_soap_address_impl->ext_soap_address))->ext_element, env, qtype);
+
+ ext_soap_address_impl->ext_soap_address.ops->free = axis2_wsdl_ext_soap_address_free;
+ ext_soap_address_impl->ext_soap_address.ops->get_location_uri =
+ axis2_wsdl_ext_soap_address_get_location_uri;
+ ext_soap_address_impl->ext_soap_address.ops->set_location_uri =
+ axis2_wsdl_ext_soap_address_set_location_uri;
+
+ return &(ext_soap_address_impl->ext_soap_address);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_address_free (axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env)
+{
+ axis2_wsdl_ext_soap_address_impl_t *exp_soap_address_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ exp_soap_address_impl = AXIS2_INTF_TO_IMPL(ext_soap_address);
+
+ if(NULL != ext_soap_address->ops)
+ AXIS2_FREE((*env)->allocator, ext_soap_address->ops);
+
+ if(NULL != exp_soap_address_impl->location_uri)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_address_impl->location_uri);
+ exp_soap_address_impl->location_uri = NULL;
+ }
+
+ if(NULL != ext_soap_address->ext_element)
+ {
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_FREE(ext_soap_address->ext_element, env);
+ ext_soap_address->ext_element = NULL;
+ }
+
+ AXIS2_FREE((*env)->allocator, exp_soap_address_impl);
+ exp_soap_address_impl = NULL;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_address_get_location_uri(axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+ return AXIS2_INTF_TO_IMPL(ext_soap_address)->location_uri;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_address_set_location_uri(axis2_wsdl_ext_soap_address_t *ext_soap_address,
+ axis2_env_t **env,
+ axis2_char_t *location_uri)
+{
+ axis2_wsdl_ext_soap_address_impl_t *exp_soap_address_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, location_uri, AXIS2_FAILURE);
+ exp_soap_address_impl = AXIS2_INTF_TO_IMPL(ext_soap_address);
+
+ if(exp_soap_address_impl->location_uri)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_address_impl->location_uri);
+ exp_soap_address_impl->location_uri = NULL;
+ }
+ exp_soap_address_impl->location_uri = AXIS2_STRDUP(location_uri, env);
+ if(!exp_soap_address_impl->location_uri)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_binding.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_binding.c?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_binding.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_binding.c Mon Mar 27 21:40:46 2006
@@ -0,0 +1,227 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_wsdl_ext_soap_binding.h>
+#include <axis2_wsdl.h>
+
+/**
+ * @brief Wsdl Extension Soap Binding struct impl
+ * Wsdl Extention Soap Binding
+ */
+typedef struct axis2_wsdl_ext_soap_binding_impl
+{
+ axis2_wsdl_ext_soap_binding_t ext_soap_binding;
+ axis2_char_t *style;
+ axis2_char_t *transport_uri;
+
+} axis2_wsdl_ext_soap_binding_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ext_soap_binding) \
+ ((axis2_wsdl_ext_soap_binding_impl_t *)ext_soap_binding)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+ axis2_wsdl_ext_soap_binding_free (axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_binding_get_style(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_binding_set_style(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env,
+ axis2_char_t *style);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_binding_get_transport_uri(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_binding_set_transport_uri(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env,
+ axis2_char_t *transport_uri);
+
+/************************** End of function prototypes ************************/
+
+axis2_wsdl_ext_soap_binding_t * AXIS2_CALL
+axis2_wsdl_ext_soap_binding_create (axis2_env_t **env,
+ axis2_qname_t *qtype)
+{
+ axis2_wsdl_ext_soap_binding_impl_t *ext_soap_binding_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ ext_soap_binding_impl = (axis2_wsdl_ext_soap_binding_impl_t *) AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_wsdl_ext_soap_binding_impl_t));
+
+
+ if(NULL == ext_soap_binding_impl)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_binding_impl->style = NULL;
+ ext_soap_binding_impl->transport_uri = NULL;
+ ext_soap_binding_impl->ext_soap_binding.ops = NULL;
+ ext_soap_binding_impl->ext_soap_binding.ext_element = NULL;
+
+ ext_soap_binding_impl->ext_soap_binding.ext_element =
+ axis2_wsdl_extensible_element_create(env);
+ if(NULL == ext_soap_binding_impl->ext_soap_binding.ext_element)
+ {
+ axis2_wsdl_ext_soap_binding_free(&(ext_soap_binding_impl->ext_soap_binding), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_binding_impl->ext_soap_binding.ops =
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_ext_soap_binding_ops_t));
+ if(NULL == ext_soap_binding_impl->ext_soap_binding.ops)
+ {
+ axis2_wsdl_ext_soap_binding_free(&(ext_soap_binding_impl->ext_soap_binding), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ if(!qtype)
+ {
+ qtype = axis2_qname_create(env, "binding", AXIS2_SOAP_11_BINDING, NULL);
+ if(!qtype) return NULL;
+ }
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(
+ (&(ext_soap_binding_impl->ext_soap_binding))->ext_element, env, qtype);
+
+ ext_soap_binding_impl->ext_soap_binding.ops->free = axis2_wsdl_ext_soap_binding_free;
+ ext_soap_binding_impl->ext_soap_binding.ops->get_style =
+ axis2_wsdl_ext_soap_binding_get_style;
+ ext_soap_binding_impl->ext_soap_binding.ops->set_style =
+ axis2_wsdl_ext_soap_binding_set_style;
+ ext_soap_binding_impl->ext_soap_binding.ops->get_transport_uri =
+ axis2_wsdl_ext_soap_binding_get_transport_uri;
+ ext_soap_binding_impl->ext_soap_binding.ops->set_transport_uri =
+ axis2_wsdl_ext_soap_binding_set_transport_uri;
+
+ return &(ext_soap_binding_impl->ext_soap_binding);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_binding_free (axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env)
+{
+ axis2_wsdl_ext_soap_binding_impl_t *exp_soap_binding_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ exp_soap_binding_impl = AXIS2_INTF_TO_IMPL(ext_soap_binding);
+
+ if(NULL != ext_soap_binding->ops)
+ AXIS2_FREE((*env)->allocator, ext_soap_binding->ops);
+
+ if(NULL != exp_soap_binding_impl->style)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_binding_impl->style);
+ exp_soap_binding_impl->style = NULL;
+ }
+
+ if(NULL != exp_soap_binding_impl->transport_uri)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_binding_impl->transport_uri);
+ exp_soap_binding_impl->transport_uri = NULL;
+ }
+
+ if(NULL != ext_soap_binding->ext_element)
+ {
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_FREE(ext_soap_binding->ext_element, env);
+ ext_soap_binding->ext_element = NULL;
+ }
+
+ AXIS2_FREE((*env)->allocator, exp_soap_binding_impl);
+ exp_soap_binding_impl = NULL;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_binding_get_style(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+ return AXIS2_INTF_TO_IMPL(ext_soap_binding)->style;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_binding_set_style(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env,
+ axis2_char_t *style)
+{
+ axis2_wsdl_ext_soap_binding_impl_t *exp_soap_binding_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, style, AXIS2_FAILURE);
+
+ exp_soap_binding_impl = AXIS2_INTF_TO_IMPL(ext_soap_binding);
+
+ if(exp_soap_binding_impl->style)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_binding_impl->style);
+ exp_soap_binding_impl->style = NULL;
+ }
+ exp_soap_binding_impl->style = AXIS2_STRDUP(style, env);
+ if(!exp_soap_binding_impl->style)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_binding_get_transport_uri(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+ return AXIS2_INTF_TO_IMPL(ext_soap_binding)->transport_uri;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_binding_set_transport_uri(axis2_wsdl_ext_soap_binding_t *ext_soap_binding,
+ axis2_env_t **env,
+ axis2_char_t *transport_uri)
+{
+ axis2_wsdl_ext_soap_binding_impl_t *exp_soap_binding_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, transport_uri, AXIS2_FAILURE);
+ exp_soap_binding_impl = AXIS2_INTF_TO_IMPL(ext_soap_binding);
+
+ if(exp_soap_binding_impl->transport_uri)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_binding_impl->transport_uri);
+ exp_soap_binding_impl->transport_uri = NULL;
+ }
+ exp_soap_binding_impl->transport_uri = AXIS2_STRDUP(transport_uri, env);
+ if(!exp_soap_binding_impl->transport_uri)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_op.c?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_op.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_op.c Mon Mar 27 21:40:46 2006
@@ -0,0 +1,227 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_wsdl_ext_soap_op.h>
+#include <axis2_wsdl.h>
+
+/**
+ * @brief Wsdl Extension Soap Operation struct impl
+ * Wsdl Extention Soap Operation
+ */
+typedef struct axis2_wsdl_ext_soap_op_impl
+{
+ axis2_wsdl_ext_soap_op_t ext_soap_op;
+ axis2_char_t *soap_action;
+ axis2_char_t *style;
+
+} axis2_wsdl_ext_soap_op_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ext_soap_op) \
+ ((axis2_wsdl_ext_soap_op_impl_t *)ext_soap_op)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+ axis2_wsdl_ext_soap_op_free (axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_op_get_soap_action(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_op_set_soap_action(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env,
+ axis2_char_t *soap_action);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_op_get_style(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_op_set_style(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env,
+ axis2_char_t *style);
+
+/************************** End of function prototypes ************************/
+
+axis2_wsdl_ext_soap_op_t * AXIS2_CALL
+axis2_wsdl_ext_soap_op_create (axis2_env_t **env,
+ axis2_qname_t *qtype)
+{
+ axis2_wsdl_ext_soap_op_impl_t *ext_soap_op_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ ext_soap_op_impl = (axis2_wsdl_ext_soap_op_impl_t *) AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_wsdl_ext_soap_op_impl_t));
+
+
+ if(NULL == ext_soap_op_impl)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_op_impl->soap_action = NULL;
+ ext_soap_op_impl->style = NULL;
+ ext_soap_op_impl->ext_soap_op.ops = NULL;
+ ext_soap_op_impl->ext_soap_op.ext_element = NULL;
+
+ ext_soap_op_impl->ext_soap_op.ext_element =
+ axis2_wsdl_extensible_element_create(env);
+ if(NULL == ext_soap_op_impl->ext_soap_op.ext_element)
+ {
+ axis2_wsdl_ext_soap_op_free(&(ext_soap_op_impl->ext_soap_op), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ext_soap_op_impl->ext_soap_op.ops =
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_ext_soap_op_ops_t));
+ if(NULL == ext_soap_op_impl->ext_soap_op.ops)
+ {
+ axis2_wsdl_ext_soap_op_free(&(ext_soap_op_impl->ext_soap_op), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ if(!qtype)
+ {
+ qtype = axis2_qname_create(env, "op", AXIS2_SOAP_11_OP, NULL);
+ if(!qtype) return NULL;
+ }
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(
+ (&(ext_soap_op_impl->ext_soap_op))->ext_element, env, qtype);
+
+ ext_soap_op_impl->ext_soap_op.ops->free = axis2_wsdl_ext_soap_op_free;
+ ext_soap_op_impl->ext_soap_op.ops->get_soap_action =
+ axis2_wsdl_ext_soap_op_get_soap_action;
+ ext_soap_op_impl->ext_soap_op.ops->set_soap_action =
+ axis2_wsdl_ext_soap_op_set_soap_action;
+ ext_soap_op_impl->ext_soap_op.ops->get_style =
+ axis2_wsdl_ext_soap_op_get_style;
+ ext_soap_op_impl->ext_soap_op.ops->set_style =
+ axis2_wsdl_ext_soap_op_set_style;
+
+ return &(ext_soap_op_impl->ext_soap_op);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_op_free (axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env)
+{
+ axis2_wsdl_ext_soap_op_impl_t *exp_soap_op_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ exp_soap_op_impl = AXIS2_INTF_TO_IMPL(ext_soap_op);
+
+ if(NULL != ext_soap_op->ops)
+ AXIS2_FREE((*env)->allocator, ext_soap_op->ops);
+
+ if(NULL != exp_soap_op_impl->soap_action)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_op_impl->soap_action);
+ exp_soap_op_impl->soap_action = NULL;
+ }
+
+ if(NULL != exp_soap_op_impl->style)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_op_impl->style);
+ exp_soap_op_impl->style = NULL;
+ }
+
+ if(NULL != ext_soap_op->ext_element)
+ {
+ AXIS2_WSDL_EXTENSIBLE_ELEMENT_FREE(ext_soap_op->ext_element, env);
+ ext_soap_op->ext_element = NULL;
+ }
+
+ AXIS2_FREE((*env)->allocator, exp_soap_op_impl);
+ exp_soap_op_impl = NULL;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_op_get_soap_action(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+ return AXIS2_INTF_TO_IMPL(ext_soap_op)->soap_action;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_op_set_soap_action(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env,
+ axis2_char_t *soap_action)
+{
+ axis2_wsdl_ext_soap_op_impl_t *exp_soap_op_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, soap_action, AXIS2_FAILURE);
+
+ exp_soap_op_impl = AXIS2_INTF_TO_IMPL(ext_soap_op);
+
+ if(exp_soap_op_impl->soap_action)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_op_impl->soap_action);
+ exp_soap_op_impl->soap_action = NULL;
+ }
+ exp_soap_op_impl->soap_action = AXIS2_STRDUP(soap_action, env);
+ if(!exp_soap_op_impl->soap_action)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_op_get_style(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+ return AXIS2_INTF_TO_IMPL(ext_soap_op)->style;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_op_set_style(axis2_wsdl_ext_soap_op_t *ext_soap_op,
+ axis2_env_t **env,
+ axis2_char_t *style)
+{
+ axis2_wsdl_ext_soap_op_impl_t *exp_soap_op_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, style, AXIS2_FAILURE);
+ exp_soap_op_impl = AXIS2_INTF_TO_IMPL(ext_soap_op);
+
+ if(exp_soap_op_impl->style)
+ {
+ AXIS2_FREE((*env)->allocator, exp_soap_op_impl->style);
+ exp_soap_op_impl->style = NULL;
+ }
+ exp_soap_op_impl->style = AXIS2_STRDUP(style, env);
+ if(!exp_soap_op_impl->style)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
+}
+
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_fault_ref.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_fault_ref.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_fault_ref.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_fault_ref.c Mon Mar 27 21:40:46 2006
@@ -22,7 +22,7 @@
*/
typedef struct axis2_wsdl_fault_ref_impl
{
- axis2_wsdl_fault_ref_t fault_ref;
+ axis2_wsdl_fault_ref_t fault_ref;
/**
* Field messageLabel
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_feature.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_feature.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_feature.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_feature.c Mon Mar 27 21:40:46 2006
@@ -22,7 +22,7 @@
*/
typedef struct axis2_wsdl_feature_impl
{
- axis2_wsdl_feature_t wsdl_feature;
+ axis2_wsdl_feature_t wsdl_feature;
axis2_char_t *name;
axis2_bool_t required;
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_import.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_import.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_import.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_import.c Mon Mar 27 21:40:46 2006
@@ -22,10 +22,10 @@
*/
typedef struct axis2_wsdl_import_impl
{
- axis2_wsdl_import_t wsdl_import;
-
+ axis2_wsdl_import_t wsdl_import;
axis2_char_t *location;
- axis2_char_t *namespace;
+ axis2_char_t *namespace;
+
} axis2_wsdl_import_impl_t;
#define AXIS2_INTF_TO_IMPL(wsdl_import) \
@@ -34,7 +34,7 @@
/************************* Function prototypes ********************************/
axis2_status_t AXIS2_CALL
- axis2_wsdl_import_free (axis2_wsdl_import_t *wsdl_import,
+axis2_wsdl_import_free (axis2_wsdl_import_t *wsdl_import,
axis2_env_t **env);
axis2_char_t *AXIS2_CALL
@@ -62,18 +62,15 @@
{
axis2_wsdl_import_impl_t *wsdl_import_impl = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
- wsdl_import_impl = (axis2_wsdl_import_impl_t *) AXIS2_MALLOC((*env)->allocator,
- sizeof(axis2_wsdl_import_impl_t));
-
-
- if(NULL == wsdl_import_impl)
+ AXIS2_ENV_CHECK(env, NULL);
+
+ wsdl_import_impl = (axis2_wsdl_import_impl_t *) AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_wsdl_import_impl_t));
+ if(NULL == wsdl_import_impl)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
wsdl_import_impl->namespace = NULL;
wsdl_import_impl->location = NULL;
wsdl_import_impl->wsdl_import.ops = NULL;
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_include.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_include.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_include.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_include.c Mon Mar 27 21:40:46 2006
@@ -22,9 +22,9 @@
*/
typedef struct axis2_wsdl_include_impl
{
- axis2_wsdl_include_t wsdl_include;
-
+ axis2_wsdl_include_t wsdl_include;
axis2_char_t *location;
+
} axis2_wsdl_include_impl_t;
#define AXIS2_INTF_TO_IMPL(wsdl_include) \
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c Mon Mar 27 21:40:46 2006
@@ -22,28 +22,23 @@
*/
typedef struct axis2_wsdl_interface_impl
{
- axis2_wsdl_interface_t wsdl_interface;
-
- /**
+ axis2_wsdl_interface_t wsdl_interface;
+ /**
* Field name
*/
axis2_qname_t *qname;
-
/**
* Field superInterfaces
*/
axis2_hash_t *super_interfaces;
-
/**
* Field faults
*/
axis2_linked_list_t *faults;
-
/**
* Field ops
*/
axis2_hash_t *ops;
-
/**
* Field style_default
*/
@@ -425,7 +420,7 @@
AXIS2_QNAME_FREE(interface_impl->qname, env);
interface_impl->qname = NULL;
}
- interface_impl->qname = qName;
+ interface_impl->qname = AXIS2_QNAME_CLONE(qName, env);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_msg_ref.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_msg_ref.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_msg_ref.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_msg_ref.c Mon Mar 27 21:40:46 2006
@@ -22,20 +22,17 @@
*/
typedef struct axis2_wsdl_msg_ref_impl
{
- axis2_wsdl_msg_ref_t msg_ref;
-
+ axis2_wsdl_msg_ref_t msg_ref;
/**
* Field messageLabel
*/
axis2_char_t *msg_label;
-
/**
* Field Direction
* Can be "in" or "out" depending on the element name being "input" or
* "output" respectively;
*/
axis2_char_t *direction;
-
/**
* Field element
*/
@@ -49,34 +46,34 @@
/************************* Function prototypes ********************************/
axis2_status_t AXIS2_CALL
- axis2_wsdl_msg_ref_free (axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env);
+axis2_wsdl_msg_ref_free (axis2_wsdl_msg_ref_t *msg_ref,
+ axis2_env_t **env);
axis2_char_t * AXIS2_CALL
axis2_wsdl_msg_ref_get_direction(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_wsdl_msg_ref_set_direction(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env,
- axis2_char_t *direction);
+ axis2_env_t **env,
+ axis2_char_t *direction);
axis2_char_t * AXIS2_CALL
axis2_wsdl_msg_ref_get_msg_label(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_wsdl_msg_ref_set_msg_label(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env,
- axis2_char_t *msg_label);
+ axis2_env_t **env,
+ axis2_char_t *msg_label);
axis2_qname_t * AXIS2_CALL
axis2_wsdl_msg_ref_get_element(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_wdsl_msg_ref_set_element(axis2_wsdl_msg_ref_t *msg_ref,
- axis2_env_t **env,
+ axis2_env_t **env,
axis2_qname_t *element);
/************************** End of function prototypes ************************/
@@ -85,63 +82,49 @@
axis2_wsdl_msg_ref_create (axis2_env_t **env)
{
axis2_wsdl_msg_ref_impl_t *msg_ref_impl = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
- msg_ref_impl = (axis2_wsdl_msg_ref_impl_t *) AXIS2_MALLOC((*env)->allocator,
- sizeof(axis2_wsdl_msg_ref_impl_t));
+ AXIS2_ENV_CHECK(env, NULL);
+ msg_ref_impl = (axis2_wsdl_msg_ref_impl_t *) AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_wsdl_msg_ref_impl_t));
- if(NULL == msg_ref_impl)
+ if(NULL == msg_ref_impl)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
-
+ }
+ msg_ref_impl->msg_label = NULL;
+ msg_ref_impl->direction = NULL;
+ msg_ref_impl->element = NULL;
+
msg_ref_impl->msg_ref.extensible_component =
axis2_wsdl_extensible_component_create(env);
-
if(NULL == msg_ref_impl->msg_ref.extensible_component)
{
- AXIS2_FREE((*env)->allocator, msg_ref_impl);
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_WSDL_MSG_REF_FREE(&(msg_ref_impl->msg_ref), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
- msg_ref_impl->msg_ref.ops =
- AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_msg_ref_ops_t));
- if(NULL == msg_ref_impl->msg_ref.ops)
- {
- AXIS2_WSDL_EXTENSIBLE_COMPONENT_FREE(msg_ref_impl->msg_ref.
- extensible_component, env);
- AXIS2_FREE((*env)->allocator, msg_ref_impl);
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ msg_ref_impl->msg_ref.ops =
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_msg_ref_ops_t));
+ if(NULL == msg_ref_impl->msg_ref.ops)
+ {
+ AXIS2_WSDL_MSG_REF_FREE(&(msg_ref_impl->msg_ref), env);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- msg_ref_impl->msg_ref.ops->free = axis2_wsdl_msg_ref_free;
-
- msg_ref_impl->msg_ref.ops->get_direction =
- axis2_wsdl_msg_ref_get_direction;
-
- msg_ref_impl->msg_ref.ops->set_direction =
- axis2_wsdl_msg_ref_set_direction;
-
+ msg_ref_impl->msg_ref.ops->free = axis2_wsdl_msg_ref_free;
+ msg_ref_impl->msg_ref.ops->get_direction =
+ axis2_wsdl_msg_ref_get_direction;
+ msg_ref_impl->msg_ref.ops->set_direction =
+ axis2_wsdl_msg_ref_set_direction;
msg_ref_impl->msg_ref.ops->get_msg_label =
- axis2_wsdl_msg_ref_get_msg_label;
-
- msg_ref_impl->msg_ref.ops->set_msg_label =
- axis2_wsdl_msg_ref_set_msg_label;
-
+ axis2_wsdl_msg_ref_get_msg_label;
+ msg_ref_impl->msg_ref.ops->set_msg_label =
+ axis2_wsdl_msg_ref_set_msg_label;
msg_ref_impl->msg_ref.ops->get_element = axis2_wsdl_msg_ref_get_element;
-
- msg_ref_impl->msg_ref.ops->set_element = axis2_wdsl_msg_ref_set_element;
-
-
- msg_ref_impl->msg_label = NULL;
- msg_ref_impl->direction = NULL;
- msg_ref_impl->element = NULL;
-
- return &(msg_ref_impl->msg_ref);
+ msg_ref_impl->msg_ref.ops->set_element = axis2_wdsl_msg_ref_set_element;
+ return &(msg_ref_impl->msg_ref);
}
/***************************Function implementation****************************/
@@ -150,31 +133,36 @@
axis2_wsdl_msg_ref_free (axis2_wsdl_msg_ref_t *msg_ref,
axis2_env_t **env)
{
+ axis2_wsdl_msg_ref_impl_t *msg_ref_impl = NULL;
+
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if(NULL != msg_ref->ops)
- AXIS2_FREE((*env)->allocator, msg_ref->ops);
+ msg_ref_impl = AXIS2_INTF_TO_IMPL(msg_ref);
- if(NULL != AXIS2_INTF_TO_IMPL(msg_ref)->msg_label)
+ if(NULL != msg_ref->ops)
{
- AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(msg_ref)->msg_label);
+ AXIS2_FREE((*env)->allocator, msg_ref->ops);
}
-
- if(NULL != AXIS2_INTF_TO_IMPL(msg_ref)->msg_label)
+ if(NULL != msg_ref_impl->msg_label)
{
- AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(msg_ref)->msg_label);
+ AXIS2_FREE((*env)->allocator, msg_ref_impl->msg_label);
}
-
- if(NULL != AXIS2_INTF_TO_IMPL(msg_ref)->element)
+ if(NULL != msg_ref_impl->msg_label)
{
- AXIS2_QNAME_FREE(AXIS2_INTF_TO_IMPL(msg_ref)->element, env);
+ AXIS2_FREE((*env)->allocator, msg_ref_impl->msg_label);
+ }
+ if(NULL != msg_ref_impl->element)
+ {
+ AXIS2_QNAME_FREE(msg_ref_impl->element, env);
}
-
if(NULL != msg_ref->extensible_component)
+ {
AXIS2_WSDL_EXTENSIBLE_COMPONENT_FREE(msg_ref->extensible_component, env);
-
- AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(msg_ref));
-
- return AXIS2_SUCCESS;
+ }
+ if(msg_ref_impl)
+ {
+ AXIS2_FREE((*env)->allocator, msg_ref_impl);
+ }
+ return AXIS2_SUCCESS;
}
axis2_char_t * AXIS2_CALL
@@ -192,6 +180,7 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, direction, AXIS2_FAILURE);
+
AXIS2_INTF_TO_IMPL(msg_ref)->direction = direction;
return AXIS2_SUCCESS;
}
@@ -211,6 +200,7 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, msg_label, AXIS2_FAILURE);
+
AXIS2_INTF_TO_IMPL(msg_ref)->msg_label = msg_label;
return AXIS2_SUCCESS;
}
@@ -230,6 +220,6 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, element, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(msg_ref)->element = element;
+ AXIS2_INTF_TO_IMPL(msg_ref)->element = AXIS2_QNAME_CLONE(element, env);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c Mon Mar 27 21:40:46 2006
@@ -24,40 +24,35 @@
*/
struct axis2_wsdl_op_impl
{
- axis2_wsdl_op_t wsdl_op;
+ axis2_wsdl_op_t wsdl_op;
/**
* URI of the MEP
*/
- axis2_char_t *msg_exchange_pattern;
+ axis2_char_t *msg_exchange_pattern;
/**
* Field style
*/
- axis2_char_t *style;
+ axis2_char_t *style;
/**
* Field name
*/
- axis2_qname_t *name;
-
+ axis2_qname_t *name;
/**
* Field inputMessage
*/
axis2_wsdl_msg_ref_t *input_msg;
-
/**
* Field outputMessage
*/
axis2_wsdl_msg_ref_t *output_msg;
-
/**
* Field in_faults
*/
axis2_linked_list_t *in_faults;
-
/**
* Field out_faults
*/
axis2_linked_list_t *out_faults;
-
/**
* Field safety
* value of parent if not specified
@@ -86,8 +81,8 @@
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_qname (axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_qname_t *name);
+ axis2_env_t **env,
+ axis2_qname_t *name);
axis2_qname_t * AXIS2_CALL
axis2_wsdl_op_get_qname (void *wsdl_op,
@@ -95,12 +90,12 @@
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_style (axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_char_t *style);
+ axis2_env_t **env,
+ axis2_char_t *style);
axis2_char_t * AXIS2_CALL
axis2_wsdl_op_get_style (axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_linked_list_t * AXIS2_CALL
@@ -109,17 +104,17 @@
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_in_faults(axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_linked_list_t *in_faults);
+ axis2_env_t **env,
+ axis2_linked_list_t *in_faults);
axis2_wsdl_msg_ref_t *AXIS2_CALL
axis2_wsdl_op_get_input_msg(axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_input_msg(axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_wsdl_msg_ref_t *input_msg);
+ axis2_env_t **env,
+ axis2_wsdl_msg_ref_t *input_msg);
axis2_linked_list_t *AXIS2_CALL
axis2_wsdl_op_get_out_faults(axis2_wsdl_op_t *wsdl_op,
@@ -136,8 +131,8 @@
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_output_msg(axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_wsdl_msg_ref_t *output_msg);
+ axis2_env_t **env,
+ axis2_wsdl_msg_ref_t *output_msg);
axis2_bool_t AXIS2_CALL
axis2_wsdl_op_is_safe(axis2_wsdl_op_t *wsdl_op,
@@ -169,21 +164,21 @@
{
axis2_wsdl_op_impl_t *wsdl_op_impl = NULL;
- wsdl_op_impl = (axis2_wsdl_op_impl_t *) AXIS2_MALLOC ((*env)->
+ wsdl_op_impl = (axis2_wsdl_op_impl_t *) AXIS2_MALLOC ((*env)->
allocator, sizeof(axis2_wsdl_op_impl_t));
- if(!wsdl_op_impl)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ if(!wsdl_op_impl)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
+ }
wsdl_op_impl->in_faults = NULL;
wsdl_op_impl->out_faults = NULL;
wsdl_op_impl->wsdl_op.extensible_component = NULL;
wsdl_op_impl->msg_exchange_pattern = NULL;
- wsdl_op_impl->style = NULL;
- wsdl_op_impl->name = NULL;
+ wsdl_op_impl->style = NULL;
+ wsdl_op_impl->name = NULL;
wsdl_op_impl->input_msg = NULL;
wsdl_op_impl->output_msg = NULL;
wsdl_op_impl->safety = AXIS2_FALSE;
@@ -196,15 +191,14 @@
axis2_wsdl_op_free(&(wsdl_op_impl->wsdl_op), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
-
+ }
wsdl_op_impl->out_faults = axis2_linked_list_create(env);
if(NULL == wsdl_op_impl->out_faults)
{
axis2_wsdl_op_free(&(wsdl_op_impl->wsdl_op), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
+ }
wsdl_op_impl->wsdl_op.extensible_component = axis2_wsdl_extensible_component_create(env);
if(NULL == wsdl_op_impl->wsdl_op.extensible_component)
@@ -212,24 +206,24 @@
axis2_wsdl_op_free(&(wsdl_op_impl->wsdl_op), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
+ }
- wsdl_op_impl->wsdl_op.ops = (axis2_wsdl_op_ops_t *)
- AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_op_ops_t));
+ wsdl_op_impl->wsdl_op.ops = (axis2_wsdl_op_ops_t *)
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_op_ops_t));
- if(NULL == wsdl_op_impl->wsdl_op.ops)
- {
+ if(NULL == wsdl_op_impl->wsdl_op.ops)
+ {
axis2_wsdl_op_free(&(wsdl_op_impl->wsdl_op), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
- }
+ }
- wsdl_op_impl->wsdl_op.ops->free = axis2_wsdl_op_free;
- wsdl_op_impl->wsdl_op.ops->free_void_arg = axis2_wsdl_op_free_void_arg;
+ wsdl_op_impl->wsdl_op.ops->free = axis2_wsdl_op_free;
+ wsdl_op_impl->wsdl_op.ops->free_void_arg = axis2_wsdl_op_free_void_arg;
wsdl_op_impl->wsdl_op.ops->set_msg_exchange_pattern =
- axis2_wsdl_op_set_msg_exchange_pattern;
+ axis2_wsdl_op_set_msg_exchange_pattern;
wsdl_op_impl->wsdl_op.ops->get_msg_exchange_pattern =
- axis2_wsdl_op_get_msg_exchange_pattern;
+ axis2_wsdl_op_get_msg_exchange_pattern;
wsdl_op_impl->wsdl_op.ops->set_qname = axis2_wsdl_op_set_qname;
wsdl_op_impl->wsdl_op.ops->get_qname = axis2_wsdl_op_get_qname;
wsdl_op_impl->wsdl_op.ops->set_style = axis2_wsdl_op_set_style;
@@ -251,7 +245,7 @@
wsdl_op_impl->wsdl_op.ops->add_in_fault = axis2_wsdl_op_add_in_fault;
wsdl_op_impl->wsdl_op.ops->add_out_fault = axis2_wsdl_op_add_out_fault;
- return &(wsdl_op_impl->wsdl_op);
+ return &(wsdl_op_impl->wsdl_op);
}
/******************************************************************************/
@@ -262,7 +256,7 @@
{
axis2_wsdl_op_impl_t *wsdl_op_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
wsdl_op_impl = AXIS2_INTF_TO_IMPL(wsdl_op);
@@ -388,7 +382,7 @@
return AXIS2_FAILURE;
}
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
axis2_char_t * AXIS2_CALL
@@ -423,7 +417,7 @@
return AXIS2_FAILURE;
}
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
axis2_qname_t * AXIS2_CALL
@@ -432,16 +426,15 @@
{
axis2_wsdl_op_t *wsdl_op_l = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
+ AXIS2_ENV_CHECK(env, NULL);
wsdl_op_l = (axis2_wsdl_op_t *) wsdl_op;
- return AXIS2_INTF_TO_IMPL(wsdl_op_l)->name;
+ return AXIS2_INTF_TO_IMPL(wsdl_op_l)->name;
}
axis2_status_t AXIS2_CALL
axis2_wsdl_op_set_style (axis2_wsdl_op_t *wsdl_op,
- axis2_env_t **env,
- axis2_char_t *style)
+ axis2_env_t **env,
+ axis2_char_t *style)
{
axis2_wsdl_op_impl_t *wsdl_op_impl = NULL;
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_property.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_property.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_property.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_property.c Mon Mar 27 21:40:46 2006
@@ -22,11 +22,11 @@
*/
typedef struct axis2_wsdl_property_impl
{
- axis2_wsdl_property_t wsdl_property;
-
+ axis2_wsdl_property_t wsdl_property;
axis2_char_t *name;
void *constraint;
- void *value;
+ void *value;
+
} axis2_wsdl_property_impl_t;
#define AXIS2_INTF_TO_IMPL(wsdl_property) \
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_soap_op.c Mon Mar 27 21:40:46 2006
@@ -22,10 +22,8 @@
*/
typedef struct axis2_wsdl_soap_op_impl
{
- axis2_wsdl_soap_op_t soap_op;
-
+ axis2_wsdl_soap_op_t soap_op;
axis2_char_t *soap_action;
-
axis2_char_t *style;
} axis2_wsdl_soap_op_impl_t;
@@ -36,13 +34,12 @@
/************************* Function prototypes ********************************/
axis2_status_t AXIS2_CALL
- axis2_wsdl_soap_op_free (
- axis2_wsdl_soap_op_t *soap_op,
- axis2_env_t **env);
+axis2_wsdl_soap_op_free (axis2_wsdl_soap_op_t *soap_op,
+ axis2_env_t **env);
axis2_char_t *AXIS2_CALL
axis2_wsdl_soap_op_get_style(axis2_wsdl_soap_op_t *soap_op,
- axis2_env_t **env);
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_wsdl_soap_op_set_style(axis2_wsdl_soap_op_t *soap_op,
@@ -66,12 +63,11 @@
{
axis2_wsdl_soap_op_impl_t *soap_op_impl = NULL;
axis2_qname_t *type_l = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
- soap_op_impl = (axis2_wsdl_soap_op_impl_t *)
- AXIS2_MALLOC((*env)->allocator, sizeof(axis2_wsdl_soap_op_impl_t));
+ AXIS2_ENV_CHECK(env, NULL);
- if(NULL == soap_op_impl)
+ soap_op_impl = (axis2_wsdl_soap_op_impl_t *)
+ AXIS2_MALLOC((*env)->allocator, sizeof(axis2_wsdl_soap_op_impl_t));
+ if(NULL == soap_op_impl)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c Mon Mar 27 21:40:46 2006
@@ -24,14 +24,13 @@
struct axis2_wsdl_svc_impl
{
- axis2_wsdl_svc_t wsdl_svc;
-
+ axis2_wsdl_svc_t wsdl_svc;
/**
* The QName that identifies the Service. This namespace of the QName
* should be the target namespace defined in the Definitions component.
*/
axis2_qname_t *qname;
- /**
+ /**
* The Interface that this Service is an instance of.
*/
axis2_wsdl_interface_t *svc_interface;
@@ -226,27 +225,24 @@
axis2_status_t AXIS2_CALL
axis2_wsdl_svc_set_qname(axis2_wsdl_svc_t *wsdl_svc,
- axis2_env_t **env,
- axis2_qname_t *qname)
+ axis2_env_t **env,
+ axis2_qname_t *qname)
{
- axis2_qname_t *svc_name = NULL;
-
+ axis2_wsdl_svc_impl_t *wsdl_svc_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
-
- svc_name = AXIS2_QNAME_CLONE(qname, env);
- if(NULL == svc_name)
+ wsdl_svc_impl = AXIS2_INTF_TO_IMPL(wsdl_svc);
+
+ if(wsdl_svc_impl->qname)
{
- return AXIS2_FAILURE;
- }
- if(NULL != AXIS2_INTF_TO_IMPL(wsdl_svc)->qname)
+ AXIS2_QNAME_FREE(wsdl_svc_impl->qname, env);
+ wsdl_svc_impl->qname = NULL;
+ }
+ wsdl_svc_impl->qname = AXIS2_QNAME_CLONE(qname, env);
+ if(!wsdl_svc_impl->qname)
{
- AXIS2_QNAME_FREE(AXIS2_INTF_TO_IMPL(wsdl_svc)->qname, env);
- AXIS2_INTF_TO_IMPL(wsdl_svc)->qname = NULL;
- }
-
- AXIS2_INTF_TO_IMPL(wsdl_svc)->qname = svc_name;
-
+ return AXIS2_FAILURE;
+ }
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/samples/client/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/Makefile.am?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/Makefile.am (original)
+++ webservices/axis2/trunk/c/samples/client/Makefile.am Mon Mar 27 21:40:46 2006
@@ -1 +1 @@
-SUBDIRS = echo math addr_echo google echo_non_blocking notify
+SUBDIRS = echo math addr_echo google echo_non_blocking notify dynamic_invocation
Added: webservices/axis2/trunk/c/samples/client/dynamic_invocation/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/dynamic_invocation/Makefile.am?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/samples/client/dynamic_invocation/Makefile.am (added)
+++ webservices/axis2/trunk/c/samples/client/dynamic_invocation/Makefile.am Mon Mar 27 21:40:46 2006
@@ -0,0 +1,28 @@
+prgbindir=$(prefix)/bin/samples
+prgbin_PROGRAMS = dynamic_invocation
+samplesdir=$(prefix)/samples/client/dynamic_invocation
+samples_DATA=di_client.c
+dynamic_invocation_SOURCES = di_client.c
+
+dynamic_invocation_LDADD = \
+ -laxis2_util \
+ -laxis2_om \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -laxis2_parser \
+ -laxis2_unix \
+ -lpthread \
+ -laxis2_soap \
+ -laxis2_http_sender \
+ -laxis2_http_receiver \
+ -laxis2_wom \
+ -laxis2_wsdl4c \
+ -L$(WSDLPULL)/lib \
+ -lschema \
+ -lxmlpull \
+ -lwsdl \
+ $(GUTHTHILA_LIBS) \
+ $(LIBXML2_LIBS)
+
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/platforms
Added: webservices/axis2/trunk/c/samples/client/dynamic_invocation/README
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/dynamic_invocation/README?rev=389403&view=auto
==============================================================================
(empty)
Added: webservices/axis2/trunk/c/samples/client/dynamic_invocation/di_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/dynamic_invocation/di_client.c?rev=389403&view=auto
==============================================================================
--- webservices/axis2/trunk/c/samples/client/dynamic_invocation/di_client.c (added)
+++ webservices/axis2/trunk/c/samples/client/dynamic_invocation/di_client.c Mon Mar 27 21:40:46 2006
@@ -0,0 +1,313 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_call.h>
+#include <axis2_om_stax_builder.h>
+#include <axis2_om_document.h>
+#include <axis2_om_node.h>
+#include <axis2_om_element.h>
+#include <axis2_om_text.h>
+#include <axis2_stream.h>
+#include <axis2_log_default.h>
+#include <axis2_error_default.h>
+#include <axis2_xml_reader.h>
+#include <stdio.h>
+#include <axis2_xml_writer.h>
+#include <axis2_soap_builder.h>
+#include <axis2_soap.h>
+#include <axis2_soap_envelope.h>
+#include <axis2_soap_body.h>
+#include <axis2_soap_header.h>
+#include <axis2_soap_message.h>
+#include <axis2_soap_header_block.h>
+#include <axis2_soap_fault.h>
+#include <axis2_soap_fault_code.h>
+#include <axis2_soap_fault_role.h>
+#include <platforms/axis2_platform_auto_sense.h>
+#include <axis2_wsdl4c_parser.h>
+#include <axis2_wsdl_pump.h>
+#include <axis2_wsdl_desc.h>
+
+#include <axis2_wsdl_ext_soap_address.h>
+#include <axis2_wsdl_ext_soap_op.h>
+
+axis2_om_node_t *
+build_om_programatically(axis2_env_t **env, axis2_char_t *operation,
+ axis2_char_t *param1, axis2_char_t *param2);
+
+int main(int argc, char** argv)
+{
+ axis2_om_node_t *node = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+ axis2_env_t *env = NULL;
+ axis2_error_t *error = NULL;
+ axis2_log_t *log = NULL;
+ axis2_allocator_t *allocator = NULL;
+ axis2_char_t *address = NULL;
+ axis2_char_t *wsa_action = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_om_node_t *ret_node = NULL;
+ axis2_call_t *call = NULL;
+ axis2_msg_ctx_t *msg_ctx = NULL;
+ axis2_mep_client_t *mep_client = NULL;
+ axis2_msg_info_headers_t *msg_info_headers = NULL;
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_conf_t *conf = NULL;
+ axis2_msg_ctx_t *response_ctx = NULL;
+ axis2_char_t *param1 = "40";
+ axis2_char_t *param2 = "8";
+ void *wp = NULL;
+ axis2_wsdl_desc_t *wsdl_desc = NULL;
+ axis2_wsdl_pump_t *wsdl_pump = NULL;
+ axis2_hash_index_t *index = NULL;
+ axis2_hash_t *svcs = NULL;
+ axis2_hash_t *endpoints = NULL;
+ axis2_hash_t *ops = NULL;
+ axis2_hash_t *binding_ops = NULL;
+ void *value = NULL;
+ axis2_wsdl_svc_t *wsdl_svc = NULL;
+ axis2_wsdl_endpoint_t *wsdl_endpoint = NULL;
+ axis2_wsdl_binding_t *wsdl_binding = NULL;
+ axis2_wsdl_binding_op_t *wsdl_binding_op = NULL;
+ axis2_wsdl_interface_t *wsdl_interface = NULL;
+ axis2_wsdl_op_t *wsdl_op = NULL;
+ axis2_svc_t *svc = NULL;
+ axis2_op_t *op = NULL;
+ axis2_qname_t *op_qname = NULL;
+ axis2_char_t *op_name = NULL;
+ axis2_linked_list_t *ext_elements = NULL;
+ axis2_wsdl_ext_soap_address_t *soap_address = NULL;
+ axis2_wsdl_ext_soap_op_t *soap_op = NULL;
+
+ /* set up the envioronment with allocator and log*/
+ allocator = axis2_allocator_init (NULL);
+ error = axis2_error_create(allocator);
+ log = axis2_log_create(allocator, NULL, "addr_echo.log");
+ env = axis2_env_create_with_error_log(allocator, error, log);
+ env->log->level = AXIS2_LOG_LEVEL_TRACE;
+ axis2_error_init();
+
+ /* Set up deploy folder. It is from the deploy folder, the configuration is picked up
+ * using the axis2.xml file.
+ * In this sample client_home points to the Axis2/C default deploy folder. The client_home can
+ * be different from this folder on your system. For example, you may have a different folder
+ *(say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the
+ * modules that the client uses
+ */
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ client_home = "../../deploy";
+
+ if (argc <= 1)
+ {
+ printf("Usage: print <wsdl_File_Name>\n");
+ return 1;
+ }
+ wp = axis2_wsdl4c_parser_create(argv[1], "");
+ wsdl_desc = axis2_wsdl_desc_create(&env);
+ wsdl_pump = axis2_wsdl_pump_create(&env, wsdl_desc, wp);
+ if(!wsdl_pump)
+ {
+ return -1;
+ }
+ status = AXIS2_WSDL_PUMP_PUMP(wsdl_pump, &env);
+ if(AXIS2_SUCCESS != status)
+ {
+ return -1;
+ }
+ svcs = AXIS2_WSDL_DESC_GET_SVCS(wsdl_desc, &env);
+ index = axis2_hash_first (svcs, &env);
+ axis2_hash_this (index, NULL, NULL, &value);
+ wsdl_svc = (axis2_wsdl_svc_t *) value;
+ if(!wsdl_svc)
+ {
+ return -1;
+ }
+ endpoints = AXIS2_WSDL_SVC_GET_ENDPOINTS(wsdl_svc, &env);
+ index = axis2_hash_first (endpoints, &env);
+ axis2_hash_this(index, NULL, NULL, &value);
+ wsdl_endpoint = (axis2_wsdl_endpoint_t *) value;
+ if(!wsdl_endpoint)
+ {
+ return -1;
+ }
+ wsdl_binding = AXIS2_WSDL_ENDPOINT_GET_BINDING(wsdl_endpoint, &env);
+ if(!wsdl_binding)
+ {
+ return -1;
+ }
+ wsdl_interface = AXIS2_WSDL_BINDING_GET_BOUND_INTERFACE(wsdl_binding, &env);
+ if(!wsdl_interface)
+ {
+ return -1;
+ }
+ ops = AXIS2_WSDL_INTERFACE_GET_OPS(wsdl_interface, &env);
+ index = axis2_hash_first (ops, &env);
+ axis2_hash_this(index, NULL, NULL, &value);
+ wsdl_op = (axis2_wsdl_op_t *) value;
+ if(!wsdl_op)
+ {
+ return -1;
+ }
+ op = axis2_op_create_with_wsdl_op(&env, wsdl_op);
+ {
+ return -1;
+ }
+ op_qname = AXIS2_OP_GET_QNAME(op, &env);
+ op_name = AXIS2_QNAME_GET_LOCALPART(op_qname, &env);
+
+ ext_elements = AXIS2_WSDL_COMPONENT_GET_EXTENSIBILITY_ELEMENTS(
+ wsdl_endpoint->wsdl_component, &env);
+ soap_address = AXIS2_LINKED_LIST_GET(ext_elements, &env, 0);
+ if(!soap_address) return -1;
+ address = AXIS2_WSDL_EXT_SOAP_ADDRESS_GET_LOCATION_URI(soap_address, &env);
+ binding_ops = AXIS2_WSDL_BINDING_GET_BINDING_OPS(wsdl_binding, &env);
+ index = axis2_hash_first (binding_ops, &env);
+ axis2_hash_this(index, NULL, NULL, &value);
+ wsdl_binding_op = (axis2_wsdl_binding_op_t *) value;
+ ext_elements = AXIS2_WSDL_COMPONENT_GET_EXTENSIBILITY_ELEMENTS(
+ wsdl_binding_op->extensible_component->wsdl_component, &env);
+ soap_op = AXIS2_LINKED_LIST_GET(ext_elements, &env, 0);
+ wsa_action = AXIS2_WSDL_EXT_SOAP_OP_GET_SOAP_ACTION(soap_op, &env);
+ if (argc > 2 )
+ param1 = argv[2];
+ if (argc > 3 )
+ param2 = argv[3];
+
+ /* build the SOAP request message content using OM API.*/
+ node = build_om_programatically(&env, op_name, param1, param2);
+
+ /* create call struct */
+ call = axis2_call_create(&env, NULL, client_home);
+ mep_client = AXIS2_CALL_GET_BASE(call, &env);
+
+ /* Prepare the SOAP envelope, using the SOAP message content to be sent.
+ * Get a reference to the message context */
+ msg_ctx = AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE(mep_client, &env, node);
+ if (!msg_ctx)
+ {
+ printf("ERROR: Could not prepare message context. ");
+ printf("May be you havent set the repository corretly.\n");
+ return -1;
+ }
+
+ /* Get the reference to message info headers structure from the message context.
+ This can be used to manipulate SOAP header content when using WS-Addressing. */
+ msg_info_headers = AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS(msg_ctx, &env);
+
+ /* create an axis2_endpoint_ref_t struct with ERP assigned */
+ endpoint_ref = axis2_endpoint_ref_create(&env, address);
+
+ /* Set header parameters, required for WS-Addressing.
+ * Required only if you need to make use of WS-Addressing.
+ */
+ AXIS2_MSG_INFO_HEADERS_SET_TO(msg_info_headers, &env, endpoint_ref);
+ AXIS2_MSG_INFO_HEADERS_SET_ACTION(msg_info_headers, &env, wsa_action);
+
+ AXIS2_CALL_SET_TO(call, &env, endpoint_ref);
+
+ /* Get the configuration context */
+ conf = AXIS2_CONF_CTX_GET_CONF(
+ AXIS2_SVC_CTX_GET_CONF_CTX(
+ AXIS2_MEP_CLIENT_GET_SVC_CTX(mep_client, &env),
+ &env),
+ &env);
+
+ svc = axis2_svc_create_with_wsdl_svc(&env, wsdl_svc);
+ /* echo service is not in the configuration context. We need to create the
+ * operation and add it to service context. Then add service context into
+ * configuration context.
+ */
+ AXIS2_SVC_ADD_OP(svc, &env, op);
+ AXIS2_CONF_ADD_SVC(conf, &env, svc);
+
+ /* Invoke the operation. Client blocks until the response message comes.
+ * Response message gets set in the response message context.
+ */
+ response_ctx = AXIS2_CALL_INVOKE_BLOCKING(call, &env, op, msg_ctx);
+
+ if (response_ctx)
+ {
+ /* Get the response SOAP message from response message context */
+ axis2_soap_envelope_t *soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(response_ctx, &env);
+ ret_node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(soap_envelope, &env);
+ }
+
+ if(ret_node)
+ {
+ /* Get the response value from the SOAP message */
+ axis2_xml_writer_t *writer = NULL;
+ axis2_om_output_t *om_output = NULL;
+ axis2_char_t *buffer = NULL;
+
+ printf("\necho stub invoke SUCCESSFUL!\n");
+ writer = axis2_xml_writer_create_for_memory(&env, NULL, AXIS2_TRUE, 0);
+ om_output = axis2_om_output_create (&env, writer);
+
+ AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
+ buffer = AXIS2_XML_WRITER_GET_XML(writer, &env);
+ printf ("\nReceived OM node in XML : %s\n", buffer);
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke failed: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ printf("echo stub invoke failed!\n");
+ }
+
+ if (call)
+ {
+ AXIS2_CALL_FREE(call, &env);
+ }
+ return status;
+}
+
+axis2_om_node_t *
+build_om_programatically(axis2_env_t **env, axis2_char_t *operation,
+ axis2_char_t *param1, axis2_char_t *param2)
+{
+ axis2_om_node_t *math_om_node = NULL;
+ axis2_om_element_t* math_om_ele = NULL;
+ axis2_om_node_t* text_om_node = NULL;
+ axis2_om_element_t * text_om_ele = NULL;
+ axis2_om_namespace_t *ns1 = NULL;
+
+
+ axis2_xml_writer_t *xml_writer = NULL;
+ axis2_om_output_t *om_output = NULL;
+ axis2_char_t *buffer = NULL;
+
+ ns1 = axis2_om_namespace_create (env, "http://localhost:9090/axis2/services/math", "ns1");
+
+ math_om_ele = axis2_om_element_create(env, NULL, operation, ns1, &math_om_node);
+
+ text_om_ele = axis2_om_element_create(env, math_om_node, "param1", NULL, &text_om_node);
+ AXIS2_OM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node);
+
+ text_om_ele = axis2_om_element_create(env, math_om_node, "param2", NULL, &text_om_node);
+ AXIS2_OM_ELEMENT_SET_TEXT(text_om_ele, env, param2, text_om_node);
+
+ xml_writer = axis2_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE);
+ om_output = axis2_om_output_create( env, xml_writer);
+
+ AXIS2_OM_NODE_SERIALIZE(math_om_node, env, om_output);
+ buffer = AXIS2_XML_WRITER_GET_XML(xml_writer, env);
+ AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n", buffer);
+
+ return math_om_node;
+}
+
Modified: webservices/axis2/trunk/c/samples/configure.ac
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/configure.ac?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/configure.ac (original)
+++ webservices/axis2/trunk/c/samples/configure.ac Mon Mar 27 21:40:46 2006
@@ -52,6 +52,7 @@
client/echo/Makefile \
client/math/Makefile \
client/addr_echo/Makefile \
+ client/dynamic_invocation/Makefile \
client/echo_non_blocking/Makefile \
client/notify/Makefile \
client/google/Makefile \
Modified: webservices/axis2/trunk/c/test/resources/wsdl/StockQuotes.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/resources/wsdl/StockQuotes.wsdl?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/resources/wsdl/StockQuotes.wsdl (original)
+++ webservices/axis2/trunk/c/test/resources/wsdl/StockQuotes.wsdl Mon Mar 27 21:40:46 2006
@@ -1,2 +1,48 @@
<?xml version='1.0' encoding='UTF-8'?>
-<definitions name='net.xmethods.services.stockquote.StockQuote' targetNamespace='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/' xmlns:tns='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/' xmlns:electric='http://www.themindelectric.com/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/'><message name='getQuoteResponse1'><part name='Result' type='xsd:float'/></message><message name='getQuoteRequest1'><part name='symbol' type='xsd:string'/></message><portType name='net.xmethods.services.stockquote.StockQuotePortType'><operation name='getQuote' parameterOrder='symbol'><input message='tns:getQuoteRequest1'/><output message='tns:getQuoteResponse1'/></operation></portType><binding name='net.xmethods.services.stockquote.StockQuo
teBinding' type='tns:net.xmethods.services.stockquote.StockQuotePortType'><soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/><operation name='getQuote'><soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/><input><soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/></input><output><soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/></output></operation></binding><service name='net.xmethods.services.stockquote.StockQuoteService'><documentation>net.xmethods.services.stockquote.StockQuote web service</documentation><port name='net.xmethods.services.stockquote.StockQuotePort' binding='tns:net.xmethods.services.stockquote.StockQuoteBinding'><soap:address location='http://64.124.140.30:9090/soap'/></port></service></definitions>
\ No newline at end of file
+<definitions name='net.xmethods.services.stockquote.StockQuote'
+ targetNamespace='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/'
+ xmlns:tns='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/'
+ xmlns:electric='http://www.themindelectric.com/'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+ xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
+ xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+ xmlns='http://schemas.xmlsoap.org/wsdl/'>
+
+<message name='getQuoteResponse1'>
+ <part name='Result' type='xsd:float'/>
+</message>
+<message name='getQuoteRequest1'>
+ <part name='symbol' type='xsd:string'/>
+</message>
+
+<portType name='net.xmethods.services.stockquote.StockQuotePortType'>
+ <operation name='getQuote' parameterOrder='symbol'>
+ <input message='tns:getQuoteRequest1'/>
+ <output message='tns:getQuoteResponse1'/>
+ </operation>
+</portType>
+
+<binding name='net.xmethods.services.stockquote.StockQuoteBinding'
+ type='tns:net.xmethods.services.stockquote.StockQuotePortType'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getQuote'>
+ <soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
+ <input>
+ <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
+ encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
+ </input>
+ <output><soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
+ encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
+ </output>
+ </operation>
+</binding>
+
+<service name='net.xmethods.services.stockquote.StockQuoteService'>
+ <documentation>net.xmethods.services.stockquote.StockQuote web service</documentation>
+ <port name='net.xmethods.services.stockquote.StockQuotePort'
+ binding='tns:net.xmethods.services.stockquote.StockQuoteBinding'>
+ <soap:address location='http://64.124.140.30:9090/soap'/>
+ </port></service>
+
+</definitions>
Modified: webservices/axis2/trunk/c/test/wsdl/builder/print/test_print.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/wsdl/builder/print/test_print.c?rev=389403&r1=389402&r2=389403&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/wsdl/builder/print/test_print.c (original)
+++ webservices/axis2/trunk/c/test/wsdl/builder/print/test_print.c Mon Mar 27 21:40:46 2006
@@ -27,13 +27,13 @@
extern axis2_array_list_t *
axis2_wsdl4c_operation_get_faults(void *operation);
-extern const char *
+extern char *
axis2_wsdl4c_port_type_get_name(void *operation);
-extern const char *
+extern char *
axis2_wsdl4c_operation_get_name(void *operation);
-extern const char *
+extern char *
axis2_wsdl4c_msg_get_name(void *message);
int