Re: Does clustering broadcast client's requests?

2008-11-02 Thread Igor Nogueira
Thanks again  Paul!

2008/11/1 Paul Fremantle [EMAIL PROTECTED]

 Only one node receives the request. Clustering shares the context across
 nodes.

 You can use mod_proxy to distribute the request to a server, or
 Synapse has some intelligent load-balancing code to do it.

 Paul

 On Sat, Nov 1, 2008 at 2:03 AM, Igor Nogueira
 [EMAIL PROTECTED] wrote:
  Hello guys, I was reading about clustering support and I have a doubt.
 Does
  clustering broadcast client's requets to all nodes or just replicate the
  context? I mean, for example, if I have some services that save
 information
  on a database, would all nodes in the cluster
  do it or only the one that actually received the client's invocation?
 
 
  Thanks in advance!
 
  Igor Nogueira Santos
 



 --
 Paul Fremantle
 Co-Founder and CTO, WSO2
 Apache Synapse PMC Chair
 OASIS WS-RX TC Co-chair

 blog: http://pzf.fremantle.org
 [EMAIL PROTECTED]

 Oxygenating the Web Service Platform, www.wso2.com

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




Does clustering broadcast client's requests?

2008-10-31 Thread Igor Nogueira
Hello guys, I was reading about clustering support and I have a doubt. Does
clustering broadcast client's requets to all nodes or just replicate the
context? I mean, for example, if I have some services that save information
on a database, would all nodes in the cluster
do it or only the one that actually received the client's invocation?


Thanks in advance!

Igor Nogueira Santos


Re: Clustering and passive replication

2008-10-21 Thread Igor Nogueira
Thanks Afkham!

2008/10/21 Afkham Azeez [EMAIL PROTECTED]

 Hi Igor,
 At the moment, a member can only be started in the ACTIVE state. I started
 work last week on making it possible to configure a member to be ACTIVE or
 PASSIVE in the cluster configuration section. Part of this work is already
 available in the trunk. When an active member fails, the coordinator will
 activate one of the passive members. Also, the passive member will not start
 any transport listeners, hence will not be able to do anything useful until
 it is activated. Hopefully, this feature will be available in the next Axis2
 release.

 Also like Paul said, you can use a Linux HA setup to achieve the same.

 Thanks
 Azeez


 On Tue, Oct 21, 2008 at 4:21 AM, Igor Nogueira 
 [EMAIL PROTECTED] wrote:

 Thanks Paul! So, with clustering I can only use active replication,  ins't
 it?

 Best regards,

 Igor Nogueira

 2008/10/20 Paul Fremantle [EMAIL PROTECTED]

 Igor

 Typically you would do this without Axis2 being aware of it - e.g.
 either using a Linux IP renegotiation system or Linux HA, or by
 setting up your IP sprayer (or mod_proxy) that way.

 Paul

 On Mon, Oct 20, 2008 at 2:11 AM, Igor Nogueira
 [EMAIL PROTECTED] wrote:
  Guys is it possible to build a classic passive replication schema with
 axis2
  clustering support? I mean, only one of the servers actually answers
 the
  client's invocations while the backup replicas sleep ?
 
  Thanks in advance,
 
  Igor Nogueira
 



 --
 Paul Fremantle
 Co-Founder and CTO, WSO2
 Apache Synapse PMC Chair
 OASIS WS-RX TC Co-chair

 blog: http://pzf.fremantle.org
 [EMAIL PROTECTED]

 Oxygenating the Web Service Platform, www.wso2.com

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





 --
 Thanks
 Afkham Azeez

 Blog: http://afkham.org
 Developer Portal: http://www.wso2.org
 WSAS Blog: http://wso2wsas.blogspot.com
 Company: http://wso2.com
 GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760



Re: Clustering and passive replication

2008-10-20 Thread Igor Nogueira
Thanks Paul! So, with clustering I can only use active replication,  ins't
it?

Best regards,

Igor Nogueira

2008/10/20 Paul Fremantle [EMAIL PROTECTED]

 Igor

 Typically you would do this without Axis2 being aware of it - e.g.
 either using a Linux IP renegotiation system or Linux HA, or by
 setting up your IP sprayer (or mod_proxy) that way.

 Paul

 On Mon, Oct 20, 2008 at 2:11 AM, Igor Nogueira
 [EMAIL PROTECTED] wrote:
  Guys is it possible to build a classic passive replication schema with
 axis2
  clustering support? I mean, only one of the servers actually answers the
  client's invocations while the backup replicas sleep ?
 
  Thanks in advance,
 
  Igor Nogueira
 



 --
 Paul Fremantle
 Co-Founder and CTO, WSO2
 Apache Synapse PMC Chair
 OASIS WS-RX TC Co-chair

 blog: http://pzf.fremantle.org
 [EMAIL PROTECTED]

 Oxygenating the Web Service Platform, www.wso2.com

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




In-flow handler before dispatching?

2008-10-20 Thread Igor Nogueira
Guys, on axis2.xml file there's the following message:

