I met questions again.
    Question 1) It seems I can not access web service from
http://wsi.alphaworks.ibm.com:8080/wsts/services/InteropService
        or http://wsi.alphaworks.ibm.com:8080/wsts/services/InteropService
        from there is no response from 
http://wsi.alphaworks.ibm.com:8080/services/InteropService?wsdl or
        http://wsi.alphaworks.ibm.com:8080/wsts/services/InteropService?wsdl
        
        Question 2) So I change InitiatorApp.java to use my web service from
http://centerhost:8080/services/OrderProcessor.
        I have change "localhost" to "centerhost". Web service 
activationCoordinator and
completionInitiator are deployed and run correctly
        with no stub called, but it will report error when it calls stub with 
method
testTestCompletionCommit(). I get the stub by method
        getTestService(). I paste the code here. 
        ------------------------------------------------
        public void testCommit() throws Exception {
                begin();
                System.out.println("testCommit() ");
                // Comment it to stop the stub call. There is no error message, 
so I have deployed the server
service correctly.
                // But when I call method testTestCompletionCommit(), error 
message comes, please see the
message detail in the following.
                //testTestCompletionCommit();
                commit();
        }

        // Call IBM InteropService
        public void testCompletionCommit() throws Exception {
                
getInteropService().completionCommit(KANDULA_ACTIVATION_SERVICE);
        }
        
        // Call my OrderProcessor
        public void testTestCompletionCommit() throws Exception {
                // The service which has Method getString() is deployed 
correctly. I have checked by 
                // http://centerhost:8080/services/OrderProcessor?wsdl
                // Should I implement method completionCommit(),...in my web 
service (BeanService.java) ? please
see Question 3
                System.out.println("[InitiatorApp] test call the stub of mine: 
" +
getTestService().getString());
        }

        // Get the stub of my OrderProcessor
        private BeanService getTestService() throws Exception {
                return new BeanServiceServiceLocator().getOrderProcessor(new
URL(TCPSnifferHelper.redirect(testService)));
        }
                
        public void begin() throws Exception {
                ActivationStub stub = new ActivationStub(new
EndpointReference("http://centerhost:8081/services/activationCoordinator";));
                ctx = 
stub.createCoordinationContext(ATCoordinator.COORDINATION_TYPE_ID);
                // tcpmon is OK. 8081 to 8080
                cps = ctx.register(ATCoordinator.PROTOCOL_ID_COMPLETION,new
EndpointReference("http://centerhost:8081/services/completionInitiator";));
                SetCoordCtxHandler.setCtx(ctx);
        }
        public void commit() throws Exception {
                SetCoordCtxHandler.setCtx(null);
                new CompletionCoordinatorStub(new CallbackImpl(), 
cps).commitOperation(null);
        }
        

        The error message from calling my web service: 
http://centerhost:8080/services/OrderProcessor
        ------------------------------------------
        testCommit() begin() ...[TCPSnifferHelper] 
oldUrl=wsi\.alphaworks\.ibm\.com:8080
        [TCPSnifferHelper] 
newUrl=http://centerhost:8081/services/activationCoordinator
        [TCPSnifferHelper] oldUrl=wsi\.alphaworks\.ibm\.com:8080
        [TCPSnifferHelper] 
newUrl=http://centerhost:8081/services/registrationCoordinator
        testCommit() --> ...[TCPSnifferHelper] 
oldUrl=wsi\.alphaworks\.ibm\.com:8080
        [TCPSnifferHelper] newUrl=http://centerhost:8080/services/OrderProcessor
        ERROR --- AddressingHandler.invoke(120) | Exception in AddressingHandler
        org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI 
with empty parameters.
        at org.apache.axis.types.URI.initialize(URI.java:614)
        at org.apache.axis.types.URI.<init>(URI.java:311)
        at org.apache.axis.types.URI.<init>(URI.java:272)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.processClientRequest(AddressingHandler.java:240)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.invoke(AddressingHandler.java:108)
        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at
