You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by Chamikara Jayalath <ch...@gmail.com> on 2006/06/04 03:33:45 UTC

Re: [Axis2 1.0][Sandesha2] Problem connecting server RMSampleService

Hi Elodie,

Have you configured the tcp monitor correctly. You should start tomcat in
the port 8080 and have a mapping in tcp monitor from port 8070 to 8080.

Add the following additional line to the client code to send the request
through the ctp monitor.
        clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,"
http://localhost:8070/axis2/services/RMSampleService");


Chamikara


On 6/2/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hello
>
> Tools use: Axis2 1.0, Sandesha2 1.0 and apache-tomcat-5.5.15
> I'm trying to use the User guide example with the client
> "UserguideClient.java" in sandesha2 1.0-bin.zip. I use the
> RMSampleService.aar given in the Sandesha2-1.0-bin.zip. When I launch
> the client, it could never get a connection to the server. In the
> Console, I have no response. But when I have a look in TCPMon, I can see
> the request "CreateSequence" was sent, because the client didn't reveive
> the "ResponseCreateSequence". I tried to change the timeout but it
> doesn't solve the problem, I think the connection to the server is not
> available but the ERP is OK.
>
> A moment later, the time out error appeared for all request
> CreateSequence:
>
> POST /axis2/services/RMSampleService HTTP/1.1
> User-Agent: Axis2
> SOAPAction: http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
> Host: www.apache.org:8080
>
>
> java.net.ConnectException: Connection timed out
>    at java.net.PlainSocketImpl.socketConnect(Native Method)
>    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>    at java.net.Socket.connect(Socket.java:507)
>    at java.net.Socket.connect(Socket.java:457)
>    at java.net.Socket.<init>(Socket.java:365)
>    at java.net.Socket.<init>(Socket.java:178)
>    at org.apache.ws.commons.tcpmon.Connection.run(Connection.java:372)
>
>    Code Client
>
> package client;
>
> import javax.xml.namespace.QName;
> import org.apache.axiom.om.OMAbstractFactory;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMFactory;
> import org.apache.axiom.om.OMNamespace;
> import org.apache.axiom.soap.SOAPBody;
> import org.apache.axis2.AxisFault;
> import org.apache.axis2.Constants;
> import org.apache.axis2.addressing.EndpointReference;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.client.ServiceClient;
> import org.apache.axis2.client.async.AsyncResult;
> import org.apache.axis2.client.async.Callback;
> import org.apache.axis2.context.ConfigurationContext;
> import org.apache.axis2.context.ConfigurationContextFactory;
> import org.apache.sandesha2.client.SandeshaClientConstants;
>
> public class UserguideEchoClient {
>
>    private final static String applicationNamespaceName =
> "http://tempuri.org/";
>    private final static String echoString = "echoString";
>    private final static String Text = "Text";
>    private final static String Sequence = "Sequence";
>    private final static String echoStringResponse = "echoStringResponse";
>    private final static String EchoStringReturn = "EchoStringReturn";
>    private static String toEPR =
> "http://localhost:8080/axis2/services/RMSampleService";
>
>    private static String CLIENT_REPO_PATH =
> "/home/mancinee/workspace/exemplewsrm/client/Client_Repo";
>
>    public static void main(String[] args) throws AxisFault,
> InterruptedException{
>
>        String axis2_xml = CLIENT_REPO_PATH + "/client_axis2.xml";
>        System .out.println (axis2_xml);
>        ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
>
>        ServiceClient serviceClient = new ServiceClient
> (configContext,null);
>
>        Options clientOptions = new Options ();
>        clientOptions.setTo(new EndpointReference (toEPR));
>        clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>        clientOptions.setUseSeparateListener(true);
>        serviceClient.setOptions(clientOptions);
>
> //      serviceClient.engageModule(new QName ("sandesha2"));
> //      serviceClient.engageModule(new QName ("addressing"));
>
>
>        clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
>        Callback callback1 = new TestCallback ("Callback 1");
>        serviceClient.sendReceiveNonBlocking
> (getEchoOMBlock("echo1","sequence1"),callback1);
>        Callback callback2 = new TestCallback ("Callback 2");
>
> serviceClient.sendReceiveNonBlocking
> (getEchoOMBlock("echo2","sequence1"),callback2);
>
>
>        clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
>        Callback callback3 = new TestCallback ("Callback 3");
>
> serviceClient.sendReceiveNonBlocking
> (getEchoOMBlock("echo3","sequence1"),callback3);
>
>
>        while (!callback1.isComplete()) {
>            Thread.sleep(1000);
>        }
>
>        Thread.sleep(4000);
>
>    }
>
>    private static OMElement getEchoOMBlock(String text, String
> sequenceKey) {
>        OMFactory fac = OMAbstractFactory.getOMFactory();
>        OMNamespace applicationNamespace =
> fac.createOMNamespace(applicationNamespaceName,"ns1");
>        OMElement echoStringElement = fac.createOMElement(echoString,
> applicationNamespace);
>        OMElement textElem = fac.createOMElement
> (Text,applicationNamespace);
>        OMElement sequenceElem =
> fac.createOMElement(Sequence,applicationNamespace);
>
>        textElem.setText(text);
>        sequenceElem.setText(sequenceKey);
>        echoStringElement.addChild(textElem);
>        echoStringElement.addChild(sequenceElem);
>
>        return echoStringElement;
>    }
>
>    static class TestCallback extends Callback {
>
>        String name = null;
>        public TestCallback (String name) {
>            this.name = name;
>        }
>
>        public void onComplete(AsyncResult result) {
>            SOAPBody body = result.getResponseEnvelope().getBody();
>
>            OMElement echoStringResponseElem =
> body.getFirstChildWithName(new QName
> (applicationNamespaceName,echoStringResponse));
>            OMElement echoStringReturnElem =
> echoStringResponseElem.getFirstChildWithName(new QName
> (applicationNamespaceName,EchoStringReturn));
>
>            String resultStr = echoStringReturnElem.getText();
>            System.out.println("Callback '" + name +  "' got result:" +
> resultStr);
>        }
>
>        public void onError (Exception e) {
>            System.out.println("Error reported for test call back");
>            e.printStackTrace();
>        }
>    }
> }
>
> Thanks for your time
>
> Regards
>
> Elodie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2 1.0][Sandesha2] Problem connecting server RMSampleService

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

