RE: [WSDL2Code/C] Embedding soap operations in body (with adb databinding)

2007-08-01 Thread Jamie Lyon
Excellent, whenever you find time. It was more the axiom_element_create part I 
was pointing out however, as when there is no parameter no calls to that 
function are made, so no root element is created (I'll give an example of what 
I mean tomorrow when I have access to the system with the code on). I'm not 
entirely sure why this is, but I shall continue to help look into it (it will 
help me gain knowledge of the templating system even if I don't find the 
solution).

Thanks,
Jamie


-Original Message-
From: Milinda Pathirage [mailto:[EMAIL PROTECTED]
Sent: Wed 8/1/2007 6:28 PM
To: Apache AXIS C Developers List
Subject: Re: [WSDL2Code/C] Embedding soap operations in body (with adb 
databinding)
 
Hi Jamie,
First sorry for the late reply. These days I am stuck with my mid semester
exams and assignments, so I didn't found a free time look at this. I think
cause for this complexity is something we have done to improve the data
binding performance. We have introduce stream writer into serialize function
and we use this stream to serialize child nodes. We write strings to the
stream and then namesapace problem occur because we must manually add
namespaces to that string. I do some changes to fix this by declaring child
namespaces in parent element and I think that is the problem what you
pointing out. I will look at these bugs as soon as possible.

Thanks
Milinda


On 8/1/07, Jamie Lyon <[EMAIL PROTECTED]> wrote:
>
> Okay, I've been looking through the templates, and have a question:
>
> Should lines 1315:1332 in :
> 
> 
> 
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> &current_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
>
> Actually be (something similar to):
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> &current_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> &current_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
>
> I.e. One unconditional element & namespace creation, followed by element
> and namespaces for all the children?
>
> Unless there's a specific property for the root node, which I can't
> find, so you could do something like:
>  (pseudo)
>
> Any suggestions?
>
> -Jamie
>
> > -Original Message-
> > From: Jamie Lyon [mailto:[EMAIL PROTECTED]
> > Sent: 01 August 2007 11:44
> > To: Apache AXIS C Developers List
> > Subject: [WSDL2Code/C] Embedding soap operations in body (with adb
> > databinding)
> >
> >  <> Hi,
> >
> > I'm having some problems with the WSDL2C tool. I'm running the latest
> > nightly build (Aug 1st). All of the methods below were generated using
> > adb databinding from the attached wsdl file using the following
> command:
> > wsdl2c.sh -uri DataService.wsdl -g -f -d adb -u -o output
> > Where wsdl2c.sh is just wsdl2java.sh with the line:
> > sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2Java $*
> > replaced with:
> > sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2C $*
> >
> > There are several small problems:
> > 1) When compiling the wsdl file I attached, I get a re-defined warning
> > on adb_GetResourceProperty_get_qname in adb_GetResourceProperty.c.
> > 2) A known bug is not yet 

Re: [WSDL2Code/C] Embedding soap operations in body (with adb databinding)

2007-08-01 Thread Milinda Pathirage
Hi Jamie,
First sorry for the late reply. These days I am stuck with my mid semester
exams and assignments, so I didn't found a free time look at this. I think
cause for this complexity is something we have done to improve the data
binding performance. We have introduce stream writer into serialize function
and we use this stream to serialize child nodes. We write strings to the
stream and then namesapace problem occur because we must manually add
namespaces to that string. I do some changes to fix this by declaring child
namespaces in parent element and I think that is the problem what you
pointing out. I will look at these bugs as soon as possible.

Thanks
Milinda


