Hi,
I followed your instructions, but I still saw the failure as shown below.
It seems that the web services are running under 8080. Does the
binding.axis2 now honor the port from the soap address in the WSDL?
Thanks,
Raymond
log4j:WARN No appenders could be found for logger
(org.apache.axiom.om.util.StAXUtils).
log4j:WARN Please initialize the log4j system properly.
Calling account service for customer: 1234
Checking account: CHA_1234, balance:500.0
Savings account: SAA_1234, balance:1500.0
Stock account: STA_1234, symbol:IBM, quantity:100
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy7.getQuote(Unknown Source)
at
bigbank.account.AccountServiceImpl.getAccountReport(AccountServiceImpl.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invokeTarget(JavaTargetInvoker.java:112)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke(JavaTargetInvoker.java:134)
at
org.apache.tuscany.sca.implementation.java.invocation.PassByValueInvoker.invoke(PassByValueInvoker.java:61)
at
org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke(TargetInvokerInvoker.java:46)
at
org.apache.tuscany.sca.core.invocation.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:84)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:73)
at $Proxy4.getAccountReport(Unknown Source)
at bigbank.client.BigBankClient.main(BigBankClient.java:42)
Caused by: org.apache.axis2.AxisFault: Connection refused: connect
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:221)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
at
org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:92)
at
org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:71)
at
org.apache.tuscany.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
at
org.apache.tuscany.sca.core.invocation.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:84)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:73)
... 14 more
Caused by: org.apache.axis2.AxisFault: Connection refused: connect
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:314)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)
... 22 more
Caused by: org.apache.axis2.AxisFault: Connection refused: connect
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:179)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
... 23 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
at java.net.Socket.connect(Socket.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:558)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)
... 25 more
----- Original Message ----- From: "Jean-Sebastien Delfino"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 22, 2007 11:27 PM
Subject: Re: svn commit: r540764 [1/2] - in
/incubator/tuscany/java/sca/demos: ./ bigbank-account/
bigbank-account/src/ bigbank-account/src/main/
bigbank-account/src/main/java/ bigbank-account/src/main/java/bigbank/
bigbank-account/src/main/java/bigbank/account/ bi
Raymond Feng wrote:
Hi, Sebastien.
I'm trying to play with this cool demo and I have a few questions:
1) How can I start the stockquote and accountservice under different
HTTP ports (8081, 8082)?
2) What's the URL of the web 2.0 demo page?
In my case, I first started StockQuoteServer, CalculatorServer and
BigBankServer. Then when I tried to run BigBankClient, it failed with
an exception complaining "connect refused". I guess it tried to connect
to the port 8081 or 8082.
Thanks,
Raymond
The port numbers are configured in the bindings of the various services:
StockQuoteService uses port 8081, as configured in StockQuote.wsdl
AccountService uses port 8082, as configured in AccountService.wsdl
The way the demo is configured, you can do the following:
- First start both the StockQuoteServer and CalculatorServer
- Then run BigBankClient. It will make a local to call the
AccountService, which will in turn invoke the StockQuote service over
SOAP and Calculator service over RMI.
- Or run BigBankServer, and invoke the AccountService Web service using
a SOAP client tool. I've been successful with the Web Services tool from
the Eclipse WTP project (just right click on AccountService.wsdl and go
from there).
- Or deploy demo-bigbank-account .war to Tomcat (in this case the
AccountService will be provided on port 8080) and again invoke the
AccountService Web Service using your Web Services tool. When running on
top of Tomcat, the demo also provides a DOJO based UI at
http://localhost:8080/demo-bigbank-account/, which will will invoke the
AccountService JSON-RPC service when you click the getAccountReport
button.
BigBankClient runs the same SCA composites as BigBankServer, so you'll
get AddressInUse errors if you try to run it at the same time as
BigBankServer. If you wanted to have a separate BigBankClient talking
to the AccountService Web service it would have to be in a different
Maven module and use a different composite containing an SCA reference
for the AccountService.
--
Jean-Sebastien