ws-kandula-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Wang <pipa...@yahoo.com>
Subject 回复: Re: Question of running Kandula exampes
Date Tue, 31 Jan 2006 05:07:29 GMT

    I use eclipse to compile and run the test. So many days I tried kandula for the application's
requirement, now I can run the kandula InitiatorApp example with service KANDULA_INTEROP_SERVICE,
but IBM_INTEROP_SERVICE = "http://wsi.alphaworks.ibm.com:8080/wstx/services/InteropService"
still
reports errors with port 8082 at wsi.alphaworks.ibm.com to 8080.The error message is pasted
at the
end.

    I don't know if kandula is suitable to build a strong application. At least if I want
to use
it, I should spend more time. There is no full document yet, but I like it and am ready to
integrate it in my experiment application. I wish kandula is easy to use, and also wish it
is
strong enough in tomcat and jotm environments to control the data consistency.

    Now I tried to add my own web service in the transaction. I describe the question here.

    I only code a simple web service MyService with one method getString(), here is the ws
interface:
-------------------
  public interface MyService extends java.rmi.Remote {
      public java.lang.String getString() throws java.rmi.RemoteException;
  }
-------------------

    And following is the client code (omit try catch etc code).
--------------------
    po.MyService binding = new MyServiceServiceLocator().getMyService();
    ((MyServiceSoapBindingStub)binding).setMaintainSession(true);
    String result = binding.getString();
    System.out.println("[Client] result=" + result);
--------------------

    The skeleton,stub and impl are created by wsdl2java and javatowsdl, and I can run the
client
by stub to call the web service and get the correct result string.

    But after I deploy kandula client_config.wsdd, I can not run MyService client again. It
reports "- Exception in AddressingHandler" error at
"org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI with empty parameters."
I
don't know what's the reason.

    Also I update InitiatorApp.java and add my own web service's call.
---------------------
    private MyService getMyService() throws Exception {
        return new MyServiceServiceLocator().getMyService(new
URL("http://localhost:8080/axis/services/MyService"));
    }

    System.out.println("call ws A");
    getInteropService().commit(null);            ---(A)
    System.out.println("call ws B");
    String result = getMyService().getString();  ---(B)---I add this call
    System.out.println("result=" + result);
----------------------

   It reports tha same error "- Exception in AddressingHandler" as calling the stub not in
the
transaction.
    
    How can I correct the error ? Thanks much.   


===============================================

    Here is the errors to use IBM_INTEROP_SERVICE
--------------------------
begin
to commit()
Exception in thread "main" AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode: 
 faultString: (500)Internal Server Error
 faultActor: 
 faultNode: 
 faultDetail: 
	{}:return code:  500
<html><head><title>Apache Tomcat/4.1.30 - Error report</title><STYLE><!--H1{font-family
:
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family :
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family :
sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color
: #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP
Status 500 - </h1><HR size="1"
noshade><p><b>type</b> Exception report</p><p><b>message</b>
<u></u></p><p><b>description</b>
<u>The server encountered an internal error () that prevented it from fulfilling this
request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException:
Servlet execution threw
an exception
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
--------------------------
   The message from tcpmon is
---------------------------
POST /wstx/services/InteropService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: localhost:8082
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "urn:foo"
Content-Length: 1487

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><soapenv:Header><wsa:MessageID
soapenv:mustUnderstand="0">uuid:26048260-9211-11da-b191-9572ed45fc51</wsa:MessageID><wsa:To
soapenv:mustUnderstand="0">http://localhost:8082/wstx/services/InteropService</wsa:To><wsa:Action
soapenv:mustUnderstand="0">urn:foo</wsa:Action><wsa:From
soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From><wscoor:CoordinationContext
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"
xmlns:wscoor="http://schemas.xmlsoap.org/ws/2004/10/wscoor"><wscoor:Identifier>uuid:258d2f80-9211-11da-9775-9aebf3d566c6</wscoor:Identifier><wscoor:CoordinationType>http://schemas.xmlsoap.org/ws/2004/10/wsat</wscoor:CoordinationType><wscoor:RegistrationService><wsa:Address>http://localhost:8081/axis/services/registrationCoordinator</wsa:Address><wsa:ReferenceProperties><ns3:CallbackRef
xmlns:ns3="http://ws.apache.org/kandula">uuid:258d2f80-9211-11da-9775-9aebf3d566c6</ns3:CallbackRef></wsa:ReferenceProperties></wscoor:RegistrationService></wscoor:CoordinationContext></soapenv:Header><soapenv:Body><Commit
xsi:nil="true" xmlns="http://fabrikam123.com"/></soapenv:Body></soapenv:Envelope>
----------------
HTTP/1.1 500 Internal Server Error
Date: Tue, 31 Jan 2006 04:07:02 GMT
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en-US
Connection: close

<html><head><title>Apache Tomcat/4.1.30 - Error report</title><STYLE><!--H1{font-family
:
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family :
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family :
sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color
: #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP
Status 500 - </h1><HR size="1"
noshade><p><b>type</b> Exception report</p><p><b>message</b>
<u></u></p><p><b>description</b>
<u>The server encountered an internal error () that prevented it from fulfilling this
request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException:
Servlet execution threw
an exception
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:536)
</pre></p><p><b>root cause</b> <pre>java.lang.OutOfMemoryError
</pre></p><HR size="1" noshade><h3>Apache Tomcat/4.1.30</h3></body></html>
---------------------------


am so sorry for the sample 
has not been run out. I always 

[CallbackRegistry] registerCallback: timeout= 180000
[CallbackRegistry] registerCallback: timeout= 180000
[CallbackRegistry] registerCallback: timeout= 180000
[CallbackRegistry] registerCallback: timeout= 180000
[CallbackRegistry] registerCallback: timeout= 180000
[ATCoordinatorImpl] timeout NONE
[AbstractParticipant] timeout NONE
[ATCoordinatorImpl] timeout NONE
[AbstractParticipant] timeout NONE
[ATCoordinatorImpl] timeout ACTIVE
javax.transaction.xa.XAException
        at InteropServiceSoapBindingImpl$XA_OKParticipant.rollback(InteropServic
eSoapBindingImpl.java:58)
        at org.apache.kandula.coordinator.at.AbstractParticipant.rollbackOperati
on(AbstractParticipant.java:191)
        at org.apache.kandula.coordinator.at.ParticipantImpl.rollbackOperation(P
articipantImpl.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.j
ava:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider
.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:
323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453
)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:69
9)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBas
e.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:868)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:663)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
        at java.lang.Thread.run(Thread.java:595)