centerhost.services.OrderProcessor.OrderProcessorSoapBindingStub.getString(OrderProcessorSoapBindingStub.java:196)
        at InitiatorApp.testTestCompletionCommit(InitiatorApp.java:58)
        at InitiatorApp.testCommit(InitiatorApp.java:70)
        at InitiatorApp.main(InitiatorApp.java:168)
        Exception in thread "main" AxisFault
         faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
         faultSubcode: 
         faultString: org.apache.axis.types.URI$MalformedURIException: Cannot 
initialize URI with empty
parameters.
         faultActor: 
         faultNode: 
         faultDetail: 
        
{http://xml.apache.org/axis/}stackTrace:org.apache.axis.types.URI$MalformedURIException:
 Cannot
initialize URI with empty parameters.
        at org.apache.axis.types.URI.initialize(URI.java:614)
        at org.apache.axis.types.URI.&lt;init&gt;(URI.java:311)
        at org.apache.axis.types.URI.&lt;init&gt;(URI.java:272)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.processClientRequest(AddressingHandler.java:240)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.invoke(AddressingHandler.java:108)
        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at
centerhost.services.OrderProcessor.OrderProcessorSoapBindingStub.getString(OrderProcessorSoapBindingStub.java:196)
        at InitiatorApp.testTestCompletionCommit(InitiatorApp.java:58)
        at InitiatorApp.testCommit(InitiatorApp.java:70)
        at InitiatorApp.main(InitiatorApp.java:168)
        {http://xml.apache.org/axis/}hostname:USER-CAD99D95EE
        org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI 
with empty parameters.
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.invoke(AddressingHandler.java:121)
        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at
centerhost.services.OrderProcessor.OrderProcessorSoapBindingStub.getString(OrderProcessorSoapBindingStub.java:196)
        at InitiatorApp.testTestCompletionCommit(InitiatorApp.java:58)
        at InitiatorApp.testCommit(InitiatorApp.java:70)
        at InitiatorApp.main(InitiatorApp.java:168) Caused by:
org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI with 
empty parameters.
        at org.apache.axis.types.URI.initialize(URI.java:614)
        at org.apache.axis.types.URI.<init>(URI.java:311)
        at org.apache.axis.types.URI.<init>(URI.java:272)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.processClientRequest(AddressingHandler.java:240)
        at
org.apache.axis.message.addressing.handler.AddressingHandler.invoke(AddressingHandler.java:108)
        ... 13 more

        And when I call IBM web service InteropService, the error message is:
        ------------------------------------------
        [TCPSnifferHelper] oldUrl=wsi\.alphaworks\.ibm\.com:8080
        [TCPSnifferHelper] 
returnUrl=http://centerhost:8081/services/registrationCoordinator
        testCommit() --> getInteropService().commit(null)
        [TCPSnifferHelper] oldUrl=wsi\.alphaworks\.ibm\.com:8080
        [TCPSnifferHelper] 
returnUrl=http://centerhost:8082/wstx/services/InteropService
        [InitiatorApp] getInteropService()[EMAIL PROTECTED]
        Exception in thread "main" AxisFault
         faultCode: {http://xml.apache.org/axis/}HTTP
         faultSubcode: 
         faultString: (404)/wstx/services/InteropService
         faultActor: 
         faultNode: 
         faultDetail: 
                {}:return code:  404
        &lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.5.12 - Error
report&lt;/title&gt;&lt;style&gt;&lt;!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
 H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
 H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
 BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
 {color :
black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt;
&lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 -
/wstx/services/InteropService&lt;/h1&gt;&lt;HR size=&quot;1&quot;
noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status
report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt;
&lt;u&gt;/wstx/services/InteropService&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt;
&lt;u&gt;The requested resource (/wstx/services/InteropService) is not
available.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot;
noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache 
Tomcat/5.5.12&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;
                {http://xml.apache.org/axis/}HttpErrorCode:404
        (404)/wstx/services/InteropService
                at 
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
                at 
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
                at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
                at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)


        Question 3) My development environment is eclipe IDE,Tomcat 5.5.12. I 
deploy the web service by
command:
        java org.apache.axis.client.AdminClient 
-lhttp://centerhost:8080/services/AdminService
deploy.wsdd.
        And the stub is created by wsdl2java command, not by ant.
        I compared my code created by wsdl2java and the code given by example 
InitiatorApp. I note I miss
the Impl file.
        
        InitiatorApp web service from IBM
                a) InteropServiceSoapBindingStub extends 
org.apache.axis.client.Stub implements
InteropService_PortType
                b) interface InteropService_PortType extends java.rmi.Remote
                        This interface has commit(), rollback() etc method. ==> 
So many methods here ! <==
                c) InteropServiceServiceLocator extends 