!--

After Postdispatch phase module author or service author can add any
phase he want

  --


I'd like to know if it would be safe to add a handler before
PostDispatch?. I mean, if I return InvocationResponse.CONTINUE; on the
handler's invoke method would the inflow continue properly? Or is not wise
to interfer on the flow until Post dispatch ;-)

Thanks i advance,

Igor Nogueira


Re: In-flow handler before dispatching?

2008-10-20 Thread Igor Nogueira
Ok guys! Thank you very much!


2008/10/20 Deepal jayasinghe [EMAIL PROTECTED]

 Igor Nogueira wrote:
  Guys, on axis2.xml file there's the following message:
 
  !--
  After Postdispatch phase module author or service author can add any
 phase he want
--
 
 
  I'd like to know if it would be safe to add a handler before
  PostDispatch?
 You can add handler anywhere you want.
 (That comment is very old and we need to remove that from the document)
  I mean, if I return InvocationResponse.CONTINUE; on the handler's
  invoke method would the inflow continue properly? Or is not wise to
  interfer on the flow until Post dispatch ;-)
 
  Thanks i advance,
 
  Igor Nogueira
 
 


 --
 Thank you!


 http://blogs.deepal.org


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




Clustering and passive replication

2008-10-19 Thread Igor Nogueira
Guys is it possible to build a classic passive replication schema with axis2
clustering support? I mean, only one of the servers actually answers the
client's invocations while the backup replicas sleep ?

Thanks in advance,

Igor Nogueira


Re: In-flow request insertion

2008-10-15 Thread Igor Nogueira
Thanks! I'm thinking about invoking the normal way from the handler
creating the serviceclient, options etc...But I just need the original's
client's address in order to send the response to the client and not to the
handler, got it? ;-) So on outflow I'd have to change the reply address form
the handler's address to the client's address...


Thank you very much!



2008/10/15 Amila Suriarachchi [EMAIL PROTECTED]



 On Tue, Oct 14, 2008 at 10:17 PM, Igor Nogueira 
 [EMAIL PROTECTED] wrote:


 Actually I want to develop a passive replication schema, so I have the
 handlers together in a group. If the Active member fails, I'll have to
 re-invoke the message, but in another handler in another server. I'm
 serializing the Messagecontext and moving it through the replicas, so when
 a
 fault is detected I'll invoke the message again, but in another service .
 Is
 there a way to do that?I tryed to use LocalTranportSender, but it returns
 me
 a nullexception error...I've opened another thread on the list about
 it...if
 you have time, could you take a lokk at it too? ;-)


 I am not clear about your requirement. But may be looking at Axis2
 clustering would be usefull to you.

 thanks,
 Amila.



 Thanks again!!!,

 Igor Nogueira


 Amila Suriarachchi wrote:
 
  On Mon, Oct 13, 2008 at 4:29 PM, Igor Nogueira
  [EMAIL PROTECTED]
  wrote:
 
  Amila, thank you! I've tested what you said, but I've got this
 exception:
  A message was added that is not valid. However, the operation context
  was
  complete.
 
 
  this means it try to add an Axis2 Message to an operation context which
  already has required number of Axis2 messages. This may happen when it
  goes
  through the dispatches again.
 
 
  Here's the code I'm using:
 
  contextomensagem.setCurrentHandlerIndex(0);
  contextomensagem.setCurrentPhaseIndex(0);
  AxisEngine engine = new
  AxisEngine(contextomensagem.getConfigurationContext());
  try {
  engine.receive(contextomensagem);
 
  you can simply called . AxisEngine.receive() since this is a static
  method.
 
 
  } catch (AxisFault e1) {
 
  e1.printStackTrace();
  return (e1.getReason());
  }
 
  contextomensagem is a static variable that keeps a copy of the
  MessageContext received at the invoke method. As I'm testing I didin't
  change the SOAPEnvelope, I'm  just trying to re-send the same message.
 Is
  there something else to do?
 
 
  Are you experimenting with Axis2 Engine or what do you try to archive?
 why
  you want to send the same message twice?
 
  thanks,
  Amila.
 
 
 
  Thanks!
 
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 
 

 --
 View this message in context:
 http://www.nabble.com/In-flow-request-insertion-tp19946886p19977558.html
 Sent from the Axis - User mailing list archive at Nabble.com.


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




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/



Re: In-flow request insertion

2008-10-15 Thread Igor Nogueira
 I am not clear about your requirement. But may be looking at Axis2
 clustering would be usefull to you.


   Amila, Basically I want to do this: I have several services distributed
on several servers. Only one of them will process client's requests- the
primary one. If the primary fails, then one of the sleeping replicas will be
elected as the new primary and will respond to the client's invocations from
this moment on. My problem is: If the primary fails processing a specific
client's invocation   the new elected primary must be aware of the client's
address in order to process and answer this request. On the next requests
the client will invoke the new functional primary, so there's no problem.
 On clustering used by Axis, all requests are spread to all replicas, ins't
