You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by topcoder1 <to...@gmail.com> on 2007/10/03 03:39:43 UTC
axis2_stub_create_with_endpoint_ref_and_client_home always returns NULL
hi folks, I am new to axis2/c, I try to get the following simple c
client to work, but for some reason
axis2_stub_create_with_endpoint_ref_and_client_home always returns
NULL. The env and endpoint_ref I pass to the function both seem to be
valid. Any idea what the problem might be?
thanks!
axis2_stub_t *stub = NULL;
axis2_endpoint_ref_t *endpoint_ref = NULL;
const axutil_env_t *env = NULL;
const axis2_char_t *endpoint_uri = NULL;
const axis2_char_t *client_home = NULL;
AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
address = "http://localhost:8080/test/services/test";
client_home = AXIS2_GETENV("AXIS2C_HOME");
if (!client_home || !strcmp (client_home, ""))
client_home = "./";
env = axutil_env_create_all("test_client.log", AXIS2_LOG_LEVEL_TRACE);
if (NULL == endpoint_uri)
{
endpoint_uri =
axis2_stub_ReportGenerate_get_endpoint_uri_from_wsdl( env );
}
endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
stub = axis2_stub_create_with_endpoint_ref_and_client_home (
env, endpoint_ref, client_home );//stub is null
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: axis2_stub_create_with_endpoint_ref_and_client_home always returns NULL
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,
It seems the client_home variable is wrong. There you should specify the
axis2 c deploy directory (Where you installed axis2/c). In the code it is
retrieved from AXIS2C_HOME environment variable. So you can set either of
them and test.
Thanks
Dimuthu
On 10/3/07, topcoder1 <to...@gmail.com> wrote:
>
> hi folks, I am new to axis2/c, I try to get the following simple c
> client to work, but for some reason
> axis2_stub_create_with_endpoint_ref_and_client_home always returns
> NULL. The env and endpoint_ref I pass to the function both seem to be
> valid. Any idea what the problem might be?
> thanks!
>
> axis2_stub_t *stub = NULL;
> axis2_endpoint_ref_t *endpoint_ref = NULL;
> const axutil_env_t *env = NULL;
> const axis2_char_t *endpoint_uri = NULL;
> const axis2_char_t *client_home = NULL;
> AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
>
> address = "http://localhost:8080/test/services/test";
>
> client_home = AXIS2_GETENV("AXIS2C_HOME");
> if (!client_home || !strcmp (client_home, ""))
>
> client_home = "./";
>
> env = axutil_env_create_all("test_client.log",
> AXIS2_LOG_LEVEL_TRACE);
>
> if (NULL == endpoint_uri)
> {
> endpoint_uri =
> axis2_stub_ReportGenerate_get_endpoint_uri_from_wsdl( env );
> }
>
> endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
>
> stub = axis2_stub_create_with_endpoint_ref_and_client_home (
> env, endpoint_ref, client_home );//stub is null
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
Re: axis2_stub_create_with_endpoint_ref_and_client_home always returns NULL
Posted by topcoder1 <to...@gmail.com>.
thanks guys, both of you for the pointer, yes that was my problem,
AXIS2C_HOME needs to point to the repo location.
On 10/2/07, Samisa Abeysinghe <sa...@wso2.com> wrote:
> Have you set AXIS2C_HOME environment to point to the repo location?
>
> Samisa...
>
> topcoder1 wrote:
> > hi folks, I am new to axis2/c, I try to get the following simple c
> > client to work, but for some reason
> > axis2_stub_create_with_endpoint_ref_and_client_home always returns
> > NULL. The env and endpoint_ref I pass to the function both seem to be
> > valid. Any idea what the problem might be?
> > thanks!
> >
> > axis2_stub_t *stub = NULL;
> > axis2_endpoint_ref_t *endpoint_ref = NULL;
> > const axutil_env_t *env = NULL;
> > const axis2_char_t *endpoint_uri = NULL;
> > const axis2_char_t *client_home = NULL;
> > AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
> >
> > address = "http://localhost:8080/test/services/test";
> >
> > client_home = AXIS2_GETENV("AXIS2C_HOME");
> > if (!client_home || !strcmp (client_home, ""))
> >
> > client_home = "./";
> >
> > env = axutil_env_create_all("test_client.log", AXIS2_LOG_LEVEL_TRACE);
> >
> > if (NULL == endpoint_uri)
> > {
> > endpoint_uri =
> > axis2_stub_ReportGenerate_get_endpoint_uri_from_wsdl( env );
> > }
> >
> > endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
> >
> > stub = axis2_stub_create_with_endpoint_ref_and_client_home (
> > env, endpoint_ref, client_home );//stub is null
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
> >
>
>
> --
> Samisa Abeysinghe : WSO2 WSF/PHP
> "http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: axis2_stub_create_with_endpoint_ref_and_client_home always returns
NULL
Posted by Samisa Abeysinghe <sa...@wso2.com>.
Have you set AXIS2C_HOME environment to point to the repo location?
Samisa...
topcoder1 wrote:
> hi folks, I am new to axis2/c, I try to get the following simple c
> client to work, but for some reason
> axis2_stub_create_with_endpoint_ref_and_client_home always returns
> NULL. The env and endpoint_ref I pass to the function both seem to be
> valid. Any idea what the problem might be?
> thanks!
>
> axis2_stub_t *stub = NULL;
> axis2_endpoint_ref_t *endpoint_ref = NULL;
> const axutil_env_t *env = NULL;
> const axis2_char_t *endpoint_uri = NULL;
> const axis2_char_t *client_home = NULL;
> AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
>
> address = "http://localhost:8080/test/services/test";
>
> client_home = AXIS2_GETENV("AXIS2C_HOME");
> if (!client_home || !strcmp (client_home, ""))
>
> client_home = "./";
>
> env = axutil_env_create_all("test_client.log", AXIS2_LOG_LEVEL_TRACE);
>
> if (NULL == endpoint_uri)
> {
> endpoint_uri =
> axis2_stub_ReportGenerate_get_endpoint_uri_from_wsdl( env );
> }
>
> endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
>
> stub = axis2_stub_create_with_endpoint_ref_and_client_home (
> env, endpoint_ref, client_home );//stub is null
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
>
--
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org