axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando" <sen...@wso2.com>
Subject Re: transport sender value is NULL
Date Fri, 22 Feb 2008 06:58:37 GMT
Hi Vivi,

Have you tried starting the simple_axis_server? If not can you please
start it and send a trace of your axis2.log too.

Regards,
Senaka

> Hi All,
>
> I have been experimenting using the AXIS2/c library. I am trying to send
> an XML input and receive back an XML by making a http/soap calls as a
> client. I  I have followed the examples (I think) but I am still getting
> some errors. The log file says something like the following:
> ====================
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *request_uri_based_dispatcher added to the index 0 of the
> phase Transport
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *addressing_based_dispatcher added to the index 1 of the
> phase Transport
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *soap_message_body_based_dispatcher added to the index 0
> of the phase Dispatch
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *soap_action_based_dispatcher added to the index 1 of the
> phase Dispatch
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *dispatch_post_conditions_evaluator added to the index 0
> of the phase PostDispatch
> [Thu Feb 21 22:11:34 2008] [debug] ..\..\src\core\engine\phase.c(122)
> axis2_handler_t *context_handler added to the index 1 of the phase
> PostDispatch
> [Thu Feb 21 22:11:34 2008] [debug]
> ..\..\src\core\deployment\conf_builder.c(233) no custom dispatching order
> found continue with default dispatching order
> [Thu Feb 21 22:11:34 2008] [debug]
> ..\..\src\core\deployment\conf_builder.c(384) module addressing found in
> axis2.xml
> [Thu Feb 21 22:11:34 2008] [error]
> ..\..\src\core\deployment\conf_builder.c(857) transport sender value is
> NULL, unable to continue
> [Thu Feb 21 22:11:34 2008] [error]
> ..\..\src\core\deployment\conf_builder.c(262) conf builder process
> transport senders failed, unable to continue
> [Thu Feb 21 22:11:34 2008] [error]
> ..\..\src\core\deployment\conf_init.c(228) dep engine load failed. conf
> value is NULL
> ==============
>
> I used the axis2.xml that comes with AXIS2 binary package without
> modification, so I think I am using http/soap. Can someone kindly suggest
> what I might do incorrectly? Thanks much.
>
> Vivi
>
> My code is like this:
> =================
> ..........
> axutil_env_t * _env = axutil_env_create_all(log_file.c_str(),
> AXIS2_LOG_LEVEL_DEBUG);
> axiom_xml_reader_t *xml_reader = axiom_xml_reader_create_for_memory(_env,
> (void*)xmlString_in.c_str(), xmlString_in.size(), "utf-8",
> AXIS2_XML_PARSER_TYPE_BUFFER);
> axiom_stax_builder_t *om_builder = axiom_stax_builder_create(_env,
> xml_reader);
> axiom_document_t *document = axiom_stax_builder_get_document(om_builder,
> _env);
> axiom_node_t *root_node = axiom_document_get_root_element(document, _env);
> axiom_document_build_all(document, _env);
>
> string action = "job=TestOrder";
> string operation = "TestOrder";
> const axis2_char_t* endpoint_address =
> http://localhost:8088/WebServices/servlet/webservices?ver=2.0;
>
> const axis2_char_t *client_home = NULL;
> client_home = AXIS2_GETENV("AXIS2_HOME");
> if (!client_home || !strcmp(client_home, ""))
> client_home = "../..";
>
> axis2_svc_client_t *_wsf_service_client = axis2_svc_client_create(_env,
> client_home);
> axis2_endpoint_ref_t *endpoint_ref = axis2_endpoint_ref_create(_env,
> endpoint_address);
>
> /* Setup options */
> axis2_options_t * _options = axis2_options_create(_env);
> axis2_options_set_to(_options, _env, endpoint_ref);
> axis2_options_set_soap_version(_options, _env, AXIOM_SOAP11);
> axis2_options_set_enable_rest(_options, _env, AXIS2_FALSE);
> axis2_status_t status = axis2_svc_client_set_options(_wsf_service_client,
> _env, _options);
>
> axiom_node_t * payload = root_node;
>
> if (axis2_options_get_soap_version(_options, _env) == AXIOM_SOAP11)
> {
>     axutil_string_t * soap_action = axutil_string_create(_env,
> action.c_str());
>     status = axis2_options_set_soap_action(_options, _env, soap_action);
>     axutil_string_free(soap_action, _env);
> }
> else
> {
>     axutil_qname_t * qname = axutil_qname_create(_env,
> AXIS2_MODULE_ADDRESSING, NULL, NULL);
>
>     //If I set the soap version to AXIOM_SOAP12, I will get Access
> voilation in the this statement.
>     axis2_bool_t engaged =
> axis2_svc_is_module_engaged(axis2_svc_client_get_svc(_wsf_service_client,
> _env), _env, qname);
>
>     axutil_qname_free(qname, _env);
>     if (engaged)
>     {
>         status = axis2_options_set_action(_options, _env, action.c_str());
>     }
> }
>
> axiom_node_t * node;
> axutil_qname_t * qname = axutil_qname_create(_env, operation.c_str(), "",
> NULL);
>
> //Here node is return with null (0x00000000)
>  node = axis2_svc_client_send_receive_with_op_qname(_wsf_service_client,
> _env, qname, payload);
>  //node = axis2_svc_client_send_receive(_wsf_service_client, _env,
> payload);
>
> axutil_qname_free(qname, _env);
>
>
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs


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


Mime
View raw message