it? In passive replication, only primary receives client's requests while
the replicas sleep. If the primary fails, a replica will be elected new
primary

Thanks!


Clustering

2008-10-15 Thread Igor Nogueira
Guys with Axis2 clusering is it possible to build passive or active
replication schemas? Or both? ;-)

Best Regards,

Igor Nogueira Santos


Re: Client address on messagecontext??

2008-10-15 Thread Igor Nogueira
So,  I must set the ReplyTo parameter explicitly  at the client before the
invocation ?
If I copy the :http://www.w3.org/2005/08/addressing/anonymous; endpoint I
can't trust the answer will be sent to the same specific client, isn't it?

Thanks,

Igor

2008/10/15 Amila Suriarachchi [EMAIL PROTECTED]



 On Wed, Oct 15, 2008 at 9:35 AM, Igor Nogueira 
 [EMAIL PROTECTED] wrote:

 Guys, I have a doubt. I have handler engaged on the inflow and outflow.
 I'd like to know what's the client's address . I tested the MessageContext's
 From and To  parameters  and I have the following situation:


 Does client sends the Addressing headers. if so this detail can be found in
 To Header.



 At Inflow:
 From value is 127.0.0.1 (I invoke the webservice from localhost);
 To value is http://127.0.0.1:8080/axis2/services/ShoppingCart1;.

 At outflow:
 From is null;
 To is :http://www.w3.org/2005/08/addressing/anonymous;


 This means the response is send in the back channel.  if the client
 message has given a reply to address it would have showed the address.

 thanks,
 Amila.




 Is it possible to retrieve the real client's address on the messagecontext
 received as parameter of the handler's invoke method? Or is it built on a
 later phase of OutFlow and I can' access it?



 Thanks in advance,

 Igor




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/



Re: In-flow request insertion

2008-10-14 Thread Igor Nogueira

Actually I want to develop a passive replication schema, so I have the
handlers together in a group. If the Active member fails, I'll have to
re-invoke the message, but in another handler in another server. I'm
serializing the Messagecontext and moving it through the replicas, so when a
fault is detected I'll invoke the message again, but in another service . Is
there a way to do that?I tryed to use LocalTranportSender, but it returns me
a nullexception error...I've opened another thread on the list about it...if
you have time, could you take a lokk at it too? ;-)

Thanks again!!!,

Igor Nogueira


Amila Suriarachchi wrote:
 
 On Mon, Oct 13, 2008 at 4:29 PM, Igor Nogueira
 [EMAIL PROTECTED]
 wrote:
 
 Amila, thank you! I've tested what you said, but I've got this exception:
 A message was added that is not valid. However, the operation context
 was
 complete.

 
 this means it try to add an Axis2 Message to an operation context which
 already has required number of Axis2 messages. This may happen when it
 goes
 through the dispatches again.
 

 Here's the code I'm using:

 contextomensagem.setCurrentHandlerIndex(0);
 contextomensagem.setCurrentPhaseIndex(0);
 AxisEngine engine = new
 AxisEngine(contextomensagem.getConfigurationContext());
 try {
 engine.receive(contextomensagem);

 you can simply called . AxisEngine.receive() since this is a static
 method.
 

 } catch (AxisFault e1) {

 e1.printStackTrace();
 return (e1.getReason());
 }

 contextomensagem is a static variable that keeps a copy of the
 MessageContext received at the invoke method. As I'm testing I didin't
 change the SOAPEnvelope, I'm  just trying to re-send the same message. Is
 there something else to do?

 
 Are you experimenting with Axis2 Engine or what do you try to archive? why
 you want to send the same message twice?
 
 thanks,
 Amila.
 


 Thanks!

 
 
 
 -- 
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/In-flow-request-insertion-tp19946886p19977558.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Client address on messagecontext??

2008-10-14 Thread Igor Nogueira
Guys, I have a doubt. I have handler engaged on the inflow and outflow. I'd
like to know what's the client's address . I tested the MessageContext's
From and To  parameters  and I have the following situation:

At Inflow:
From value is 127.0.0.1 (I invoke the webservice from localhost);
To value is http://127.0.0.1:8080/axis2/services/ShoppingCart1;.

At outflow:
From is null;
To is :http://www.w3.org/2005/08/addressing/anonymous;


Is it possible to retrieve the real client's address on the messagecontext
received as parameter of the handler's invoke method? Or is it built on a
later phase of OutFlow and I can' access it?



Thanks in advance,

Igor


Re: In-flow request insertion

2008-10-13 Thread Igor Nogueira
Amila, thank you! I've tested what you said, but I've got this exception:
A message was added that is not valid. However, the operation context was
complete.
Here's the code I'm using:

contextomensagem.setCurrentHandlerIndex(0);
contextomensagem.setCurrentPhaseIndex(0);
AxisEngine engine = new
AxisEngine(contextomensagem.getConfigurationContext());
try {
engine.receive(contextomensagem);
} catch (AxisFault e1) {

e1.printStackTrace();
return (e1.getReason());
}

