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 JJC <je...@yahoo.com> on 2006/06/02 00:10:54 UTC
Axis2 deployment, service operation name change doesn't get reflected in new deployment
Hi All,
There seems to be a web services deployment problem that is very puzzling and doesn't make sense.
1) I am developing a web service - puBBSIDService
public class puBBSIDService
{
Logger log = Logger.getLogger("PU_BB_WS");
public puBBSIDService()
{}
etc...
2) In my web service is an operation "echoInput"
public void setOperationContext (OperationContext opctx)
{
log.info( "puBBSIDService(), setOperationContext" );
}
public String[] echoInput( String[] inParams )
{
etc..
3) The services.xml
<service >
<description>
</description>
<parameter name="ServiceClass" locked="false">edu.princeton.bb.ws.SID.puBBSIDService</parameter>
<operation name="echoInput">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
4) When I check the available service from the admin panel -
Available operations
echoInput
Engaged Modules for the Operation
addressing-1.0
5) I compiled, created the puBBSIDService.aar, dropped it in the services directory, and stopped and started Tomcat.
6) It works fine wonderfully!
7) When I changed the name of the operation "echoInput" to "echoAuthen" -
public String[] echoAuthen( String[] inParams )
{
String[] yingYang = new String[inParams.length];
etc...
8) I also changed the services.xml
<service >
<description>
</description>
<parameter name="ServiceClass" locked="false">edu.princeton.bb.ws.SID.puBBSIDService</parameter>
<operation name="echoAuthen">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
8) Then I recompiled, created the aar file, dropped it in the services and stopped and started Tomcat.
9) I checked the available services and operations on the admin panel -
Available operations
echoAuthen
Engaged Modules for the Operation
addressing-1.0
10) The automatically generated wsdl is
<wsdl:definitions targetNamespace="http://ws.apache.org/axis2">
<wsdl:types>
<xs:schema targetNamespace="http://SID.ws.bb.princeton.edu/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="echoAuthen">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" type="xs:string" name="inParams" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
11) From my php client when I try to access the operation "echoAuthen", Axis2 doesn't acknowledge the request. The log for "setOperationContext", in 2), doesn't show. However with the same client I try to access "echoInput", the "setOperationContext" log shows, even though "echoInput" has changed to "echoAuthen".
12) This is baffling and make me wonder if stopping and starting Tomcat is the correct way to reload the web service. What is the correct procedure because it seems like the Axis2 servlet is not resetting and there is some residual memory that isn't getting cleared.
Your help will be greatly appreciated...
Jennifer
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Axis2 deployment, service operation name change doesn't get reflected in new deployment
Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening Jennifer
Here is what I do when to make a change in the operation-
1)Change the WSDL..yes its a bit obscure but once you get used to reading about Operation, params, request and response its slowly makes sense
2)Go the WSDL2Java route..why would anyone want to hand edit main class, client, manager, SOAPBinding when you can get WSDL3Java to re-gen all those classes for you
3)recompile ..hopefully by this time you will have created a build.xml that has a compile, jar, war step (maybe even some JavaDoc)
4)deploy
Heres a thought ...
pickup the wsdl for GetQuote and change one operation
getQuote to getMyQuote in the wsdl..regen the Java Classes..recompile and redeploy with something like
java org.apache.axis.client.AdminClient -lhttp://MARTINI:8080/axis/services/AdminService StockDeploy.wsdd
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: JJC
To: Axis Users
Sent: Thursday, June 01, 2006 6:10 PM
Subject: Axis2 deployment, service operation name change doesn't get reflected in new deployment
Hi All,
There seems to be a web services deployment problem that is very puzzling and doesn't make sense.
1) I am developing a web service - puBBSIDService
public class puBBSIDService
{
Logger log = Logger.getLogger("PU_BB_WS");
public puBBSIDService()
{}
etc...
2) In my web service is an operation "echoInput"
public void setOperationContext (OperationContext opctx)
{
log.info( "puBBSIDService(), setOperationContext" );
}
public String[] echoInput( String[] inParams )
{
etc..
3) The services.xml
<service >
<description>
</description>
<parameter name="ServiceClass" locked="false">edu.princeton.bb.ws.SID.puBBSIDService</parameter>
<operation name="echoInput">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
4) When I check the available service from the admin panel -
Available operations
a.. echoInput
Engaged Modules for the Operation
a.. addressing-1.0
5) I compiled, created the puBBSIDService.aar, dropped it in the services directory, and stopped and started Tomcat.
6) It works fine wonderfully!
7) When I changed the name of the operation "echoInput" to "echoAuthen" -
public String[] echoAuthen( String[] inParams )
{
String[] yingYang = new String[inParams.length];
etc...
8) I also changed the services.xml
<service >
<description>
</description>
<parameter name="ServiceClass" locked="false">edu.princeton.bb.ws.SID.puBBSIDService</parameter>
<operation name="echoAuthen">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
8) Then I recompiled, created the aar file, dropped it in the services and stopped and started Tomcat.
9) I checked the available services and operations on the admin panel -
Available operations
a.. echoAuthen
Engaged Modules for the Operation
a.. addressing-1.0
10) The automatically generated wsdl is
<wsdl:definitions targetNamespace="http://ws.apache.org/axis2">
<wsdl:types>
<xs:schema targetNamespace="http://SID.ws.bb.princeton.edu/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="echoAuthen">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" type="xs:string" name="inParams" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
11) From my php client when I try to access the operation "echoAuthen", Axis2 doesn't acknowledge the request. The log for "setOperationContext", in 2), doesn't show. However with the same client I try to access "echoInput", the "setOperationContext" log shows, even though "echoInput" has changed to "echoAuthen".
12) This is baffling and make me wonder if stopping and starting Tomcat is the correct way to reload the web service. What is the correct procedure because it seems like the Axis2 servlet is not resetting and there is some residual memory that isn't getting cleared.
Your help will be greatly appreciated...
Jennifer
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com