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 "Dr. Florian Steinborn" <fp...@gmx.de> on 2007/06/23 01:00:12 UTC

[AXIS2C] throwing an exception from the server to the Java-client

Hi folks,

someone has a code piece that shows how to generate an exception in the  
AXIS2C server?

I can see that code was generated , the files are named  
axis2_<function>Fault.[ch.] but I don't know how to use the functions in  
the modules from inside axis2_svc_skel_<service>_invoke() function, where  
the operation is called that has to issue the exception...

Thanks,
Flori

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


Re: [AXIS2C] codegen - SOAPAction

Posted by Mark Nüßler <ma...@9elements.com>.
hello user,

i have createtd the issue AXIS2C-625,
tried to explain step by step - hope this is helpful.

thx derMark


Milinda Pathirage schrieb:
> Hi Mark,
> 
> Can you please create a jira and attach the wsdl. It will be easy to track
> the progress of the solution for this problem. We will look in to this
> problem ASAP.
> 
> On 6/23/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>>
>> Hi Mark,
>>
>> > 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]
>>
>> And this is exactly what I reported here on June 20th (codegen problem).
>>
>> >
>> > 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;
>> > }
>>
>> And this is probably what Milinda suggested...
>>
>>
>> >
>> > with a breakpoint in the invoke method i found out, that the server
>> > didn't reach this method,
> 
> 
> but in my experience axis2/c engine must execute the invoke method. Also
> please attach the your service implementation if possible.
> 
> 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 ?
>>
>> I am sorry - I do not know... I am still thinking about the exception
>> thing from yesterday.... (and can't find a solution...)
>>
>> Flori
> 
> 
> Thanks in advance
> Milinda
> 
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.472 / Virus Database: 269.9.6/863 - Release Date: 23.06.2007 11:08

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


Re: [AXIS2C] codegen - SOAPAction

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi Mark,

Can you please create a jira and attach the wsdl. It will be easy to track
the progress of the solution for this problem. We will look in to this
problem ASAP.

On 6/23/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>
> Hi Mark,
>
> > 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]
>
> And this is exactly what I reported here on June 20th (codegen problem).
>
> >
> > 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;
> > }
>
> And this is probably what Milinda suggested...
>
>
> >
> > with a breakpoint in the invoke method i found out, that the server
> > didn't reach this method,


but in my experience axis2/c engine must execute the invoke method. Also
please attach the your service implementation if possible.

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 ?
>
> I am sorry - I do not know... I am still thinking about the exception
> thing from yesterday.... (and can't find a solution...)
>
> Flori


Thanks in advance
Milinda

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


-- 
milindalakmal@cse.mrt.ac.lk
Department of Computer Science ,
University of Moratuwa,
Sri Lanka.
http://www.milindalakmal.wordpress.com
http://wsaxc.blogspot.com "Web Services with Axis2/C"

Re: [AXIS2C] codegen - SOAPAction

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
Hi Mark,

> 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]

And this is exactly what I reported here on June 20th (codegen problem).

>
> 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;
> }

And this is probably what Milinda suggested...


>
> 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 ?

I am sorry - I do not know... I am still thinking about the exception  
thing from yesterday.... (and can't find a solution...)

Flori

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


Re: [AXIS2C] codegen - SOAPAction

Posted by Mark Nüßler <ma...@9elements.com>.
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
[http://www.ws-i.org/Profiles/BasicProfile-1.1.html
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: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C] throwing an exception from the server to the Java-client

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
Hello experts,

unfortunately Marc replied to my mail with a different contect (at least  
my mailer shows that) - people could tend to thinking my subject is  
answered. Just wanted to say, that it is not. Still do not know how to  
generate the fault from inside the server stubs...

Thanks,
Flori

On Sat, 23 Jun 2007 01:00:12 +0200, Dr. Florian Steinborn <fp...@gmx.de>  
wrote:

> Hi folks,
>
> someone has a code piece that shows how to generate an exception in the  
> AXIS2C server?
>
> I can see that code was generated , the files are named  
> axis2_<function>Fault.[ch.] but I don't know how to use the functions in  
> the modules from inside axis2_svc_skel_<service>_invoke() function,  
> where the operation is called that has to issue the exception...
>
> Thanks,
> Flori
>
> ---------------------------------------------------------------------
> 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