contextomensagem is a static variable that keeps a copy of the
MessageContext received at the invoke method. As I'm testing I didin't
change the SOAPEnvelope, I'm  just trying to re-send the same message. Is
there something else to do?

Thanks!


Re: In-flow request insertion

2008-10-13 Thread Igor Nogueira
Is there something I need to rebuild? I mean has something been consumed
during the InFlow that I need to reset?

Regards,

Igor Nogueira

2008/10/13 Igor Nogueira [EMAIL PROTECTED]

 Amila, thank you! I've tested what you said, but I've got this exception:
 A message was added that is not valid. However, the operation context was
 complete.
 Here's the code I'm using:

 contextomensagem.setCurrentHandlerIndex(0);
 contextomensagem.setCurrentPhaseIndex(0);
 AxisEngine engine = new
 AxisEngine(contextomensagem.getConfigurationContext());
 try {
 engine.receive(contextomensagem);
 } catch (AxisFault e1) {

 e1.printStackTrace();
 return (e1.getReason());
 }

 contextomensagem is a static variable that keeps a copy of the
 MessageContext received at the invoke method. As I'm testing I didin't
 change the SOAPEnvelope, I'm  just trying to re-send the same message. Is
 there something else to do?

 Thanks!



LocalTransportSender nullexceptionerror

2008-10-13 Thread Igor Nogueira
Guys, I'm developing an handle. It is located at the postdispatch phase.
Actually, I copy the Messagecontext on a local static variable
everytime the handler's init method is called. On this handle, I may need
to to invoke another webservice operation. But, as I need to keep the
MessageContext's To parameter in order to send the new invocation respone
to the same client, I'm trying to use the Axis API.

Here's the code I'm trying:

Creating the Envelope to be sent:

public SOAPEnvelope creatSOAPEnvelop() {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope envelope = fac.getDefaultEnvelope();
OMNamespace omNs = fac.createOMNamespace(
http://ws.apache.org/axis2;, ns1);
OMElement method = fac.createOMElement(urn:createSession, omNs);
OMElement value = fac.createOMElement(urn:createSession, omNs);
value.setText(Hello);
method.addChild(value);
envelope.getBody().addChild(method);
return envelope;
 }

Here I try to use the LocalTransportSender:

LocalTransportSender sender = new LocalTransportSender();
ByteArrayOutputStream envelope = new ByteArrayOutputStream();
creatSOAPEnvelop().serialize(envelope);
sender.finalizeSendWithToAddress(contextomensagem, envelope);

contextomensagem is the variable I keep the MessageContext, it keeps the
To parameter. When I try this I receive java.lang.NullPointerException. Is
there something missing? Shouldn't the SOAPMessageBodyBasedDispatcher find
the action on the Envelope's body first element? Is there something else I
can do in order to fix it?

Thanks in advance,

Igor Nogueira Santos


In-flow request insertion

2008-10-12 Thread Igor Nogueira
Guys,  I have the following situation: I have a handler inserted on in-flow.
It's phase is located after postdispatch phase. On this handler I modify
the message, I mean the SOAPEnvelope and I'd like to re-send it to the
beginning of the in-flow, like a new invocation to the service. Is it
possible to do? If yes, what should I use?

Thanks in advance,

Igor Nogueira


Re: In-flow request insertion

2008-10-12 Thread Igor Nogueira
Hey Martin, Thanks for answering! But I didn't understand. I mean the first
phase of in-flow is TransportIn so shouldn't I send the message to this
point, at the beginnig of the flow? How could I define an action there?
Sorry me, but as a newbie at Axis and Java I'm confused ;-)

Thanks again!

Igor


Re: TCP port error

2008-10-10 Thread Igor Nogueira
Any idea? I've already disabled Windows firewall, but nothing happened. I
still get  Connection refused error. I'm sending the log outpupt, maybe
you can understand what is happening. ;-)

Thanks in advance,

Igor Nogueira


stdout_20081010.log
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: TCP port error

2008-10-10 Thread Igor Nogueira
I've noticed that my service EPR is:

Service EPR : http://localhost:8080/axis2/services/ShoppingCart

To invoke using TCP shouldn't it be
ftp://localhost:8080/axis2/services/ShoppingCart?
How can I do that? Do I have to change something on tomcat?

Best Regards,
Igor Nogueira


TCP error

2008-10-09 Thread Igor Nogueira
Guys, I'm trying to use the TCP protocol on axis. I've already uncommented
the tag on axis2.xml:

 transportReceiver name=tcp
   class=org.apache.axis2.transport.tcp.TCPServer
 parameter name=port6060/parameter


If I set the client to invoke tcp://
127.0.0.1:8080/axis2/services/ShoppingCart it gives me
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog I think
because of HTTP protocol.

If i set it to tcp://127.0.0.1:6060/axis2/services/ShoppingCart it gives
me:
 java.net.ConnectException: Connection refused: connect at