I restart the setup of Axis2 and I download once time sandesha2. I make 
sure that the RMSampleService is available. No problem appears.

Logs give no information. But I join it nevertheless.
I don't inderstand where is the error.

Is the error can be due to the proxy?

I really appreciate your help. Thanks a lot.

Regards

Elodie


Chamikara Jayalath wrote:

> Hi Elodie,
>
> Could u make sure that the Axis2 is setup correctly and that the 
> RMSampleService is available when u list the services.
>
> Also check the tomcat logs to see weather u can get any clues to find 
> out the reason for HTTP 500 response.
>
> Chamikara



Re: [Axis2 1.0][Sandesha2] Problem connecting server RMSampleService

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Could u make sure that the Axis2 is setup correctly and that the
RMSampleService is available when u list the services.

Also check the tomcat logs to see weather u can get any clues to find out
the reason for HTTP 500 response.

Chamikara


On 6/7/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara
>
> Thanks for your help. You are all rigth.
>
> Now, I can access tomcat, but it returns an error: HTTP/1.1 500 Internal
> Error Servlet
> The server met an internal error which stopped the request. I can't say
> more because I do not have more information.
> The http request caugth in tcpmon is:
>
> POST /axis2/services/RMSampleService HTTP/1.1
> User-Agent: Axis2
> SOAPAction: http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
> Host: 127.0.0.1:8070
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
>
> 320
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <soapenv:Header>
>
> <wsa:To>http://127.0.0.1:8080/axis2/services/RMSampleService</wsa:To>
>          <wsa:ReplyTo>
>
> <wsa:Address>
> http://129.183.149.72:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__
> </wsa:Address>
>          </wsa:ReplyTo>
>
> <wsa:MessageID>urn:uuid:07B228029E7191235511496802483123</wsa:MessageID>
>
> <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
> </wsa:Action>
>       </soapenv:Header>
>       <soapenv:Body>
>          <wsrm:CreateSequence
> xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm">
>             <wsrm:AcksTo>
>
> <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
>             </wsrm:AcksTo>
>          </wsrm:CreateSequence>
>       </soapenv:Body>
>    </soapenv:Envelope>0
>
> Do you have an idea?
>
> Elodie
>
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > Have you configured the tcp monitor correctly. You should start tomcat
> > in the port 8080 and have a mapping in tcp monitor from port 8070 to
> 8080.
> >
> > Add the following additional line to the client code to send the
> > request through the ctp monitor.
> >
> > clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,"
> http://localhost:8070/axis2/services/RMSampleService");
> >
> >
> > Chamikara
> >
>
>

Re: [Axis2 1.0][Sandesha2] Problem connecting server RMSampleService

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara

Thanks for your help. You are all rigth.

Now, I can access tomcat, but it returns an error: HTTP/1.1 500 Internal 
Error Servlet
The server met an internal error which stopped the request. I can't say 
more because I do not have more information.
The http request caugth in tcpmon is:

POST /axis2/services/RMSampleService HTTP/1.1
User-Agent: Axis2
SOAPAction: http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
Host: 127.0.0.1:8070
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
 
320
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <soapenv:Header>
         
<wsa:To>http://127.0.0.1:8080/axis2/services/RMSampleService</wsa:To>
         <wsa:ReplyTo>
            
<wsa:Address>http://129.183.149.72:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__</wsa:Address>
         </wsa:ReplyTo>
         
<wsa:MessageID>urn:uuid:07B228029E7191235511496802483123</wsa:MessageID>
         
<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
         <wsrm:CreateSequence 
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm">
            <wsrm:AcksTo>
               
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
            </wsrm:AcksTo>
         </wsrm:CreateSequence>
      </soapenv:Body>
   </soapenv:Envelope>0

Do you have an idea?

Elodie


Chamikara Jayalath wrote:

> Hi Elodie,
>
> Have you configured the tcp monitor correctly. You should start tomcat 
> in the port 8080 and have a mapping in tcp monitor from port 8070 to 8080.
>
> Add the following additional line to the client code to send the 
> request through the ctp monitor.
>         
> clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,"http://localhost:8070/axis2/services/RMSampleService");
>
>
> Chamikara
>


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