On 8/1/07, Jamie Lyon <[EMAIL PROTECTED]> wrote:
>
> Okay, I've been looking through the templates, and have a question:
>
> Should lines 1315:1332 in :
> 
> 
> 
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> ¤t_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
>
> Actually be (something similar to):
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> ¤t_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
> if( parent == NULL)
> {
> current_element = axiom_element_create (env, parent,
> "", ns1,
> ¤t_node);
> axiom_element_set_namespace( current_element, env,
> ns1, current_node);
> 
> ns1 = axiom_namespace_create (env,
> "",
> "");
> axiom_element_declare_namespace( current_element,
> env, current_node, ns1);
> 
> parent = current_node;
> }
> 
> 
> 
>
> I.e. One unconditional element & namespace creation, followed by element
> and namespaces for all the children?
>
> Unless there's a specific property for the root node, which I can't
> find, so you could do something like:
>  (pseudo)
>
> Any suggestions?
>
> -Jamie
>
> > -Original Message-
> > From: Jamie Lyon [mailto:[EMAIL PROTECTED]
> > Sent: 01 August 2007 11:44
> > To: Apache AXIS C Developers List
> > Subject: [WSDL2Code/C] Embedding soap operations in body (with adb
> > databinding)
> >
> >  <> Hi,
> >
> > I'm having some problems with the WSDL2C tool. I'm running the latest
> > nightly build (Aug 1st). All of the methods below were generated using
> > adb databinding from the attached wsdl file using the following
> command:
> > wsdl2c.sh -uri DataService.wsdl -g -f -d adb -u -o output
> > Where wsdl2c.sh is just wsdl2java.sh with the line:
> > sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2Java $*
> > replaced with:
> > sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2C $*
> >
> > There are several small problems:
> > 1) When compiling the wsdl file I attached, I get a re-defined warning
> > on adb_GetResourceProperty_get_qname in adb_GetResourceProperty.c.
> > 2) A known bug is not yet fixed in the nightly, though a fix is known
> -
> > basically rampart/c does not work with autogenerated stubs with adb
> > databinding:
> >  Problem:
> >
> http://www.nabble.com/rampart-c-not-working-with-stubs-generated-using-w
> > sdl2c-t4125131.html
> >   Solution:
> >
> http://www.nabble.com/Re%3A-rampart-c-not-working-with-stubs-generated-u
> > sing-wsdl2c-p11760941.html
> > These are all fixable via manual edits in a small amount of time
> > however, and are really just minor inconveniences.
> >
> > The last problem however I cannot find a fix for:
> > When a request contains no parameters, no soap operation is defined in
> > the body, only the SOAPAction in the HTTP header is generated. If you
> > generate the attached wsdl file, you will get the following operation
> > (and more):
> > getResources - this has no parameters, and as such the soap body looks
> > like:
> >  >
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> > urity-utility-1.0.xsd">
> > 
> > When it should look like:
> >  >
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> > urity-utility-1.0.xsd">
> > 
> > 
> >
> > Looking at the source code for this operation
> > (adb_getResources_serialize in a

RE: [WSDL2Code/C] Embedding soap operations in body (with adb databinding)

2007-08-01 Thread Jamie Lyon
Okay, I've been looking through the templates, and have a question:

Should lines 1315:1332 in :



if( parent == NULL)
{
current_element = axiom_element_create (env, parent,
"", ns1,
¤t_node);
axiom_element_set_namespace( current_element, env,
ns1, current_node);

ns1 = axiom_namespace_create (env,
"",
"");
axiom_element_declare_namespace( current_element,
env, current_node, ns1);

parent = current_node;
}




Actually be (something similar to):
if( parent == NULL)
{
current_element = axiom_element_create (env, parent,
"", ns1,
¤t_node);
axiom_element_set_namespace( current_element, env,
ns1, current_node);

ns1 = axiom_namespace_create (env,
"",
"");
axiom_element_declare_namespace( current_element,
env, current_node, ns1);

parent = current_node;
}



if( parent == NULL)
{
current_element = axiom_element_create (env, parent,
"", ns1,
¤t_node);
axiom_element_set_namespace( current_element, env,
ns1, current_node);

ns1 = axiom_namespace_create (env,
"",
"");
axiom_element_declare_namespace( current_element,
env, current_node, ns1);

parent = current_node;
}




I.e. One unconditional element & namespace creation, followed by element
and namespaces for all the children?

Unless there's a specific property for the root node, which I can't
find, so you could do something like:
 (pseudo)

Any suggestions?

-Jamie

> -Original Message-
> From: Jamie Lyon [mailto:[EMAIL PROTECTED]
> Sent: 01 August 2007 11:44
> To: Apache AXIS C Developers List
> Subject: [WSDL2Code/C] Embedding soap operations in body (with adb
> databinding)
> 
>  <> Hi,
> 
> I'm having some problems with the WSDL2C tool. I'm running the latest
> nightly build (Aug 1st). All of the methods below were generated using
> adb databinding from the attached wsdl file using the following
command:
> wsdl2c.sh -uri DataService.wsdl -g -f -d adb -u -o output
> Where wsdl2c.sh is just wsdl2java.sh with the line:
> sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2Java $*
> replaced with:
> sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2C $*
> 
> There are several small problems:
> 1) When compiling the wsdl file I attached, I get a re-defined warning
> on adb_GetResourceProperty_get_qname in adb_GetResourceProperty.c.
> 2) A known bug is not yet fixed in the nightly, though a fix is known
-
> basically rampart/c does not work with autogenerated stubs with adb
> databinding:
>  Problem:
>
http://www.nabble.com/rampart-c-not-working-with-stubs-generated-using-w
> sdl2c-t4125131.html
>   Solution:
>
http://www.nabble.com/Re%3A-rampart-c-not-working-with-stubs-generated-u
> sing-wsdl2c-p11760941.html
> These are all fixable via manual edits in a small amount of time
> however, and are really just minor inconveniences.
> 
> The last problem however I cannot find a fix for:
> When a request contains no parameters, no soap operation is defined in
> the body, only the SOAPAction in the HTTP header is generated. If you
> generate the attached wsdl file, you will get the following operation
> (and more):
> getResources - this has no parameters, and as such the soap body looks
> like:
> 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> urity-utility-1.0.xsd">
> 
> When it should look like:
> 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> urity-utility-1.0.xsd">
> 
> 
> 
> Looking at the source code for this operation
> (adb_getResources_serialize in adb_getResources.c) you can see the
> reason for it, all the code for generating the root element, such as
> that found in the operation 'save', is not included:
> If( parent == NULL )
> {
>   current_element = axiom_element_create (env, parent, "save", ns1
> , ¤t_node);
> ...
> }
> 
> Is there an easy solution to fix this? I shall look into the wsdl2code
c
> templates myself, but if anyone is aware of a known solution, or can
fix
> it easily that would be much appreciated.
> 
> Cheers,
> Jamie

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]