org.apache.axis2.transport.tcp.TCPTransportSender.openTheConnection(TCPTransportSender.java:122)
error.

Here's my client:

EndpointReference targetEPR = new EndpointReference(
tcp://127.0.0.1:6060/axis2/services/ShoppingCart);

  Options opts = new Options();
  opts.setTo(targetEPR );
  opts.setTransportInProtocol(Constants.TRANSPORT_TCP);
  opts.setAction(urn:createSession);

//engaging addressing
ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem
(D:\\axis2-1.4.1\\repository, null);
ServiceClient client = new ServiceClient(ctx,null);
client.setOptions(opts);
  OMElement testando = client.sendReceive(getPayload());

 private static OMElement getPayload() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
tcp://127.0.0.1:6060/axis2/services/ShoppingCart, );
OMElement method = fac.createOMElement(createSession, omNs);
OMElement value = fac.createOMElement(Text, omNs);
value.addChild(fac.createOMText(value, Axis2 Echo String ));
method.addChild(value);

return method;
}
Am I doing something wrong?

And another question, is there a way of using TCP protocol without engaging
addressing? I'm trying to invoke a web service from Jgroups. As it works
over TCP, I'll try to build the SOAP Envelope and send it from another group
member to test if I can invoke the service. This member may not be another
Web service, so I don't know if I'm able to use addressing on it...

Best Regards,

Igor Nogueira


Re: Jgroups

2008-10-08 Thread Igor Nogueira
I've post this doubt to Jgroups list and they told that it is possible.
That's the idea:

byte[] buf=marshal(envelope); // marshal() needs to generate a byte[] buffer
from the envelope
Message msg=new Message(null, null, buf);
disp.cast(null, msg, ...);

