Discussion:
Axis2C 1.5 dynamic invocation
Attila Gulyas
2014-01-15 12:43:44 UTC
Permalink
Dear Axis2C Users,



I've got the task to write a SOAP client which can dynamically invoke services by using their WSDL file as an input. The information I see about Axis2C is quite controversial and I don't know if it is possible.

I did already write a client code which doesn't work. I'm not sure if the problem is with the support of this function, or with myself not interpreting the usage right (I _really_ hope for the latter).



The relevant codepart I wrote (using online resources) - I provide env, service and targetNameSpace as a parameter here:

<code>

//Create the service QName

axutil_qname_t * pWsdl_svc_qname = 0;

pWsdl_svc_qname = axutil_qname_create(env, service,targetNamespace, NULL);



//Parse WSDL

axutil_uri_t * pWsdl_uri = 0;

pWsdl_uri = axutil_uri_parse_string(env,"whois.wsdl");

axis2_conf_ctx_t *config=NULL;



//Create the client

axis2_svc_client_t *client=NULL;

client = axis2_svc_client_create_for_dynamic_invocation(

env, //environment

config, //Pointer to a NULL configuration

pWsdl_uri, //URI of the WSDL

pWsdl_svc_qname, //QName to be created with axutil_qname_create

service,

"C:/AxisRepo");

</code>



Seemingly everything works well until the last step - every pointer is initialized, there are no NULL pointers. When the last call to create the client is executed, the client will be a NULL pointer though.



Where could the problem be, is there no support for dynamic invocation (why wouldn't there be as I have the code to create a client in this manner), or am I doing something very wrong?



Thank you in advance!



Greetings,

Attila
Stadelmann Josef
2014-02-03 11:24:12 UTC
Permalink
Hi Attila,

Are your Axis2C Examples delivered with the kit working?

Josef



Von: Attila Gulyas [mailto:Attila.Gulyas-n9cj+9P9kULqlBn2x/***@public.gmane.org]
Gesendet: Mittwoch, 15. Januar 2014 13:44
An: c-user-r8yd/***@public.gmane.org
Betreff: Axis2C 1.5 dynamic invocation


Dear Axis2C Users,



I've got the task to write a SOAP client which can dynamically invoke services by using their WSDL file as an input. The information I see about Axis2C is quite controversial and I don't know if it is possible.

I did already write a client code which doesn't work. I'm not sure if the problem is with the support of this function, or with myself not interpreting the usage right (I _really_ hope for the latter).



The relevant codepart I wrote (using online resources) - I provide env, service and targetNameSpace as a parameter here:

<code>

//Create the service QName

axutil_qname_t * pWsdl_svc_qname = 0;

pWsdl_svc_qname = axutil_qname_create(env, service,targetNamespace, NULL);



//Parse WSDL

axutil_uri_t * pWsdl_uri = 0;

pWsdl_uri = axutil_uri_parse_string(env,"whois.wsdl");

axis2_conf_ctx_t *config=NULL;



//Create the client

axis2_svc_client_t *client=NULL;

client = axis2_svc_client_create_for_dynamic_invocation(

env, //environment

config, //Pointer to a NULL configuration

pWsdl_uri, //URI of the WSDL

pWsdl_svc_qname, //QName to be created with axutil_qname_create

service,

"C:/AxisRepo");

</code>



Seemingly everything works well until the last step - every pointer is initialized, there are no NULL pointers. When the last call to create the client is executed, the client will be a NULL pointer though.



Where could the problem be, is there no support for dynamic invocation (why wouldn't there be as I have the code to create a client in this manner), or am I doing something very wrong?



Thank you in advance!



Greetings,

Attila

Loading...