axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Nüßler <>
Subject Re: [AXIS2C] codegen - SOAPAction
Date Sat, 23 Jun 2007 15:37:52 GMT
hello users,

i have a problem, i will try to explain.
background is that i want to generate
c and java for both sides server and client,
that act and react the same way from a wsdl-file.

in WS-I-Basic
3.4.3 SOAPAction HTTP Header]

it says, when you define : <soapbind:operation soapAction="foo" />
in your wsdl, there has to be a field : SOAPAction: "foo"
in the header

my method "foo" doesn't take any input-parameters and sends
back a simple type.

when i generate the java server and client and take a
look with tcpmon i can see this header and the communication
works fine. the env-header, and env-body i both empty.

now i want my generated c-client to call the same
method "foo" at the java-server, but it sends
SOAPAction = "" in the header, so the value is empty
and the server sends back a fault.

in the generated method "axis2_stub_<servicename>_foo"
on c-client side, the following was generated :

soap_action = axis2_options_get_action(options, env);
if (NULL == soap_action)
     soap_action = "foo";
     axis2_options_set_action(options, env, soap_action);

with a breakpoint i found out that the client really
runs the method axis2_options_set_action, so i think
the value of the SOAPAction in the header could be set.
is this thought right ?

otherwise, when my java-client sends the request with the
SOAPAction="foo" in the header, the c-server could not
find the method and replies with the fault :
"Operation Not Found"
[i think this was my problem in the mail from 21.6.2007]

at the c-server side in the method "axis2_svc_skel_<servicename>_invoke"

i implemented the buissness-logic as following :

if (axutil_strcmp(op_name, "foo") == 0)
     ret_val2 = axis2_skel_<servicename>_foo(env);
     ret_node = axis2_DeviceInfo_serialize(ret_val2, env, NULL, 0);
     return ret_node;

with a breakpoint in the invoke method i found out, that the server
didn't reach this method, when calling with the java-client, but the
java-client sends the SOAPAction="foo".

otherwise when i set up a request with SOAPUI 1.7.1 and
send the methodname "foo" as first element in the soap-body,
the c-server response is fine (the breakpoint was reached).

so what do i have to do, to set the SOAPAction accurately ?

mfg derMark

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message