On the receiver side:
Object handle(Message req) {
 byte[] buf=msg.getBuffer();
 envelope=unmarshal(buf);

I know I can build a SOAPEnvelope with Axis and I'm marshaling the SOAP into
a byte[] this way:

ByteArrayOutputStream baos = new ByteArrayOutputStream();
SOAPEnvelope envelope = 
envelope.serialize(baos);
 My doubt is that the receiver side would be Axis2. In this case if I
engage a module to unmarshal the message, would it work even if the message
received ins't a SOAPEnvelope? Because that's the situation.


Best Regards,

Igor Nogueira


Re: UDP

2008-10-05 Thread Igor Nogueira
Thanks guys!  And yes, I'm interested! :-)


2008/10/5 Sanjiva Weerawarana [EMAIL PROTECTED]

 Igor Nogueira wrote:

 Guys, Does Axis2 work over UDP? I'm trying to invoke webservices form
 Jgroups and it's defalut protocol stack works with UDP.


 There's no UDP transport around right now but there was some interest in it
 due to the device profile using it too.

 Interested in helping write it? Should be straightforward ..

 Sanjiva.
 --
 Sanjiva Weerawarana, Ph.D.
 Founder  Director; Lanka Software Foundation; http://www.opensource.lk/
 Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
 Member; Apache Software Foundation; http://www.apache.org/
 Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

 Blog: http://sanjiva.weerawarana.org/

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




Re: UDP

2008-10-05 Thread Igor Nogueira
Thanks Andreas! I'll take a look at this.

2008/10/5 Andreas Veithen [EMAIL PROTECTED]

 There is an UDP transport implementation in Synapse. It's not yet sure
 whether it will remain in Synapse or move to the new WS-Commons transport
 project (Since I wrote it, I guess it's up to me to decide ;-).

 Andreas


 On 5 oct. 08, at 06:46, Sanjiva Weerawarana wrote:

  Igor Nogueira wrote:

 Guys, Does Axis2 work over UDP? I'm trying to invoke webservices form
 Jgroups and it's defalut protocol stack works with UDP.


 There's no UDP transport around right now but there was some interest in
 it due to the device profile using it too.

 Interested in helping write it? Should be straightforward ..

 Sanjiva.
 --
 Sanjiva Weerawarana, Ph.D.
 Founder  Director; Lanka Software Foundation; http://www.opensource.lk/
 Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
 Member; Apache Software Foundation; http://www.apache.org/
 Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

 Blog: http://sanjiva.weerawarana.org/

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



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




UDP

2008-10-04 Thread Igor Nogueira
Guys, Does Axis2 work over UDP? I'm trying to invoke webservices form
Jgroups and it's defalut protocol stack works with UDP.


Best regards,

Igor Nogueira


Re: Jgroups

2008-10-01 Thread Igor Nogueira
I mean is there a way to send SOAP envelopes with Jgroups?
Has anybody tryed it yet?

Best Regards,

Igor Nogueira Santos

2008/9/30 Igor Nogueira [EMAIL PROTECTED]

 Hello guys!
 I'd like to know if there's a way of invoking web services form Jgroups?
 I'd like to have some services in group and send/receive messages to them
 through Jgroups. As I'm working with replication, some of Jgroups features
 would be very useful to me.

 Thanks again,

 Igor Nogueira Santos.



Jgroups

2008-09-30 Thread Igor Nogueira
Hello guys!
I'd like to know if there's a way of invoking web services form Jgroups? I'd
like to have some services in group and send/receive messages to them
through Jgroups. As I'm working with replication, some of Jgroups features
would be very useful to me.

Thanks again,

Igor Nogueira Santos.


Re: ServiceContext in OperationContext does not match error

2008-09-24 Thread Igor Nogueira
  Hi Deepal! Thanks for answering! That´s what I wanna do: I have two
services. Service A and service B. Both are stateful, and they may not be on
the same server. Service A proccess the client's invocations and
consequently update the session state. Service B is a backup service and
sometimes need to have it's session updated with the values in service A's
state. To do this, I serialize the context in A and send it to B as a
string. In B I rebuild it and try to set B's context with this value. But
then I get that error. I'm using MessageContext to access the ServiceContext
where my values are saved.
I use MessageContext.getCurrentMessageContext().getServiceContext to do
this.



Thanks again!




2008/9/23 Deepal jayasinghe [EMAIL PROTECTED]

 
  Hello guys!
   I get the ServiceContext in OperationContext does not match error
  this error when I try to do this:
 
  I have 2 webservices: Service A and B. All the invocations are sent to
  service A. So, service A has the actual state in it's session.
  Then I serialize the MessageContext in A and send it as a string to
  service B. In B, I rebuild MessageContext, activate it and try to set
  B's context.
 Why do you need  to have a message context (I mean new) to send from A
 to B ?

 Can you please provide some more information on what exactly you are
 trying yo do here.

 Thank you!
 Deepal

 --
 Thank you!


 http://blogs.deepal.org


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




Re: ServiceContext in OperationContext does not match error

2008-09-24 Thread Igor Nogueira
Ok! Thanks again. So I must send the properties instead of the context.
Thanks Deepal!

2008/9/24 Deepal jayasinghe [EMAIL PROTECTED]


Hi Deepal! Thanks for answering! That´s what I wanna do: I have two
  services. Service A and service B. Both are stateful, and they may not
  be on the same server. Service A proccess the client's invocations and
  consequently update the session state.
 You mean when client invoke the service A , it updates it session data
 (a database)
  Service B is a backup service and sometimes need to have it's session
  updated with the values in service A's state. To do this, I serialize
  the context in A and send it to B as a string. In B I rebuild it and
  try to set B's context with this value.
 Thats the problem , you have to find some other way to do that. I mean
 you are missing the idea behind Message context and Operation context (I
 mean the context hierarchy).
 What you should do is , find the session related data and try sending
 that from service A to service B.

 Thank you!
 Deepal

 --
 Thank you!


 http://blogs.deepal.org


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




ServiceContext in OperationContext does not match error

2008-09-23 Thread Igor Nogueira
Hello guys!
 I get the ServiceContext in OperationContext does not match error this
error when I try to do this:

I have 2 webservices: Service A and B. All the invocations are sent to
service A. So, service A has the actual state in it's session.
Then I serialize the MessageContext in A and send it as a string to  service
B. In B, I rebuild MessageContext, activate it and try to set B's context. I
do this on the following piece of code:

   ByteArrayInputStream bios = new
ByteArrayInputStream(decode.decodeBuffer(teste));
   ObjectInputStream ois = new ObjectInputStream(bios);
   MessageContext state = (MessageContext)ois.readObject();
   state.activate(
MessageContext.getCurrentMessageContext().getConfigurationContext());
   //Setting Service B content

MessageContext.getCurrentMessageContext().setOperationContext(state.getOperationContext());

MessageContext.getCurrentMessageContext().setServiceContext(state.getServiceContext());

I'm using Application scope, and the information I try to retrieve is saved
on ServiceContext. The last operation gives me the error I mentioned before.
Is there something else I can do in order to fix it?

Thanks in advance,

Igor Nogueira Santos


Re: SOAPSession error

2008-09-22 Thread Igor Nogueira
Charita, to engage it on the server side, I just need to add this tag
module ref=addressing/ on the axis2.xml, isn't?
I still can't recover session state from one invoke to another.

That´s a clent side envelope:

 ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
http://www.w3.org/2005/08/addressing;wsa:To
http://127.0.0.1:8080/axis2/services/ShoppingCart/wsa:Towsa:MessageIDurn:uuid:79E6715443849740D21222111363367/wsa:MessageIDwsa:Actionurn:addItem/wsa:Action/soapenv:Headersoapenv:Bodyns1:addItem
xmlns:ns1=http://ws.apache.org/axis2
Testando!!!/ns1:addItem/soapenv:Body/soapenv:Envelope

That´s a server side one:

?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringunknown/faultstringdetail
//soapenv:Fault/soapenv:Body/soapenv:Envelope

Thanks, and sorry me for the insistence :-)


Re: SOAPSession error

2008-09-22 Thread Igor Nogueira
Hi Charitha! Thanks again! I found out the error. The first invocation I was
doing to the service was a fireAndForget so, as the service didn´t reply
to this invocation, the servicegroupid wasn't being sent.  I changed the
service implementation, now everything is ok.

Best regards,

Igor Nogueira Santos


SOAPSession error

2008-09-21 Thread Igor Nogueira
Hello guys, I'm trying to use soapsession scope to test a service. I've
already engaged the addressing module, but I just can't access the service's
operations. I've got the following message on log:

[WARN] triggerActionNotSupportedFault: messageContext: [MessageContext:
logID=urn:uuid:99B68224CFE1AABF211222024829486] problemAction:
urn:anonOutonlyOpResponse
[ERROR] The [action] cannot be processed at the receiver.
org.apache.axis2.AxisFault: The [action] cannot be processed at the
receiver.
at
org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373)
at
org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336)
at
org.apache.axis2.handlers.addressing.AddressingValidationHandler.checkAction(AddressingValidationHandler.java:149)
at
org.apache.axis2.handlers.addressing.AddressingValidationHandler.invoke(AddressingValidationHandler.java:55)
at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)


