--- Dasarath Weeratunge <[EMAIL PROTECTED]>写道:
> Quoting Jack Wang <[EMAIL PROTECTED]>:
> 
> >     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
> 
> did you deploy the samples? Once you deploy Kandula, you HAVE TO build and 
> deploy the samples.
> 

Yes, I deployed the sample. But I can not visit
http://wsi.alphaworks.ibm.com:8080/wsts/services/InteropService?wsdl to test 
the wsdl, so I think
maybe InteropService is not available, so I use my service. My service's wsdd 
is:

 <service name="OrderProcessor" provider="java:RPC">
  <parameter name="allowedMethods" value="processOrder,returnOrder,getString"/>
  <parameter name="className" value="tests.axis.po.BeanService"/>
  <beanMapping languageSpecificType="java:tests.axis.po.Order" 
qname="ns69:Order"
xmlns:ns69="urn:BeanService"/>
 </service>

BeanService.java's code is created by wsdl2java, and the code is like:
...
public interface BeanService extends java.rmi.Remote {
    public java.lang.String getString() throws java.rmi.RemoteException;
    public java.lang.String processOrder(Order order) throws 
java.rmi.RemoteException;
    public Order returnOrder(Order order) throws java.rmi.RemoteException;
}

  And OrderProcessorSoapBindingStub's getString method is:
    public java.lang.String getString() throws java.rmi.RemoteException {
        if (super.cachedEndpoint == null) {
            throw new org.apache.axis.NoEndPointException();
        }
        org.apache.axis.client.Call _call = createCall();
        _call.setOperation(_operations[0]);
        _call.setUseSOAPAction(true);
        _call.setSOAPActionURI("urn:foo");//_call.setSOAPActionURI("");
        
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
        _call.setOperationName(new 
javax.xml.namespace.QName("http://po.axis.tests";,
"getString"));

        setRequestHeaders(_call);
        setAttachments(_call);
 try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});

        if (_resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)_resp;
        }
        else {
            extractAttachments(_call);
            try {
                return (java.lang.String) _resp;
            } catch (java.lang.Exception _exception) {
                return (java.lang.String) 
org.apache.axis.utils.JavaUtils.convert(_resp,
java.lang.String.class);
            }
        }
  } catch (org.apache.axis.AxisFault axisFaultException) {
  throw axisFaultException;
}
    }


> >     
> >     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 > 
>       [TCPSnifferHelper] newUrl=http://centerhost:8080/services/OrderProcessor
> >     ERROR --- AddressingHandler.invoke(120) | Exception in AddressingHandler
> >     org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI 
> with
> 
> this exception is due to "soapAction" attribute of your Stub been empty. Set 
> it 
> to a non-null (non-empty) value. The problem arises when you use 
> ws-addressing.
>

  So OrderProcessor's wsdd is not like InteropService's wsdd, there is no 
soapAction and operation
defined. How can I create the wsdd like InteropService's, mybe this is just my 
mintake ? 



    I have no Impl java class, should I code this file ? The following is from 
previous e-mail.

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
> 
> 
> 
> 
> > 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.processClientReques
> t(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.processClientReques
> t(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.processClientReques
> t(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;desc
> ription&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]
> 
> 


Wang Jun

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

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

Reply via email to