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 Michele Mazzucco <Mi...@ncl.ac.uk> on 2006/09/04 18:35:17 UTC

[Axis2] axis2 & servlet/jsp how to

Hi all,

how can I integrate my web service with some servlets/jsps? Is there any
how to/tutorial about that?

Thanks in advance,
Michele

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


Re: [Axis2] axis2 & servlet/jsp how to

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Hi Martin,

thanks for the reply. So, if I'm right, from a servlet it is only
possible to invoke web services, not check (and get/modify) their state
(I'm speaking about stateful web services), isn't it?


Regards,
Michele

Martin Gainty wrote:
> Axis is a servlet (AxisServlet)
> so after you've successfully deployed your service as verified by viewing the service (with it's WSDL) at
> http://localhost:8080/axis2/services/listServices
> 
> For JSP form collectors 
> What Ive done is to create a JSP with 
> <body>
> <form name="someForm" ...action='javascript:submit()'>
> </body>
> 
> <head>
> <script language="JavaScript">
> <!-- Begin
> function submit() 
> {
> validate your form fields
> ..
> construct URL such as 
>  url=' http://localhost:8080/axis2/services/SelectFromZip?method=getSelectFromZip'+'&in0='+escape(document.form.OUTPUT_COLUMN.value)+'&in1='+escape(document.form.SELECTED_COLUMN.value)+'&in2='+escape(document.form.URL_STATE.value)+'&in3='+escape(document.form.IN_FIELD_TO_BE_TESTED.value)+'&in4='+escape(document.form.IN_RELATIONAL_OPERATOR.value)+'&in5='+escape(document.form.IN_METRO.value)+'&in6='+escape(document.form.IN_LAST_LINE_CITY_NAME.value)+'&in7='+escape(document.form.IN_CITY.value);
> alert(url);
> 
> //Now submit the info to AxisServlet (in this case SelectFromZip) by Opening URL in same window as illustrated here..
>  window.open(url,_self); 
> }
> // End -->
> </script>
> </head>
> 
> HTH
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> 
> 
> ----- Original Message ----- 
> From: "Michele Mazzucco" <Mi...@ncl.ac.uk>
> To: "Axis user mailing list" <ax...@ws.apache.org>
> Sent: Monday, September 04, 2006 12:35 PM
> Subject: [Axis2] axis2 & servlet/jsp how to
> 
> 
>> Hi all,
>>
>> how can I integrate my web service with some servlets/jsps? Is there any
>> how to/tutorial about that?
>>
>> Thanks in advance,
>> Michele
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>

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


Re: [Axis2] axis2 & servlet/jsp how to

Posted by Martin Gainty <mg...@hotmail.com>.
Axis is a servlet (AxisServlet)
so after you've successfully deployed your service as verified by viewing the service (with it's WSDL) at
http://localhost:8080/axis2/services/listServices

For JSP form collectors 
What Ive done is to create a JSP with 
<body>
<form name="someForm" ...action='javascript:submit()'>
</body>

<head>
<script language="JavaScript">
<!-- Begin
function submit() 
{
validate your form fields
..
construct URL such as 
 url=' http://localhost:8080/axis2/services/SelectFromZip?method=getSelectFromZip'+'&in0='+escape(document.form.OUTPUT_COLUMN.value)+'&in1='+escape(document.form.SELECTED_COLUMN.value)+'&in2='+escape(document.form.URL_STATE.value)+'&in3='+escape(document.form.IN_FIELD_TO_BE_TESTED.value)+'&in4='+escape(document.form.IN_RELATIONAL_OPERATOR.value)+'&in5='+escape(document.form.IN_METRO.value)+'&in6='+escape(document.form.IN_LAST_LINE_CITY_NAME.value)+'&in7='+escape(document.form.IN_CITY.value);
alert(url);

//Now submit the info to AxisServlet (in this case SelectFromZip) by Opening URL in same window as illustrated here..
 window.open(url,_self); 
}
// End -->
</script>
</head>

HTH
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Michele Mazzucco" <Mi...@ncl.ac.uk>
To: "Axis user mailing list" <ax...@ws.apache.org>
Sent: Monday, September 04, 2006 12:35 PM
Subject: [Axis2] axis2 & servlet/jsp how to


> Hi all,
> 
> how can I integrate my web service with some servlets/jsps? Is there any
> how to/tutorial about that?
> 
> Thanks in advance,
> Michele
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>