What's goino on?

Thanks in advance!

Igor Nogueira


Re: SOAPSession error

2008-09-21 Thread Igor Nogueira
Hey all,

Forget about my last doubt! I was setting the options object wrongly. But
now I've got another error. As I said, I'm using soapsession as scope but I
can´t live in the same session throughout different invocations. I'm trying
to test the ShoppingCart example. I've deployed the service as soapsession,
engaged the adressing mudule to the client and set the ManageSession flag
true. Is there something missing? Here's an example of a soap envelope the
client is composing:

?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
http://www.w3.org/2005/08/addressing;wsa:To
http://127.0.0.1:8080/axis2/services/ShoppingCart
/wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:57AA5B8A82899D9AAD1222038876428/wsa:MessageIDwsa:Actionurn:createSession/wsa:Action/soapenv:Headersoapenv:Bodyns1:createSession
xmlns:ns1=http://ws.apache.org/axis2; //soapenv:Body/soapenv:Envelope


There isn´t a servicegroupid tag. Is that the reason why I can´t live in the
same session?
If so, is there something else to do?

Best regards,

Igor Nogueira


Re: SOAPSession error

2008-09-21 Thread Igor Nogueira
To engage addressing on client side I've copied the addressing-1.4.1.mar
to Tomcat's lib folder. Is it ok?

Thanks, Igor
2008/9/21 Igor Nogueira [EMAIL PROTECTED]

 Hey all,

 Forget about my last doubt! I was setting the options object wrongly. But
 now I've got another error. As I said, I'm using soapsession as scope but I
 can´t live in the same session throughout different invocations. I'm
 trying to test the ShoppingCart example. I've deployed the service as
 soapsession, engaged the adressing mudule to the client and set the
 ManageSession flag true. Is there something missing? Here's an example of a
 soap envelope the client is composing:

 ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:To
 http://127.0.0.1:8080/axis2/services/ShoppingCart
 /wsa:Towsa:ReplyTowsa:Address
 http://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:57AA5B8A82899D9AAD1222038876428/wsa:MessageIDwsa:Actionurn:createSession/wsa:Action/soapenv:Headersoapenv:Bodyns1:createSession
 xmlns:ns1=http://ws.apache.org/axis2;
 //soapenv:Body/soapenv:Envelope


 There isn´t a servicegroupid tag. Is that the reason why I can´t live in
 the same session?
 If so, is there something else to do?

 Best regards,

 Igor Nogueira



Re: SOAPSession error

2008-09-21 Thread Igor Nogueira
Sorry, I've sent the answer form my classmate's mail...We are trying to
implement a passive replication schema in stateful webservices. We´re trying
to use the soapsession in order to serialize it and recover it on another
server to keep replica's state up-to-date.


Thanks!

2008/9/21 Tina Silva [EMAIL PROTECTED]

 Hi Charitha,

 First of all thanks for answering!  I did what you said:

  ConfigurationContext ctx =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem
 (D:\\axis2-1.4.1\\repository, null);
  ServiceClient client = new ServiceClient(ctx,null);
  client.engageModule(addressing);
  Options opts = new Options();
 opts.setManageSession(true);...


 It really doesn't report that client is Unable to engage
 module:addressing . But I still can't access
 the session content in a different invocation. That's my situation: I have
 a .jsp with 3 methods.
 testCreate - Creates a List element on the ServiceContext callse
 ShoppingCart;
 testAdd - Adds an element in ShoppingCart;
 testList - List  ShoppingCart's  content;

 I call the methods exactly on this order. testCreat works well, but I get a
 nullexception when I call testAdd and testList, because I just can´t recover
 ShoppingCart in a different invoke. My Soap Envelopes are just like this:

 ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:To
 http://127.0.0.1:8080/axis2/services/ShoppingCart
 /wsa:Towsa:ReplyTowsa:Address
 http://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:F3FEEC679D471BCF2E122204804/wsa:MessageIDwsa:Actionurn:createSession/wsa:Action/soapenv:Headersoapenv:Bodyns1:createSession
 xmlns:ns1=http://ws.apache.org/axis2;
 //soapenv:Body/soapenv:Envelope

 There's no groupid tag, is it right?

 Thanks again!

 2008/9/21 charitha kankanamge [EMAIL PROTECTED]

 Hi Igor,

 Igor Nogueira wrote:

  To engage addressing on client side I've copied the
 addressing-1.4.1.mar to Tomcat's lib folder. Is it ok?


 Client should report Unable to engage module:addressing  error if
 addressing module is not found. In order to engage addressing at client
 side, create a configurationContext and use it when instantiating
 ServiceClient or stub as follows.
 ConfigurationContext ctx =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(\home\user\axis2-client\repository,
 null);
 SoapSessionServiceStub stub = new SoapSessionServiceStub(ctx);

 addressing-1.4.1.mar can be placed at the modules directory of
 \home\user\axis2-client\repository.


 Thanks, Igor
 2008/9/21 Igor Nogueira [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED]

