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 Michael Mole <mj...@us.ibm.com> on 2007/10/31 20:23:56 UTC
Axis2C: WSDL2C not properly handling attributes
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Re: Axis2C: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
On 11/1/07, Dimuthu Gamage <di...@gmail.com> wrote:
>
> Hi Michael,
> This problem was there for sometime back. And I thought I fixed it. May be
> it is not for all the cases.
> I m attaching the testcase I used to test attribute.
>
> WSDL: case2/res/Adder4.wsdl
> Generated stub code: case2/stub
> Generated skel code: case2/skel
>
> And if you find your generated code is different, please try with the
> latest snapshot. http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
>
The path of the snapshot should be corrected to
http://people.apache.org/dist/axis2/nightly/distribution-SNAPSHOT-bin.zip
Thanks
Dimuthu
Thanks
> Dimuthu
>
> On 11/1/07, Michael Mole <mj...@us.ibm.com> wrote:
> >
> >
> > I have an xsd that defines a complex type with an attribute. When I
> > generate adb databindings using WSDL2C, the generated serialize method will
> > crash when I run it. It appears that this is because the attribute is added
> > using a call to axiom_element_add_attribute. However, the element
> > being passed to axiom_element_add_attribute is of type axutil_stream_t,
> > and the element tags had already been written anyway using
> > axutil_stream_write.
> >
> > I can't imagine that I'm the first one to try to use adb_bindings with
> > an element that has an attribute. Has anyone else ever run into a problem
> > like this or been successful? Should I raise a JIRA?
> >
> >
> > Thanks,
> > Mike
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710
>
>
>
>
Re: Axis2C: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
Yes, I still see the problem when using Adder.wsdl. See below for an
example serialize method. Also, how do I update woden.jar? I'm working
with an axis2java snapshot from last week that I think has the most recent
version of woden. Or, am I missing something?
axiom_node_t* AXIS2_CALL
adb_matrixAddResponse_serialize(
adb_matrixAddResponse_t* _matrixAddResponse,
const axutil_env_t *env, axiom_node_t* parent, int
parent_tag_closed)
{
axiom_namespace_t *ns1 = NULL;
axis2_char_t text_value_1[64];
axiom_node_t *current_node = NULL;
axiom_element_t *current_element = NULL;
axis2_char_t *start_input_str = NULL;
axis2_char_t *end_input_str = NULL;
unsigned int start_input_str_len = 0;
unsigned int end_input_str_len = 0;
axiom_data_source_t *data_source = NULL;
axutil_stream_t *stream = NULL;
AXIS2_ENV_CHECK(env, NULL);
ns1 = axiom_namespace_create (env,
"http://ws.apache.org/axis2",
"ns3");
current_element = axiom_element_create (env, NULL,
"matrixAddResponse", ns1 , ¤t_node);
axiom_element_set_namespace(current_element, env, ns1,
current_node);
ns1 = axiom_namespace_create (env,
"http://ws.apache.org/axis2/xsd",
"ns1");
axiom_element_declare_namespace(current_element, env,
current_node, ns1);
parent = current_node;
data_source = axiom_data_source_create(env, parent,
¤t_node);
stream = axiom_data_source_get_stream(data_source,
env);
/*
* parsing return element
*/
start_input_str = "<ns3:return
xmlns:ns1=\"http://ws.apache.org/axis2/xsd\"";
start_input_str_len =
axutil_strlen(start_input_str);
end_input_str = "</ns3:return>";
end_input_str_len = axutil_strlen(end_input_str);
axutil_stream_write(stream, env,
start_input_str, start_input_str_len);
adb_Matrix_serialize(_matrixAddResponse->property_return,
env, current_node,
AXIS2_FALSE
);
axutil_stream_write(stream, env,
end_input_str, end_input_str_len);
return parent;
}
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/06/2007 03:46 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi,
With my wsdls I didnt found such a problem:(. For now please try generate
with the Adder.wsdl in the case2.tar.gz that I sent earlier and check
whether the same issue exist. If so it s better to update woden jar and
try.
Thanks
Dimuthu
On 11/5/07, Michael Mole <mj...@us.ibm.com> wrote:
Hey Dimuthu,
My WSDL does specify a soapAction. Also, this was working until I moved
to the nightly snapshot from last week.
My WSDL looks something like this:
<operation name="foo">
<soap:operation soapAction="http://ibm.com/foo"/>
<input>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
<fault name="fault">
<soap:fault name="fault" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</fault>
</operation>
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/02/2007 10:10 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't
exist. E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or
soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
headers in the soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole < mjmole@us.ibm.com> wrote:
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <dimuthuc@gmail.com >
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mjmole@us.ibm.com > wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,
With my wsdls I didnt found such a problem:(. For now please try generate
with the Adder.wsdl in the case2.tar.gz that I sent earlier and check
whether the same issue exist. If so it s better to update woden jar and try.
Thanks
Dimuthu
On 11/5/07, Michael Mole <mj...@us.ibm.com> wrote:
>
>
> Hey Dimuthu,
>
> My WSDL does specify a soapAction. Also, this was working until I moved
> to the nightly snapshot from last week.
>
> My WSDL looks something like this:
> <operation name="foo">
> <soap:operation soapAction="http://ibm.com/foo"/>
> <input>
> <soap:body parts="body" use="literal"
> namespace="http://ibm.com/fooservice"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output>
> <soap:body parts="body" use="literal"
> namespace="http://ibm.com/fooservice"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> <fault name="fault">
> <soap:fault name="fault" use="literal"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </fault>
> </operation>
>
> Thanks again,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
>
> *"Dimuthu Gamage" <di...@gmail.com>*
>
> 11/02/2007 10:10 PM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
> Hi Michael,
> This happens when the soapAction in the WSDL is empty or just doesn't
> exist. E.g. <soap:operation soapAction="" style="document"/>
>
> In this case it doesnt matter either the soap_action = "\"\"" or
> soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
> headers in the soap request. So I think it is not a bug:).
>
>
> Thanks
> Dimuthu
>
> On 11/3/07, *Michael Mole* <* mjmole@us.ibm.com* <mj...@us.ibm.com>>
> wrote:
>
> Hey Dimuthu,
>
> One other thing I'm noticing now is that the soap_action in my method
> stubs is being set to "\"\"". Is this something specific to the snapshot
> I downloaded or is this a new bug?
>
> Here is a slightly modified listing of one of my method stubs:
> /**
> * auto generated method signature
> * for "foo|[DELETED]" operation.
> * @param foo
> * @return
> */
>
> adb_fooResponse_t* axis2_stub_FooService_foo(
> axis2_stub_t *stub, const axutil_env_t *env,
> adb_foo_t* foo)
> {
> axis2_svc_client_t *svc_client = NULL;
> axis2_options_t *options = NULL;
> axiom_node_t *ret_node = NULL;
>
> const axis2_char_t *soap_action = NULL;
> axutil_qname_t *op_qname = NULL;
> axiom_node_t *payload = NULL;
> axis2_bool_t is_soap_act_set = AXIS2_TRUE;
>
> axutil_string_t *soap_act = NULL;
>
> adb_fooResponse_t* ret_val = NULL;
>
> payload = adb_foo_serialize(foo, env, NULL,
> AXIS2_TRUE);
>
>
>
> options = axis2_stub_get_options( stub, env);
> if ( NULL == options )
> {
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
> stub: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> return NULL;
> }
> svc_client = axis2_stub_get_svc_client(stub, env );
> soap_action = axis2_options_get_action( options, env );
> if (NULL == soap_action)
> {
> is_soap_act_set = AXIS2_FALSE;
> soap_action = "\"\"";
>
> soap_act = axutil_string_create(env, "\"\"");
> axis2_options_set_soap_action(options, env, soap_act);
>
> axis2_options_set_action( options, env, soap_action );
> }
>
> axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
>
> op_qname = axutil_qname_create(env,
> "foo" ,
> "[DELETED]",
> NULL);
> ret_node = axis2_svc_client_send_receive_with_op_qname(
> svc_client, env, op_qname, payload);
>
> if (!is_soap_act_set)
> {
>
> axis2_options_set_soap_action(options, env, NULL);
>
> axis2_options_set_action( options, env, NULL);
> }
>
>
> if ( NULL == ret_node )
> {
> return NULL;
> }
> ret_val = adb_execute_foo_create(env);
>
> adb_execute_foo_deserialize(ret_val, env, ret_node );
> return ret_val;
>
> }
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
> *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/02/2007 04:04 PM
>
>
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> You are right. I was using the 1.3 release version, but the latest
> snapshot has resolved this issue.
>
> Thanks!
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> *"Dimuthu Gamage" <**dimuthuc@gmail.com* <di...@gmail.com>*>*
>
> 11/01/2007 12:11 AM
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
> ***********************
> Warning: Your file, case2.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
>
> Hi Michael,
> This problem was there for sometime back. And I thought I fixed it. May be
> it is not for all the cases.
> I m attaching the testcase I used to test attribute.
>
> WSDL: case2/res/Adder4.wsdl
> Generated stub code: case2/stub
> Generated skel code: case2/skel
>
> And if you find your generated code is different, please try with the
> latest snapshot. *http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
> * <http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip>
>
> Thanks
> Dimuthu
>
> On 11/1/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com> >
> wrote:
>
> I have an xsd that defines a complex type with an attribute. When I
> generate adb databindings using WSDL2C, the generated serialize method will
> crash when I run it. It appears that this is because the attribute is added
> using a call to axiom_element_add_attribute. However, the element being
> passed to axiom_element_add_attribute is of type axutil_stream_t, and the
> element tags had already been written anyway using axutil_stream_write.
>
> I can't imagine that I'm the first one to try to use adb_bindings with an
> element that has an attribute. Has anyone else ever run into a problem like
> this or been successful? Should I raise a JIRA?
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> [attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: *axis-c-user-unsubscribe@ws.apache.org*<ax...@ws.apache.org>
> For additional commands, e-mail: *axis-c-user-help@ws.apache.org*<ax...@ws.apache.org>
>
>
Re: Axis2C: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
That's it! Thanks so much.
- Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/09/2007 03:34 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi,
Well that was a bug specific to C code generation, and fixed it in the
java svn. (Thanks to Amila)
I think the problem happened when a operation in the imported wsdl is
mapped to the binding,
Thanks
Dimuthu
On Nov 9, 2007 5:31 AM, Michael Mole <mj...@us.ibm.com> wrote:
***********************
Warning: Your file, sample.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hey Dimuthu,
I tried using your wsdl, and I'm also able to properly generate the
source, so I guess it must be something else about my WSDL that is causing
this strange behavior.
Let me be more specific about what I have. I have 3 files. I have a
"fooservice.wsdl" that defines a binding and a service. I have a
"foo.wsdl" with a set of definitions. Finally I have a foo.xsd that
defines all of my data types.
Any thoughts?
They look something like this:
fooservice.wsdl
<?xml version="1.0" ?>
- <definitions name="Foo" targetNamespace="http://.ibm.com/fooservice"
xmlns:WS="http://ibm.com/fooservice" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/ " xmlns:WSP="http://ibm.com/foodefs"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<import namespace="http://ibm.com/foodefs " location="foo.wsdl" />
- <binding name="FooBinding" type="WSP:Foo">
<soap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http" />
- <operation name="foo">
<documentation>Perform a foo</documentation>
<soap:operation soapAction="http://ibm.com/foo " />
- <input>
<soap:body parts="body" use="literal" namespace="
http://ibm.com/fooservice" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/ " />
</input>
- <output>
<soap:body parts="body" use="literal" namespace="
http://ibm.com/fooservice" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/ " />
</output>
- <fault name="fault">
<soap:fault name="fault" use="literal" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/ " />
</fault>
</operation>
</binding>
- <service name="FooService">
- <port name="Foo" binding="WS:FooBinding">
<soap:address location="http://localhost:9080/Foo " />
</port>
</service>
</definitions>
Foo.wsdl looks like this:
<?xml version="1.0" ?>
- <definitions name="Foo" targetNamespace="http://ibm.com/foodefs"
xmlns:WSP="http://ibm.com/foodefs" xmlns:WSX="http://ibm.com/schema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:xsd="
http://www.w3.org/2001/XMLSchema " xmlns="http://schemas.xmlsoap.org/wsdl/
">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://ibm.com/schema " schemaLocation="foo.xsd" />
</schema>
</types>
- <message name="error-fault">
<part name="fault" element="WSX:error-fault" />
</message>
- <message name="foo-request">
<part name="body" type="WSX:FooRequest" />
</message>
- <message name="foo-response">
<part name="body" type="WSX:FooResponse" />
</message>
- <portType name="Foo">
- <operation name="foo">
<documentation>Do a foo</documentation>
<input message="WSP:foo-request" />
<output message="WSP:foo-response" />
<fault name="fault" message="WSP:error-fault" />
</operation>
</portType>
</definitions>
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/06/2007 11:00 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, sample.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
I also try checking out the snaphost - SNAPSHOT Built on : Nov 06, 2007
(12:46:42 GMT+00:00) and it was generating soap action correctly!. I made
sure I dont have anything other than the *.jars in my CLASSPATH. I m
using Sun Java - Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
The generated code for RPC/lit and DOC/lit is attached here. They both
have soap action correctly, so It is not a problem specific to RPC wsdls!
You better checkout whether there are old jars in your classpath.
Thanks
Dimuthu
On 11/7/07, Michael Mole <mj...@us.ibm.com> wrote:
I switched back to the official 1.3 release, and the soapAction strings
were generated properly. I then downloaded the nightly snapshot from
today, and again, it was producing "\"\"" intead of the soapAction string.
This appears to be a regression.
I also tried doing the same thing on the Adder4.wsdl, but there were no
problems in either case. I wonder if that has something to do with the
fact that I'm using style="rpc", not style="document"?
- Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/05/2007 09:19 AM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
My WSDL does specify a soapAction. Also, this was working until I moved
to the nightly snapshot from last week.
My WSDL looks something like this:
<operation name="foo">
<soap:operation soapAction="http://ibm.com/foo"/>
<input>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "/>
</input>
<output>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "/>
</output>
<fault name="fault">
<soap:fault name="fault" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "/>
</fault>
</operation>
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/02/2007 10:10 PM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't
exist. E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or
soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
headers in the soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole < mjmole@us.ibm.com> wrote:
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <dimuthuc@gmail.com >
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mjmole@us.ibm.com > wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,
Well that was a bug specific to C code generation, and fixed it in the java
svn. (Thanks to Amila)
I think the problem happened when a operation in the imported wsdl is mapped
to the binding,
Thanks
Dimuthu
On Nov 9, 2007 5:31 AM, Michael Mole <mj...@us.ibm.com> wrote:
> ***********************
> Warning: Your file, sample.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
>
> Hey Dimuthu,
>
> I tried using your wsdl, and I'm also able to properly generate the
> source, so I guess it must be something else about my WSDL that is causing
> this strange behavior.
>
> Let me be more specific about what I have. I have 3 files. I have a "
> fooservice.wsdl" that defines a binding and a service. I have a "foo.wsdl"
> with a set of definitions. Finally I have a foo.xsd that defines all of
> my data types.
>
> Any thoughts?
>
> They look something like this:
> fooservice.wsdl
> * * <?xml version="1.0" ?>
> *-* <definitions name="Foo" targetNamespace="*http://.ibm.com/fooservice*"xmlns:WS
> ="*http://ibm.com/fooservice*" xmlns:soap="*
> http://schemas.xmlsoap.org/wsdl/soap/*" xmlns:mime="*
> http://schemas.xmlsoap.org/wsdl/mime/*" xmlns:WSP="*http://ibm.com/foodefs
> *" xmlns="*http://schemas.xmlsoap.org/wsdl/*">
> * * <import namespace="*http://ibm.com/foodefs*" location="*foo.wsdl*" />
> *-* <binding name="*FooBinding*" type="*WSP:Foo*">
> * * <soap:binding style="*rpc*" transport="*
> http://schemas.xmlsoap.org/soap/http*" />
> *-* <operation name="*foo*">
> * * <documentation>*Perform a foo*</documentation>
> * * <soap:operation soapAction="*http://ibm.com/foo*" />
> *-* <input>
> * * <soap:body parts="*body*" use="*literal*" namespace="*
> http://ibm.com/fooservice*" encodingStyle="*
> http://schemas.xmlsoap.org/soap/encoding/*" />
> * * </input>
> *-* <output>
> * * <soap:body parts="*body*" use="*literal*" namespace="*
> http://ibm.com/fooservice*" encodingStyle="*
> http://schemas.xmlsoap.org/soap/encoding/*" />
> * * </output>
> *-* <fault name="*fault*">
> * * <soap:fault name="*fault*" use="*literal*" encodingStyle="*
> http://schemas.xmlsoap.org/soap/encoding/*" />
> * * </fault>
> * * </operation>
> * * </binding>
> *-* <service name="*FooService*">
> *-* <port name="*Foo*" binding="*WS:FooBinding*">
> * * <soap:address location="*http://localhost:9080/Foo*" />
> * * </port>
> * * </service>
> * * </definitions>
>
> Foo.wsdl looks like this:
> * * <?xml version="1.0" ?>
> *-* <definitions name="*Foo*" targetNamespace="*http://ibm.com/foodefs*"xmlns:WSP
> ="*http://ibm.com/foodefs*" xmlns:WSX="*http://ibm.com/schema*" xmlns:soap
> ="*http://schemas.xmlsoap.org/wsdl/soap/*" xmlns:xsd="*
> http://www.w3.org/2001/XMLSchema*" xmlns="*
> http://schemas.xmlsoap.org/wsdl/*">
> *-* <types>
> *-* <schema xmlns="*http://www.w3.org/2001/XMLSchema*">
> * * <import namespace="*http://ibm.com/schema*" schemaLocation="*foo.xsd*"
> />
> * * </schema>
> * * </types>
> *-* <message name="*error-fault*">
> * * <part name="*fault*" element="*WSX:error-fault*" />
> * * </message>
> *-* <message name="*foo-request*">
> * * <part name="*body*" type="*WSX:FooRequest*" />
> * * </message>
> *-* <message name="*foo-response*">
> * * <part name="*body*" type="*WSX:FooResponse*" />
> * * </message>
> *-* <portType name="*Foo*">
> *-* <operation name="*foo*">
> * * <documentation>*Do a foo*</documentation>
> * * <input message="*WSP:foo-request*" />
> * * <output message="*WSP:foo-response*" />
> * * <fault name="*fault*" message="*WSP:error-fault*" />
> * * </operation>
> * * </portType>
> * * </definitions>
>
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
>
> *"Dimuthu Gamage" <di...@gmail.com>*
>
> 11/06/2007 11:00 PM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
> ***********************
> Warning: Your file, sample.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
> Hi Michael,
> I also try checking out the snaphost - SNAPSHOT Built on : Nov 06, 2007
> (12:46:42 GMT+00:00) and it was generating soap action correctly!. I made
> sure I dont have anything other than the *.jars in my CLASSPATH. I m using
> Sun Java - Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
>
> The generated code for RPC/lit and DOC/lit is attached here. They both
> have soap action correctly, so It is not a problem specific to RPC wsdls!
>
> You better checkout whether there are old jars in your classpath.
>
> Thanks
> Dimuthu
>
> On 11/7/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com>>
> wrote:
>
> I switched back to the official 1.3 release, and the soapAction strings
> were generated properly. I then downloaded the nightly snapshot from today,
> and again, it was producing "\"\"" intead of the soapAction string. This
> appears to be a regression.
>
> I also tried doing the same thing on the Adder4.wsdl, but there were no
> problems in either case. I wonder if that has something to do with the fact
> that I'm using style="rpc", not style="document"?
>
> - Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
> *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/05/2007 09:19 AM
>
>
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> My WSDL does specify a soapAction. Also, this was working until I moved
> to the nightly snapshot from last week.
>
> My WSDL looks something like this:
> <operation name="foo">
> <soap:operation soapAction="*http://ibm.com/foo* <http://ibm.com/foo>
> "/>
> <input>
> <soap:body parts="body" use="literal"
> namespace="*http://ibm.com/fooservice*<http://ibm.com/fooservice>
> "
> encodingStyle="*http://schemas.xmlsoap.org/soap/encoding/*<http://schemas.xmlsoap.org/soap/encoding/>
> "/>
> </input>
> <output>
> <soap:body parts="body" use="literal"
> namespace="*http://ibm.com/fooservice*<http://ibm.com/fooservice>
> "
> encodingStyle="*http://schemas.xmlsoap.org/soap/encoding/*<http://schemas.xmlsoap.org/soap/encoding/>
> "/>
> </output>
> <fault name="fault">
> <soap:fault name="fault" use="literal"
> encodingStyle="*http://schemas.xmlsoap.org/soap/encoding/*<http://schemas.xmlsoap.org/soap/encoding/>
> "/>
> </fault>
> </operation>
>
> Thanks again,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> *"Dimuthu Gamage" <**dimuthuc@gmail.com* <di...@gmail.com>*>*
>
> 11/02/2007 10:10 PM
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
> Hi Michael,
> This happens when the soapAction in the WSDL is empty or just doesn't
> exist. E.g. <soap:operation soapAction="" style="document"/>
>
> In this case it doesnt matter either the soap_action = "\"\"" or
> soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
> headers in the soap request. So I think it is not a bug:).
>
>
> Thanks
> Dimuthu
>
> On 11/3/07, *Michael Mole* <* mjmole@us.ibm.com* <mj...@us.ibm.com>>
> wrote:
>
> Hey Dimuthu,
>
> One other thing I'm noticing now is that the soap_action in my method
> stubs is being set to "\"\"". Is this something specific to the snapshot
> I downloaded or is this a new bug?
>
> Here is a slightly modified listing of one of my method stubs:
> /**
> * auto generated method signature
> * for "foo|[DELETED]" operation.
> * @param foo
> * @return
> */
>
> adb_fooResponse_t* axis2_stub_FooService_foo(
> axis2_stub_t *stub, const axutil_env_t *env,
> adb_foo_t* foo)
> {
> axis2_svc_client_t *svc_client = NULL;
> axis2_options_t *options = NULL;
> axiom_node_t *ret_node = NULL;
>
> const axis2_char_t *soap_action = NULL;
> axutil_qname_t *op_qname = NULL;
> axiom_node_t *payload = NULL;
> axis2_bool_t is_soap_act_set = AXIS2_TRUE;
>
> axutil_string_t *soap_act = NULL;
>
> adb_fooResponse_t* ret_val = NULL;
>
> payload = adb_foo_serialize(foo, env, NULL,
> AXIS2_TRUE);
>
>
>
> options = axis2_stub_get_options( stub, env);
> if ( NULL == options )
> {
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
> stub: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> return NULL;
> }
> svc_client = axis2_stub_get_svc_client(stub, env );
> soap_action = axis2_options_get_action( options, env );
> if (NULL == soap_action)
> {
> is_soap_act_set = AXIS2_FALSE;
> soap_action = "\"\"";
>
> soap_act = axutil_string_create(env, "\"\"");
> axis2_options_set_soap_action(options, env, soap_act);
>
> axis2_options_set_action( options, env, soap_action );
> }
>
> axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
>
> op_qname = axutil_qname_create(env,
> "foo" ,
> "[DELETED]",
> NULL);
> ret_node = axis2_svc_client_send_receive_with_op_qname(
> svc_client, env, op_qname, payload);
>
> if (!is_soap_act_set)
> {
>
> axis2_options_set_soap_action(options, env, NULL);
>
> axis2_options_set_action( options, env, NULL);
> }
>
>
> if ( NULL == ret_node )
> {
> return NULL;
> }
> ret_val = adb_execute_foo_create(env);
>
> adb_execute_foo_deserialize(ret_val, env, ret_node );
> return ret_val;
>
> }
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710 *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/02/2007 04:04 PM
>
>
> Please respond to
> "Apache AXIS C User List" <*axis-c-user@ws.apache.org *<ax...@ws.apache.org>
> >
>
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>>
> cc
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> You are right. I was using the 1.3 release version, but the latest
> snapshot has resolved this issue.
>
> Thanks!
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710 *"Dimuthu Gamage" <**...@gmail.com>
> *>*
>
> 11/01/2007 12:11 AM
> Please respond to
> "Apache AXIS C User List" <*axis-c-user@ws.apache.org *<ax...@ws.apache.org>
> >
>
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>>
> cc
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
> ***********************
> Warning: Your file, case2.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
>
>
>
> Hi Michael,
> This problem was there for sometime back. And I thought I fixed it. May be
> it is not for all the cases.
> I m attaching the testcase I used to test attribute.
>
> WSDL: case2/res/Adder4.wsdl
> Generated stub code: case2/stub
> Generated skel code: case2/skel
>
> And if you find your generated code is different, please try with the
> latest snapshot. *http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
> * <http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip>
>
> Thanks
> Dimuthu
>
> On 11/1/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com> >
> wrote:
>
> I have an xsd that defines a complex type with an attribute. When I
> generate adb databindings using WSDL2C, the generated serialize method will
> crash when I run it. It appears that this is because the attribute is added
> using a call to axiom_element_add_attribute. However, the element being
> passed to axiom_element_add_attribute is of type axutil_stream_t, and the
> element tags had already been written anyway using axutil_stream_write.
>
> I can't imagine that I'm the first one to try to use adb_bindings with an
> element that has an attribute. Has anyone else ever run into a problem like
> this or been successful? Should I raise a JIRA?
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> [attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: *axis-c-user-unsubscribe@ws.apache.org *<ax...@ws.apache.org>
> For additional commands, e-mail: *axis-c-user-help@ws.apache.org *<ax...@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
>
> ---------------------------------------------------------------------
> 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: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
***********************
Warning: Your file, sample.tar.gz, contains more than 32 files after decompression and cannot be scanned.
***********************
Hey Dimuthu,
I tried using your wsdl, and I'm also able to properly generate the
source, so I guess it must be something else about my WSDL that is causing
this strange behavior.
Let me be more specific about what I have. I have 3 files. I have a
"fooservice.wsdl" that defines a binding and a service. I have a
"foo.wsdl" with a set of definitions. Finally I have a foo.xsd that
defines all of my data types.
Any thoughts?
They look something like this:
fooservice.wsdl
<?xml version="1.0" ?>
- <definitions name="Foo" targetNamespace="http://.ibm.com/fooservice"
xmlns:WS="http://ibm.com/fooservice" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" xmlns:WSP="http://ibm.com/foodefs"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<import namespace="http://ibm.com/foodefs" location="foo.wsdl" />
- <binding name="FooBinding" type="WSP:Foo">
<soap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http" />
- <operation name="foo">
<documentation>Perform a foo</documentation>
<soap:operation soapAction="http://ibm.com/foo" />
- <input>
<soap:body parts="body" use="literal" namespace="
http://ibm.com/fooservice" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" />
</input>
- <output>
<soap:body parts="body" use="literal" namespace="
http://ibm.com/fooservice" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" />
</output>
- <fault name="fault">
<soap:fault name="fault" use="literal" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" />
</fault>
</operation>
</binding>
- <service name="FooService">
- <port name="Foo" binding="WS:FooBinding">
<soap:address location="http://localhost:9080/Foo" />
</port>
</service>
</definitions>
Foo.wsdl looks like this:
<?xml version="1.0" ?>
- <definitions name="Foo" targetNamespace="http://ibm.com/foodefs"
xmlns:WSP="http://ibm.com/foodefs" xmlns:WSX="http://ibm.com/schema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/
">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://ibm.com/schema" schemaLocation="foo.xsd" />
</schema>
</types>
- <message name="error-fault">
<part name="fault" element="WSX:error-fault" />
</message>
- <message name="foo-request">
<part name="body" type="WSX:FooRequest" />
</message>
- <message name="foo-response">
<part name="body" type="WSX:FooResponse" />
</message>
- <portType name="Foo">
- <operation name="foo">
<documentation>Do a foo</documentation>
<input message="WSP:foo-request" />
<output message="WSP:foo-response" />
<fault name="fault" message="WSP:error-fault" />
</operation>
</portType>
</definitions>
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/06/2007 11:00 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, sample.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
I also try checking out the snaphost - SNAPSHOT Built on : Nov 06, 2007
(12:46:42 GMT+00:00) and it was generating soap action correctly!. I made
sure I dont have anything other than the *.jars in my CLASSPATH. I m
using Sun Java - Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
The generated code for RPC/lit and DOC/lit is attached here. They both
have soap action correctly, so It is not a problem specific to RPC wsdls!
You better checkout whether there are old jars in your classpath.
Thanks
Dimuthu
On 11/7/07, Michael Mole <mj...@us.ibm.com> wrote:
I switched back to the official 1.3 release, and the soapAction strings
were generated properly. I then downloaded the nightly snapshot from
today, and again, it was producing "\"\"" intead of the soapAction string.
This appears to be a regression.
I also tried doing the same thing on the Adder4.wsdl, but there were no
problems in either case. I wonder if that has something to do with the
fact that I'm using style="rpc", not style="document"?
- Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/05/2007 09:19 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
My WSDL does specify a soapAction. Also, this was working until I moved
to the nightly snapshot from last week.
My WSDL looks something like this:
<operation name="foo">
<soap:operation soapAction="http://ibm.com/foo"/>
<input>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
<fault name="fault">
<soap:fault name="fault" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</fault>
</operation>
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/02/2007 10:10 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't
exist. E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or
soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
headers in the soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole < mjmole@us.ibm.com> wrote:
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <dimuthuc@gmail.com >
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
To
"Apache AXIS C User List" <axis-c-user@ws.apache.org >
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mjmole@us.ibm.com > wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: Axis2C: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
On 11/7/07, Dimuthu Gamage <di...@gmail.com> wrote:
>
> Hi Michael,
> I also try checking out the snaphost - SNAPSHOT Built on : Nov 06, 2007
> (12:46:42 GMT+00:00) and it was generating soap action correctly!. I made
> sure I dont have anything other than the *.jars in my CLASSPATH. I m using
> Sun Java - Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Correction. I made sure I dont have anything other than the *.jars of the
snapshot in my CLASSPATH.
Thanks
Dimuthu
The generated code for RPC/lit and DOC/lit is attached here. They both have
> soap action correctly, so It is not a problem specific to RPC wsdls!
>
> You better checkout whether there are old jars in your classpath.
>
> Thanks
> Dimuthu
>
> On 11/7/07, Michael Mole <mj...@us.ibm.com> wrote:
> >
> >
> > I switched back to the official 1.3 release, and the soapAction strings
> > were generated properly. I then downloaded the nightly snapshot from today,
> > and again, it was producing "\"\"" intead of the soapAction string. This
> > appears to be a regression.
> >
> > I also tried doing the same thing on the Adder4.wsdl, but there were no
> > problems in either case. I wonder if that has something to do with the fact
> > that I'm using style="rpc", not style="document"?
> >
> > - Mike
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710
> >
> >
> > *Michael Mole/Lexington/IBM@IBMUS*
> >
> > 11/05/2007 09:19 AM
> > Please respond to
> > "Apache AXIS C User List" <ax...@ws.apache.org>
> >
> > To
> > "Apache AXIS C User List" <ax...@ws.apache.org> cc
> >
> > Subject
> > Re: Axis2C: WSDL2C not properly handling attributes
> >
> >
> >
> >
> >
> >
> >
> > Hey Dimuthu,
> >
> > My WSDL does specify a soapAction. Also, this was working until I moved
> > to the nightly snapshot from last week.
> >
> > My WSDL looks something like this:
> > <operation name="foo">
> > <soap:operation soapAction="http://ibm.com/foo"/>
> > <input>
> > <soap:body parts="body" use="literal"
> > namespace="http://ibm.com/fooservice"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > </input>
> > <output>
> > <soap:body parts="body" use="literal"
> > namespace="http://ibm.com/fooservice"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > </output>
> > <fault name="fault">
> > <soap:fault name="fault" use="literal"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > </fault>
> > </operation>
> >
> > Thanks again,
> > Mike
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710
> >
> > *"Dimuthu Gamage" <di...@gmail.com>*
> >
> > 11/02/2007 10:10 PM
> > Please respond to
> > "Apache AXIS C User List" <ax...@ws.apache.org>
> >
> > To
> > "Apache AXIS C User List" <ax...@ws.apache.org> cc
> >
> > Subject
> > Re: Axis2C: WSDL2C not properly handling attributes
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Michael,
> > This happens when the soapAction in the WSDL is empty or just doesn't
> > exist. E.g. <soap:operation soapAction="" style="document"/>
> >
> > In this case it doesnt matter either the soap_action = "\"\"" or
> > soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
> > headers in the soap request. So I think it is not a bug:).
> >
> >
> > Thanks
> > Dimuthu
> >
> > On 11/3/07, *Michael Mole* <* mjmole@us.ibm.com* <mj...@us.ibm.com>>
> > wrote:
> >
> > Hey Dimuthu,
> >
> > One other thing I'm noticing now is that the soap_action in my method
> > stubs is being set to "\"\"". Is this something specific to the
> > snapshot I downloaded or is this a new bug?
> >
> > Here is a slightly modified listing of one of my method stubs:
> > /**
> > * auto generated method signature
> > * for "foo|[DELETED]" operation.
> > * @param foo
> > * @return
> > */
> >
> > adb_fooResponse_t* axis2_stub_FooService_foo(
> > axis2_stub_t *stub, const axutil_env_t *env,
> > adb_foo_t* foo)
> > {
> > axis2_svc_client_t *svc_client = NULL;
> > axis2_options_t *options = NULL;
> > axiom_node_t *ret_node = NULL;
> >
> > const axis2_char_t *soap_action = NULL;
> > axutil_qname_t *op_qname = NULL;
> > axiom_node_t *payload = NULL;
> > axis2_bool_t is_soap_act_set = AXIS2_TRUE;
> >
> > axutil_string_t *soap_act = NULL;
> >
> > adb_fooResponse_t* ret_val = NULL;
> >
> > payload = adb_foo_serialize(foo, env, NULL,
> > AXIS2_TRUE);
> >
> >
> >
> > options = axis2_stub_get_options( stub, env);
> > if ( NULL == options )
> > {
> > AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
> > stub: Error code:"
> > " %d :: %s", env->error->error_number,
> > AXIS2_ERROR_GET_MESSAGE(env->error));
> > return NULL;
> > }
> > svc_client = axis2_stub_get_svc_client(stub, env );
> > soap_action = axis2_options_get_action( options, env );
> > if (NULL == soap_action)
> > {
> > is_soap_act_set = AXIS2_FALSE;
> > soap_action = "\"\"";
> >
> > soap_act = axutil_string_create(env, "\"\"");
> > axis2_options_set_soap_action(options, env, soap_act);
> >
> > axis2_options_set_action( options, env, soap_action );
> > }
> >
> > axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
> >
> > op_qname = axutil_qname_create(env,
> > "foo" ,
> > "[DELETED]",
> > NULL);
> > ret_node = axis2_svc_client_send_receive_with_op_qname(
> > svc_client, env, op_qname, payload);
> >
> > if (!is_soap_act_set)
> > {
> >
> > axis2_options_set_soap_action(options, env, NULL);
> >
> > axis2_options_set_action( options, env, NULL);
> > }
> >
> >
> > if ( NULL == ret_node )
> > {
> > return NULL;
> > }
> > ret_val = adb_execute_foo_create(env);
> >
> > adb_execute_foo_deserialize(ret_val, env, ret_node );
> > return ret_val;
> >
> > }
> >
> >
> > Thanks,
> > Mike
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710
> > *Michael Mole/Lexington/IBM@IBMUS*
> >
> > 11/02/2007 04:04 PM
> >
> >
> > Please respond to
> > "Apache AXIS C User List" <*axis-c-user@ws.apache.org *<ax...@ws.apache.org>
> > >
> >
> > To
> > "Apache AXIS C User List" <*a...@ws.apache.org>>
> > cc
> >
> > Subject
> > Re: Axis2C: WSDL2C not properly handling attributes
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hey Dimuthu,
> >
> > You are right. I was using the 1.3 release version, but the latest
> > snapshot has resolved this issue.
> >
> > Thanks!
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710 *"Dimuthu Gamage" <**...@gmail.com>
> > *>*
> >
> > 11/01/2007 12:11 AM
> > Please respond to
> > "Apache AXIS C User List" <*axis-c-user@ws.apache.org *<ax...@ws.apache.org>
> > >
> >
> >
> > To
> > "Apache AXIS C User List" <*a...@ws.apache.org>>
> > cc
> >
> > Subject
> > Re: Axis2C: WSDL2C not properly handling attributes
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ***********************
> > Warning: Your file, case2.tar.gz, contains more than 32 files after
> > decompression and cannot be scanned.
> > ***********************
> >
> >
> >
> > Hi Michael,
> > This problem was there for sometime back. And I thought I fixed it. May
> > be it is not for all the cases.
> > I m attaching the testcase I used to test attribute.
> >
> > WSDL: case2/res/Adder4.wsdl
> > Generated stub code: case2/stub
> > Generated skel code: case2/skel
> >
> > And if you find your generated code is different, please try with the
> > latest snapshot. *http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
> > * <http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip>
> >
> > Thanks
> > Dimuthu
> >
> > On 11/1/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com> >
> > wrote:
> >
> > I have an xsd that defines a complex type with an attribute. When I
> > generate adb databindings using WSDL2C, the generated serialize method will
> > crash when I run it. It appears that this is because the attribute is added
> > using a call to axiom_element_add_attribute. However, the element
> > being passed to axiom_element_add_attribute is of type axutil_stream_t,
> > and the element tags had already been written anyway using
> > axutil_stream_write.
> >
> > I can't imagine that I'm the first one to try to use adb_bindings with
> > an element that has an attribute. Has anyone else ever run into a problem
> > like this or been successful? Should I raise a JIRA?
> >
> >
> > Thanks,
> > Mike
> >
> > Michael J Molé
> > Software Engineer
> > IBM Software Group - Rational
> > (781)676-2710
> > [attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: *axis-c-user-unsubscribe@ws.apache.org *<ax...@ws.apache.org>
> > For additional commands, e-mail: *axis-c-user-help@ws.apache.org *<ax...@ws.apache.org>
> >
> >
>
>
Re: Axis2C: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Michael,
I also try checking out the snaphost - SNAPSHOT Built on : Nov 06, 2007
(12:46:42 GMT+00:00) and it was generating soap action correctly!. I made
sure I dont have anything other than the *.jars in my CLASSPATH. I m using
Sun Java - Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
The generated code for RPC/lit and DOC/lit is attached here. They both have
soap action correctly, so It is not a problem specific to RPC wsdls!
You better checkout whether there are old jars in your classpath.
Thanks
Dimuthu
On 11/7/07, Michael Mole <mj...@us.ibm.com> wrote:
>
>
> I switched back to the official 1.3 release, and the soapAction strings
> were generated properly. I then downloaded the nightly snapshot from today,
> and again, it was producing "\"\"" intead of the soapAction string. This
> appears to be a regression.
>
> I also tried doing the same thing on the Adder4.wsdl, but there were no
> problems in either case. I wonder if that has something to do with the fact
> that I'm using style="rpc", not style="document"?
>
> - Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
>
> *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/05/2007 09:19 AM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> My WSDL does specify a soapAction. Also, this was working until I moved
> to the nightly snapshot from last week.
>
> My WSDL looks something like this:
> <operation name="foo">
> <soap:operation soapAction="http://ibm.com/foo"/>
> <input>
> <soap:body parts="body" use="literal"
> namespace="http://ibm.com/fooservice"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output>
> <soap:body parts="body" use="literal"
> namespace="http://ibm.com/fooservice"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> <fault name="fault">
> <soap:fault name="fault" use="literal"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </fault>
> </operation>
>
> Thanks again,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
> *"Dimuthu Gamage" <di...@gmail.com>*
>
> 11/02/2007 10:10 PM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
> Hi Michael,
> This happens when the soapAction in the WSDL is empty or just doesn't
> exist. E.g. <soap:operation soapAction="" style="document"/>
>
> In this case it doesnt matter either the soap_action = "\"\"" or
> soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
> headers in the soap request. So I think it is not a bug:).
>
>
> Thanks
> Dimuthu
>
> On 11/3/07, *Michael Mole* <* mjmole@us.ibm.com* <mj...@us.ibm.com>>
> wrote:
>
> Hey Dimuthu,
>
> One other thing I'm noticing now is that the soap_action in my method
> stubs is being set to "\"\"". Is this something specific to the snapshot
> I downloaded or is this a new bug?
>
> Here is a slightly modified listing of one of my method stubs:
> /**
> * auto generated method signature
> * for "foo|[DELETED]" operation.
> * @param foo
> * @return
> */
>
> adb_fooResponse_t* axis2_stub_FooService_foo(
> axis2_stub_t *stub, const axutil_env_t *env,
> adb_foo_t* foo)
> {
> axis2_svc_client_t *svc_client = NULL;
> axis2_options_t *options = NULL;
> axiom_node_t *ret_node = NULL;
>
> const axis2_char_t *soap_action = NULL;
> axutil_qname_t *op_qname = NULL;
> axiom_node_t *payload = NULL;
> axis2_bool_t is_soap_act_set = AXIS2_TRUE;
>
> axutil_string_t *soap_act = NULL;
>
> adb_fooResponse_t* ret_val = NULL;
>
> payload = adb_foo_serialize(foo, env, NULL,
> AXIS2_TRUE);
>
>
>
> options = axis2_stub_get_options( stub, env);
> if ( NULL == options )
> {
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
> stub: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> return NULL;
> }
> svc_client = axis2_stub_get_svc_client(stub, env );
> soap_action = axis2_options_get_action( options, env );
> if (NULL == soap_action)
> {
> is_soap_act_set = AXIS2_FALSE;
> soap_action = "\"\"";
>
> soap_act = axutil_string_create(env, "\"\"");
> axis2_options_set_soap_action(options, env, soap_act);
>
> axis2_options_set_action( options, env, soap_action );
> }
>
> axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
>
> op_qname = axutil_qname_create(env,
> "foo" ,
> "[DELETED]",
> NULL);
> ret_node = axis2_svc_client_send_receive_with_op_qname(
> svc_client, env, op_qname, payload);
>
> if (!is_soap_act_set)
> {
>
> axis2_options_set_soap_action(options, env, NULL);
>
> axis2_options_set_action( options, env, NULL);
> }
>
>
> if ( NULL == ret_node )
> {
> return NULL;
> }
> ret_val = adb_execute_foo_create(env);
>
> adb_execute_foo_deserialize(ret_val, env, ret_node );
> return ret_val;
>
> }
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/02/2007 04:04 PM
>
>
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> You are right. I was using the 1.3 release version, but the latest
> snapshot has resolved this issue.
>
> Thanks!
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710 *"Dimuthu Gamage" <**...@gmail.com>
> *>*
>
> 11/01/2007 12:11 AM
> Please respond to
> "Apache AXIS C User List" <*a...@ws.apache.org>
> >
>
>
> To
> "Apache AXIS C User List" <*a...@ws.apache.org>
> > cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
>
>
> ***********************
> Warning: Your file, case2.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
>
>
> Hi Michael,
> This problem was there for sometime back. And I thought I fixed it. May be
> it is not for all the cases.
> I m attaching the testcase I used to test attribute.
>
> WSDL: case2/res/Adder4.wsdl
> Generated stub code: case2/stub
> Generated skel code: case2/skel
>
> And if you find your generated code is different, please try with the
> latest snapshot. *http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
> * <http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip>
>
> Thanks
> Dimuthu
>
> On 11/1/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com> >
> wrote:
>
> I have an xsd that defines a complex type with an attribute. When I
> generate adb databindings using WSDL2C, the generated serialize method will
> crash when I run it. It appears that this is because the attribute is added
> using a call to axiom_element_add_attribute. However, the element being
> passed to axiom_element_add_attribute is of type axutil_stream_t, and the
> element tags had already been written anyway using axutil_stream_write.
>
> I can't imagine that I'm the first one to try to use adb_bindings with an
> element that has an attribute. Has anyone else ever run into a problem like
> this or been successful? Should I raise a JIRA?
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> [attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: *axis-c-user-unsubscribe@ws.apache.org*<ax...@ws.apache.org>
> For additional commands, e-mail: *axis-c-user-help@ws.apache.org*<ax...@ws.apache.org>
>
>
Re: Axis2C: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
I switched back to the official 1.3 release, and the soapAction strings
were generated properly. I then downloaded the nightly snapshot from
today, and again, it was producing "\"\"" intead of the soapAction string.
This appears to be a regression.
I also tried doing the same thing on the Adder4.wsdl, but there were no
problems in either case. I wonder if that has something to do with the
fact that I'm using style="rpc", not style="document"?
- Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/05/2007 09:19 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
My WSDL does specify a soapAction. Also, this was working until I moved
to the nightly snapshot from last week.
My WSDL looks something like this:
<operation name="foo">
<soap:operation soapAction="http://ibm.com/foo"/>
<input>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
<fault name="fault">
<soap:fault name="fault" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</fault>
</operation>
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/02/2007 10:10 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't
exist. E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or
soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
headers in the soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole < mjmole@us.ibm.com> wrote:
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mjmole@us.ibm.com > wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
Hey Dimuthu,
My WSDL does specify a soapAction. Also, this was working until I moved
to the nightly snapshot from last week.
My WSDL looks something like this:
<operation name="foo">
<soap:operation soapAction="http://ibm.com/foo"/>
<input>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body parts="body" use="literal"
namespace="http://ibm.com/fooservice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
<fault name="fault">
<soap:fault name="fault" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</fault>
</operation>
Thanks again,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/02/2007 10:10 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't
exist. E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or
soap_action = "" , axis2/c always sends the SOAPAction: "" in the http
headers in the soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole < mjmole@us.ibm.com> wrote:
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mjmole@us.ibm.com > wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Michael,
This happens when the soapAction in the WSDL is empty or just doesn't exist.
E.g. <soap:operation soapAction="" style="document"/>
In this case it doesnt matter either the soap_action = "\"\"" or soap_action
= "" , axis2/c always sends the SOAPAction: "" in the http headers in the
soap request. So I think it is not a bug:).
Thanks
Dimuthu
On 11/3/07, Michael Mole <mj...@us.ibm.com> wrote:
>
>
> Hey Dimuthu,
>
> One other thing I'm noticing now is that the soap_action in my method
> stubs is being set to "\"\"". Is this something specific to the snapshot
> I downloaded or is this a new bug?
>
> Here is a slightly modified listing of one of my method stubs:
> /**
> * auto generated method signature
> * for "foo|[DELETED]" operation.
> * @param foo
> * @return
> */
>
> adb_fooResponse_t* axis2_stub_FooService_foo(
> axis2_stub_t *stub, const axutil_env_t *env,
> adb_foo_t* foo)
> {
> axis2_svc_client_t *svc_client = NULL;
> axis2_options_t *options = NULL;
> axiom_node_t *ret_node = NULL;
>
> const axis2_char_t *soap_action = NULL;
> axutil_qname_t *op_qname = NULL;
> axiom_node_t *payload = NULL;
> axis2_bool_t is_soap_act_set = AXIS2_TRUE;
>
> axutil_string_t *soap_act = NULL;
>
> adb_fooResponse_t* ret_val = NULL;
>
> payload = adb_foo_serialize(foo, env, NULL,
> AXIS2_TRUE);
>
>
>
> options = axis2_stub_get_options( stub, env);
> if ( NULL == options )
> {
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
> stub: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> return NULL;
> }
> svc_client = axis2_stub_get_svc_client(stub, env );
> soap_action = axis2_options_get_action( options, env );
> if (NULL == soap_action)
> {
> is_soap_act_set = AXIS2_FALSE;
> soap_action = "\"\"";
>
> soap_act = axutil_string_create(env, "\"\"");
> axis2_options_set_soap_action(options, env, soap_act);
>
> axis2_options_set_action( options, env, soap_action );
> }
>
> axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
>
> op_qname = axutil_qname_create(env,
> "foo" ,
> "[DELETED]",
> NULL);
> ret_node = axis2_svc_client_send_receive_with_op_qname(
> svc_client, env, op_qname, payload);
>
> if (!is_soap_act_set)
> {
>
> axis2_options_set_soap_action(options, env, NULL);
>
> axis2_options_set_action( options, env, NULL);
> }
>
>
> if ( NULL == ret_node )
> {
> return NULL;
> }
> ret_val = adb_execute_foo_create(env);
>
> adb_execute_foo_deserialize(ret_val, env, ret_node );
> return ret_val;
>
> }
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
>
> *Michael Mole/Lexington/IBM@IBMUS*
>
> 11/02/2007 04:04 PM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
> Hey Dimuthu,
>
> You are right. I was using the 1.3 release version, but the latest
> snapshot has resolved this issue.
>
> Thanks!
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
>
> *"Dimuthu Gamage" <di...@gmail.com>*
>
> 11/01/2007 12:11 AM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
>
> To
> "Apache AXIS C User List" <ax...@ws.apache.org> cc
>
> Subject
> Re: Axis2C: WSDL2C not properly handling attributes
>
>
>
>
>
>
>
> ***********************
> Warning: Your file, case2.tar.gz, contains more than 32 files after
> decompression and cannot be scanned.
> ***********************
>
> Hi Michael,
> This problem was there for sometime back. And I thought I fixed it. May be
> it is not for all the cases.
> I m attaching the testcase I used to test attribute.
>
> WSDL: case2/res/Adder4.wsdl
> Generated stub code: case2/stub
> Generated skel code: case2/skel
>
> And if you find your generated code is different, please try with the
> latest snapshot. *http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
> * <http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip>
>
> Thanks
> Dimuthu
>
> On 11/1/07, *Michael Mole* <*mjmole@us.ibm.com* <mj...@us.ibm.com>>
> wrote:
>
> I have an xsd that defines a complex type with an attribute. When I
> generate adb databindings using WSDL2C, the generated serialize method will
> crash when I run it. It appears that this is because the attribute is added
> using a call to axiom_element_add_attribute. However, the element being
> passed to axiom_element_add_attribute is of type axutil_stream_t, and the
> element tags had already been written anyway using axutil_stream_write.
>
> I can't imagine that I'm the first one to try to use adb_bindings with an
> element that has an attribute. Has anyone else ever run into a problem like
> this or been successful? Should I raise a JIRA?
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> [attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
> ---------------------------------------------------------------------
> 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: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
Hey Dimuthu,
One other thing I'm noticing now is that the soap_action in my method
stubs is being set to "\"\"". Is this something specific to the snapshot
I downloaded or is this a new bug?
Here is a slightly modified listing of one of my method stubs:
/**
* auto generated method signature
* for "foo|[DELETED]" operation.
* @param foo
* @return
*/
adb_fooResponse_t* axis2_stub_FooService_foo(
axis2_stub_t *stub, const axutil_env_t *env,
adb_foo_t* foo)
{
axis2_svc_client_t *svc_client = NULL;
axis2_options_t *options = NULL;
axiom_node_t *ret_node = NULL;
const axis2_char_t *soap_action = NULL;
axutil_qname_t *op_qname = NULL;
axiom_node_t *payload = NULL;
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
axutil_string_t *soap_act = NULL;
adb_fooResponse_t* ret_val = NULL;
payload = adb_foo_serialize(foo, env, NULL,
AXIS2_TRUE);
options = axis2_stub_get_options( stub, env);
if ( NULL == options )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in
stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action( options, env );
if (NULL == soap_action)
{
is_soap_act_set = AXIS2_FALSE;
soap_action = "\"\"";
soap_act = axutil_string_create(env, "\"\"");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action( options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env,
"foo" ,
"[DELETED]",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(
svc_client, env, op_qname, payload);
if (!is_soap_act_set)
{
axis2_options_set_soap_action(options, env, NULL);
axis2_options_set_action( options, env, NULL);
}
if ( NULL == ret_node )
{
return NULL;
}
ret_val = adb_execute_foo_create(env);
adb_execute_foo_deserialize(ret_val, env, ret_node );
return ret_val;
}
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
Michael Mole/Lexington/IBM@IBMUS
11/02/2007 04:04 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mj...@us.ibm.com> wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Michael Mole <mj...@us.ibm.com>.
Hey Dimuthu,
You are right. I was using the 1.3 release version, but the latest
snapshot has resolved this issue.
Thanks!
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
"Dimuthu Gamage" <di...@gmail.com>
11/01/2007 12:11 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>
To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc
Subject
Re: Axis2C: WSDL2C not properly handling attributes
***********************
Warning: Your file, case2.tar.gz, contains more than 32 files after
decompression and cannot be scanned.
***********************
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the
latest snapshot.
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mj...@us.ibm.com> wrote:
I have an xsd that defines a complex type with an attribute. When I
generate adb databindings using WSDL2C, the generated serialize method
will crash when I run it. It appears that this is because the attribute
is added using a call to axiom_element_add_attribute. However, the
element being passed to axiom_element_add_attribute is of type
axutil_stream_t, and the element tags had already been written anyway
using axutil_stream_write.
I can't imagine that I'm the first one to try to use adb_bindings with an
element that has an attribute. Has anyone else ever run into a problem
like this or been successful? Should I raise a JIRA?
Thanks,
Mike
Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710
[attachment "case2.tar.gz" deleted by Michael Mole/Lexington/IBM]
---------------------------------------------------------------------
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: WSDL2C not properly handling attributes
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Michael,
This problem was there for sometime back. And I thought I fixed it. May be
it is not for all the cases.
I m attaching the testcase I used to test attribute.
WSDL: case2/res/Adder4.wsdl
Generated stub code: case2/stub
Generated skel code: case2/skel
And if you find your generated code is different, please try with the latest
snapshot. http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip
Thanks
Dimuthu
On 11/1/07, Michael Mole <mj...@us.ibm.com> wrote:
>
>
> I have an xsd that defines a complex type with an attribute. When I
> generate adb databindings using WSDL2C, the generated serialize method will
> crash when I run it. It appears that this is because the attribute is added
> using a call to axiom_element_add_attribute. However, the element being
> passed to axiom_element_add_attribute is of type axutil_stream_t, and the
> element tags had already been written anyway using axutil_stream_write.
>
> I can't imagine that I'm the first one to try to use adb_bindings with an
> element that has an attribute. Has anyone else ever run into a problem like
> this or been successful? Should I raise a JIRA?
>
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710