org.apache.axis.client.Service implements
InteropServiceService
                d) InteropServiceSoapBindingImpl implements 
InteropService_PortType
        My web service
                a) OrderProcessorSoapBindingStub extends 
org.apache.axis.client.Stub implements
centerhost.services.OrderProcessor.BeanService
                b) interface BeanService extends java.rmi.Remote
                        But my interface has only three method: getString(), 
processOrder() etc, no commit(),
rollback(). ==> Should I implement these
                        method in BeanService.java? <== For the interface is 
created from BeanService.java, which is my
web service, and I do 
                        the test to     call from the stub. 
                c)  BeanServiceServiceLocator extends 
org.apache.axis.client.Service implements
centerhost.services.OrderProcessor.BeanServiceService
                d)      NO Impl java class file, why ? What's the relation 
between InteropServiceSoapBindingImpl.java
and InteropServiceSoapBindingStub.java ?

Thanks.

--- Dasarath Weeratunge <[EMAIL PROTECTED]>写道:
> Quoting Jack Wang <[EMAIL PROTECTED]>:
> 
> >     Thanks to Dasarath Weeratunge and Thilina Gunarathne. Now I have two
> > questions.
> >   Question 1) I will do a test to use  the stub. Inexample InitiatorApp, 
> > http://localhost:8081/axis/services/activationCoordinator should be 
> > deployed,
> > but I can not find the wsdd file , should I use the wsdd to deploy this
> > service? I think I should use the url
> > http://localhost:8080/services/activationCoordinator, for port 8080 is set 
> > in
> > tomcat's server.conf. 
> 
> To deploy Kandula_1 services (all of them) and the two sample applications 
> use 
> the server-config.wsdd in %kandula_install%/src/conf. If you only deploy the 
> interopIBM sample comment out the "service" element corresponding to test-
> suite1 when you copy it to WEB-INF of axis. You also need to copy the client-
> config.wsdd file to WEB-INF/classes. Further make sure that you change the 
> handler settings depending on the sample that you are testing as explained in 
> README.1st
> 
> You do not need to change any of the ports in URLs in kandula_1. Just make 
> sure you forward port 8081 to 8080 using tcp monitor. This is done for 
> debugging. No need to change any tomcat settings either.
> 
> 
> >   Question 2) In the guide of
> > "D:\miscsoft\kandula\webservices\kandula\branches\Kandula_1\xdocs\user-
> guide.html",
> >  it seems to have a directory to save the whole contents of KANDULA_HOME,
> > which contains *.java,*.xml,*.properties,*.html etc. But I only get the
> > source by rapidSVN in Source Repository
> > http://svn.apache.org/repos/asf/webservices/kandula/branches/Kandula_1/
> 
> the directory to which you checked-out kandula_1 (the above URL) is what is 
> referred to as kandula_home, kandula_install etc. Also, until you do a maven 
> build you will not find the source for stubs.
> 
> \ , so
> > I can not find directory %KANDULA_HOME%/, and file conf/jta.conf.
> > .../Kandula_1/src/conf has only three files, no jta.conf. Please ask where 
> > is
> > %KANDULA_HOME% ? Thanks.
> 
> there is no jta.conf file nor an endpoints.conf file in the new code. 
> However, 
> there is a kandula.properties file in %kandula_install%/src/conf with the 
> property kandula.context. If you deploy axis under URI 
> http://localhost:8080/axis/services/ you do not need to change this property. 
> However, you MUST change it BEFORE you build kandula_1 otherwise.
> 
> thanks,
> --dasarath
> 
> > 
> > 
> > Wang Jun
> >             
> > ---------------------------------
> > 快来雅虎邮箱发贺卡,拜大年啦! 
> 
> 
> 
> 


Wang Jun


        

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

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

Reply via email to