Hey all,

Forget about my last doubt! I was setting the options object
wrongly. But now I've got another error. As I said, I'm using
soapsession as scope but I can´t live in the same session
throughout different invocations. I'm trying to test the
ShoppingCart example. I've deployed the service as soapsession,
engaged the adressing mudule to the client and set the
ManageSession flag true. Is there something missing? Here's an
example of a soap envelope the client is composing:

?xml version='1.0' encoding='utf-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
 soapenv:Header
xmlns:wsa=http://www.w3.org/2005/08/addressing;wsa:To
 http://127.0.0.1:8080/axis2/services/ShoppingCart
 /wsa:Towsa:ReplyTowsa:Address
 http://www.w3.org/2005/08/addressing/none
 /wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:57AA5B8A82899D9AAD1222038876428/wsa:MessageIDwsa:Actionurn:createSession/wsa:Action/soapenv:Headersoapenv:Bodyns1:createSession
xmlns:ns1=http://ws.apache.org/axis2;
//soapenv:Body/soapenv:Envelope


There isn´t a servicegroupid tag. Is that the reason why I can´t
live in the same session?
If so, is there something else to do?

Best regards,

Igor Nogueira


 

 No virus found in this incoming message.
 Checked by AVG. Version: 7.5.524 / Virus Database: 270.7.0/1682 - Release
 Date: 9/20/2008 10:24 AM




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





Re: Rebuilding Context

2008-09-20 Thread Igor Nogueira
Same doubt...

2008/9/20 Tina Silva [EMAIL PROTECTED]

 Hello Everybody! I'm new at this list. I am new at Java and Axis too, so I
 really need your help. I'd like to save and restore the message context.
 Actually, I've alredy serialized it and sent it to another service as an
 OMElement object. What do I have to do to rebuild it? As far as I know, the
 messagecontext class implements the readExternal method, I just don't know
 what to do to unserialize it...

 Thanks in advance!



MessageContext writeExternal

2008-09-19 Thread Igor Nogueira
Hey all!

I've got a doubt. How can I save the MessageContext? I have following piece
of code:

 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new ObjectOutputStream(baos);
 oos.writeObject(MessageContext.getCurrentMessageContext());

But it doesn't work. It gives me the following error:

Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
java.io.ObjectOutput
at ShoppingCart.getState(ShoppingCart.java:97) ...

Is that the right way of saving the Message context? What's wrong on this
code?

Thank you in advance,


Igor Nogueira


Re: passive replication

2008-09-17 Thread Igor Nogueira
Thanks! I'll read it!

2008/9/16 Deepal jayasinghe [EMAIL PROTECTED]

 Yes , we have implemented a way to keep session aware data. However you
 have to remember that all the data have store in Axis2 Context
 hierarchy. If you look at Axis2 clustering then you can understand the
 rest.

 -Deepal

 http://blogs.deepal.org

 Igor Nogueira wrote:
  Hello guys,
 
  I'm new at axis2 and I have a doubt; I need to implement a passive
  replication mechanism for stateful WebServices. I'd like to know if
  there's a way to save/serialize the session's state in order to send
  it as checkpoints to the backup services?
 
  Best regards,
 
 
  Igor Nogueira Santos

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




Re: passive replication

2008-09-17 Thread Igor Nogueira
I've read it and tried to work with the ConfigurationContext just to test
it, but it isnt's serializable, is
it? If I need to keep the backup replicas up-to-date, so I shouldn´t use
soapsession as session scope, but application or group scope isn't it?

Thanks you in advance!

P.S: My English is awful, I hope you understand me ;-)


passive replication

2008-09-16 Thread Igor Nogueira
Hello guys,

I'm new at axis2 and I have a doubt; I need to implement a passive
replication mechanism for stateful WebServices. I'd like to know if there's
a way to save/serialize the session's state in order to send it as
checkpoints to the backup services?

Best regards,


Igor Nogueira Santos