You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "luca.traini@tiscali.it" <lu...@tiscali.it> on 2008/10/28 14:19:55 UTC

axis2-codegen - AxisServiceBasedMultiLanguageEmitter

Hello,

I’m trying to modify the TemplateSkeleton.xsl to automatically 
generate code that handles SOAP headers.

When I attempted to address the output SOAP header with the following 
XPATH:

 

            output/param[@location='soap_header']/@type

 

I obtained an empty string. Replacing the TemplateSkeleton with an 
identity transformation, I obtained:

 

                        <output>

                                   <param location="body" name="
toupperResponse" opname="toupper" shorttype="ToupperResponse" type="it.
namespace.ToupperResponse">

                                               <qname localname="
toupperResponse" nsuri="http://www.namespace.it"/>

                                   </param>

                        </output>

 

Then, inspecting source code I found this commented line in 
AxisServiceBasedMultiLanguageEmitter.java:

 

            //addHeaderOperations(soapHeaderOutputParameterList, 
axisOperation, false);

 

If I cancel the comment, the identity transformation returns:

 

                        <output>

                                   <param location="body" name="
toupperResponse" opname="toupper" shorttype="ToupperResponse" type=" it.
namespace.ToupperResponse">

                                               <qname localname="
toupperResponse" nsuri="http://www.namespace.it"/>

                                   </param>

                                   <param location="soap_header" 
name="ResponseHeader" type=" http://www.namespace.it.ResponseHeader"/>

                        </output>

 

In this case the output SOAP header is correctly reported.

Is there a reason why for this comment? Is it correct to avoid it to 
obtain an output SOAP header?

 

Thanks, Luca.



_______________________________________________________________Crea dei fantastici PhotoBook. Sconto del 20% per tutto il mese di Ottobre.Ancora per pochi giorni. Affrettati. http://photo.tiscali.it/

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


Re: axis2-codegen - AxisServiceBasedMultiLanguageEmitter

Posted by Amila Suriarachchi <am...@gmail.com>.
On Tue, Oct 28, 2008 at 6:49 PM, luca.traini@tiscali.it <
luca.traini@tiscali.it> wrote:

> Hello,
>
> I'm trying to modify the TemplateSkeleton.xsl to automatically
> generate code that handles SOAP headers.
>
> When I attempted to address the output SOAP header with the following
> XPATH:
>
>
>
>            output/param[@location='soap_header']/@type
>
>
>
> I obtained an empty string. Replacing the TemplateSkeleton with an
> identity transformation, I obtained:
>
>
>
>                        <output>
>
>                                   <param location="body" name="
> toupperResponse" opname="toupper" shorttype="ToupperResponse" type="it.
> namespace.ToupperResponse">
>
>                                               <qname localname="
> toupperResponse" nsuri="http://www.namespace.it"/>
>
>                                   </param>
>
>                        </output>
>
>
>
> Then, inspecting source code I found this commented line in
> AxisServiceBasedMultiLanguageEmitter.java:
>
>
>
>            //addHeaderOperations(soapHeaderOutputParameterList,
> axisOperation, false);
>
>
>
> If I cancel the comment, the identity transformation returns:
>
>
>
>                        <output>
>
>                                   <param location="body" name="
> toupperResponse" opname="toupper" shorttype="ToupperResponse" type=" it.
> namespace.ToupperResponse">
>
>                                               <qname localname="
> toupperResponse" nsuri="http://www.namespace.it"/>
>
>                                   </param>
>
>                                   <param location="soap_header"
> name="ResponseHeader" type=" http://www.namespace.it.ResponseHeader"/>
>
>                        </output>
>
>
>
> In this case the output SOAP header is correctly reported.
>
> Is there a reason why for this comment? Is it correct to avoid it to
> obtain an output SOAP header?


In Axis2 skelton is generated only for portType. But it you want to modify
that I think that is ok.

thanks,
Amila.

>
>
>
>
> Thanks, Luca.
>
>
>
> _______________________________________________________________Crea dei
> fantastici PhotoBook. Sconto del 20% per tutto il mese di Ottobre.Ancora per
> pochi giorni. Affrettati. http://photo.tiscali.it/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/