org.apache.kandula.coordinator.TimedOutException
        at org.apache.kandula.coordinator.at.ATCoordinatorImpl.timeout(ATCoordin
atorImpl.java:487)
        at org.apache.kandula.coordinator.CallbackRegistry$1.run(CallbackRegistr
y.java:62)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
[AbstractParticipant] timeout NONE


--- Dasarath Weeratunge <dweeratu@purdue.edu>写道:

> Quoting Jack Wang <pipashu@yahoo.com>:
> 
> thanks for the steps! I'm sure its going to make my life a lot easier writing 
> the user guide:-)
> 
> Don't use ant for testing. Open up the test case in your IDE and try it out.
> 
> The test case is there in the src directory along with the impl class. Don't 
> go by the handler names in the "current" user-guide. The namespaces have 
> changed and the code has been completely re-written. The handlers you need to 
> include are in the README.1st For interopIBM sample you need the 
> o.a.k.coordinator.at.TxHandler in both the client-config.wsdd and server-
> config.wsdd
> 
> Make sure that your build is not broken.
> 
> regards,
> --dasarath
> 
> 
> 
> 
> > 
> >     There is only one question. In question 1, InteropServiceTestCase can be
> > created by : "java
> > -classpath %classpath% org.apache.axis.wsdl.WSDL2Java --server-side
> > --skeletonDeploy true -t
> > wp.wsdl"
> >     Thanks.
> > 
> > --- Jack Wang <pipashu@yahoo.com>写道:
> > > Question of running Kandula exampes
> > >     When I follow the following steps to test the Kandula exampes, I met
> > some problems. Sorry I
> > > am
> > > a newbie.
> > > 
> > > step 1 Get the kandula from
> > > http://svn.apache.org/repos/asf/webservices/kandula/branches/Kandula_1/
> > with svn client
> > > 	
> > > step 2 Install maven and set maven_home
> > > 	also
> > > 	Install java1.5 and set JAVA_HOME
> > > 	Install tomcat 5 and set CATALINA_HOME
> > > 	Install ant and set ant_home
> > > 	
> > > step 3 Download axis1.3 and install the axis example to
> > %CATALINA_HOME%/webapps/axis
> > > 	
> > > step 4 Modify %KANDULA_HOME%/conf/kandula.properties to build Kandula with
> > maven. If necessary,
> > > modify %KANDULA_HOME%/conf/endpoints.conf,	currently, there is no file
> > named endpoints.conf, but
> > > it is no matter if we use the default url http://localhost:8080/axis/.
> > > 	
> > > step 5 Copy kandula-0.2-SNAPSHOT.jar in %KANDULA_HOME%/target/ directory
> > and jars in
> > > %KANDULA_HOME%/target/lib/ to
> > > 	%CATALINA_HOME%/webapps/axis/WEB-INF/lib/
> > > 
> > > step 6 Download jotm(Mine is jotm-2.0.10) software and copy jotm*.jar to
> > > %CATALINA_HOME%/webapps/axis/WEB-INF/lib/
> > > 
> > > step 7 Download j2ee.jar from internet and copy it
> > %CATALINA_HOME%/webapps/axis/WEB-INF/lib/
> > > 
> > > step 8 Build the two Kandula samples with "ant dist" in
> > %KANDULA_HOME%/src/samples/interopibm
> > > and
> > > %KANDULA_HOME%/src/samples/test-suite1,
> > > 	and copy the built jars named "interop-ibm.jar", "test-suite1.jar" to
> > > %KANDULA_HOME%/target/lib/
> > > 
> > > step 9 Run tomcat to start the web services
> > > 
> > > step 10 Copy server-config.wsdd in %KANDULA_HOME%/src/conf to
> > > %CATALINA_HOME%/webapps/axis/WEB-INF/. Note: 
> > > 	The global type mappings provided in
> > %KANDULA_HOME%/conf/server-config.wsdd are used by the
> > > WS-Addressing
> > > 	implementation and *must be* copied to the server-config.wsdd, so I can
> > not deploy it with
> > > command "java -
> > > 	lhttp://localhosthost:8080/services/AdminService server-config.wsdd"?
> > > 		Deploy client web service described by client-config.wsdd file 
> provided
> > in %KANDULA_HOME%/conf
> > > with command:
> > > 		"java -classpath {classpath}
> > -lhttp://localhosthost:8080/services/AdminService
> > > client-config.wsdd"
> > > 
> > > step 11 Run the provided JUnit test cases by entering,
> > > 	ant test in %KANDULA_HOME%/src/samples/interop.
> > > 
> > > ------------------------------------------------
> > > 
> > > My question:
> > > 
> > > 1) When I run "ant test", it reports no class "InteropServiceTestCase"
> > error. Where is the class
> > > "InteropServiceTestCase"? 
> > > 
> > > 2) Where is
> > org.apache.ws.transaction.participant.j2ee.handler.TransactionHandler? and
> > where is
> > > "org.apache.ws.transaction.participant.j2ee.TransactionManagerGlue" ? How
> > to configure
> > > transactionManagerGlueImpl property in kandula.properties ? If I use jotm,
> > what's the value of
> > > transactionManagerGlueImpl property (The fully qualified class name of the
> > class implementing
> > > org.apache.ws.transaction.participant.j2ee.TransactionManagerGlue interface
> > for the transaction
> > > manager used by the application server runtime.)?
> > > 
> > >     In the guide:
> > >     "Modify the client-config.wsdd copied to
> > %CATALINA_HOME%/webapps/axis/WEB-INF/classes to
> > > deploy the
> > org.apache.ws.transaction.participant.j2ee.handler.TransactionHandler on
> > request
> > > flow.
> > > Also remove the
> > org.apache.ws.transaction.participant.standalone.handler.TransactionHandler
> > used
> > > by standalone clients.
> > >     The modified client-config.wsdd is shown below. 
> > > 	<deployment ...>
> > > 	    <globalConfiguration>
> > > 	        <requestFlow>
> > > 	            <handler type="java:org.apache.axis.message.
> > > 	                addressing.handler.AddressingHandler" />
> > > 	        	    <handler
> > >
> > 
> type="java:org.apache.ws.transaction.participant.j2ee.handler.TransactionHandle
> r"/>
> > > 	        				...        
> > > 	        </requestFlow>
> > > 	        <responseFlow>
> > > 	               	<handler
> > > type="java:org.apache.axis.message.addressing.handler.AddressingHandler"
> > > />
> > > 	               			...        
> > > 	        </responseFlow>
> > > 	        	...  
> > > 	     </globalConfiguration>
> > > 	...
> > > 	</deployment>
> > > 	"
> > > 
> > >     But, the client-config.wsdd is:
> > >     ...
> > >   <globalConfiguration>
> > > 	<parameter name="sendMultiRefs" value="false"/>
> > > 	<parameter name="disablePrettyXML" value="true"/>
> > >     <requestFlow>
> > > 		<handler
> > type="java:org.apache.axis.message.addressing.handler.AddressingHandler" />
> > >  		<handler 
> type="java:org.apache.kandula.coordinator.at.TxHandler" />	
> > >     </requestFlow>
> > >     <responseFlow>
> > >     	<handler
> > type="java:org.apache.axis.message.addressing.handler.AddressingHandler" />
> > >     </responseFlow>
> > >   </globalConfiguration>
> > >   ...
> > >     It seems not match. Does "org.apache.kandula.coordinator.at.TxHandler"
> > in
> > > kandula-0.2-SNAPSHOT.jar correspond to
> > > "org.apache.ws.transaction.participant.j2ee.handler.TransactionHandler" in
> > > kandula-0.1-SNAPSHOT.jar ?
> > > 		
> > >     Thanks.  	



Wang Jun


		
___________________________________________________________ 
雅虎1G免费邮箱百分百防垃圾信 
http://cn.mail.yahoo.com/

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


Mime
View raw message