Axis2 Sockets

2008-03-07 Thread Daniel Silva
Hi,

 

I have a web service based on axis2.

 

I need to send the response over the same socket of the request. It seems this 
is not happening using newMsgContext.setEnvelope(envelope) method.

However the Service_MessageReceiverInOut class extends 
AbstractInOutSyncMessageReceiver. Shouldn't this be synchronized over the same 
socket?

Is there any Option/Property/Configuration to set this? 

 

Thanks in advance.

 

Best regards,

 

Daniel Silva

Software Developer

 

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

www.alert-online.com <http://www.alert-online.com> 

 

ALERT Life Sciences Computing, S.A.

Edifício Lake Towers 

Rua Daciano Baptista Marques, n.º 245, Bloco D

4400-617 Vila Nova de Gaia

 

Tel.: +351 22 832 89 80/1

Fax: +351 22 832 89 82

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

This e-mail is privileged, confidential and contains private information. Any 
reading, retention, distribution or copying of this communication by any person 
other than its intended recipient is prohibited.



RE: Axis2 Sockets

2008-03-07 Thread Daniel Silva
Hi,

I will explain what I'm doing.
I'm developing a web service (server side) based on a predefined standard wsdl.
I used wsdl2java to generate server side web service skeleton.
I have the generated classes for types defined on schemas, the Skeleton (and 
Skeleton interface) and MessageReceiverInOut class. 
As I just need the received data in XML format, I will apply xsl tranformation 
to compose the response. I don't need to parse the XML to objects.
So, I don't want that invokeBusinessLogic method calls fromOM method and I 
don't want an object from skeleton implementation.
I implemented a myToEnvelope method to compose the XML response based on the 
received MessageContext. Having the response XML according to the defined 
return type I put it in a SOAPEnvelope and then set and send it by 
newMsgContext.setEnvelope(envelope).

So, my MessageReceiverInOut class is something like this:

(...)
public void invokeBusinessLogic(org.apache.axis2.context.MessageContext 
msgContext, org.apache.axis2.context.MessageContext newMsgContext)
throws org.apache.axis2.AxisFault{


try {

// get the implementation class for the Web Service
Object obj = getTheImplementationObject(msgContext);

PIXManager_ServiceSkeletonInterface skel = 
(PIXManager_ServiceSkeletonInterface)obj;
//Out Envelop
org.apache.axiom.soap.SOAPEnvelope envelope = null;
//Find the axisOperation that has been set by the Dispatch phase.
org.apache.axis2.description.AxisOperation op = 
msgContext.getOperationContext().getAxisOperation();

if (op == null) {
throw new org.apache.axis2.AxisFault("Operation is not located, if this 
is doclit style the SOAP-ACTION should specified via the SOAP Action to use the 
RawXMLProvider");
}

java.lang.String methodName;
if((op.getName() != null) && ((methodName = 
org.apache.axis2.util.JavaUtils.xmlNameToJava(op.getName().getLocalPart())) != 
null)){


if("PIXManager_PRPA_IN201301UV".equals(methodName)){
envelope = myToEnvelope(msgContext);
(...)
newMsgContext.setEnvelope(envelope);
(...)


I can run this successfully with a client generated with wsdl2java, but when 
the request is made by other application the response is not sent (I'm tracing 
this with wireshark). I can handle both requests but the response is not sent 
in second case.
In this moment I'm not sure what the cause for this.
I attached the request messages: from our application client (that works) 
our.xml; and otherClient.xml that fails.

Thank you in advance.

Best regards,
Daniel Silva


-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 7 de Março de 2008 16:34
To: axis-user@ws.apache.org
Subject: Re: Axis2 Sockets

Why? If the MEP is in/out with no complications (i.e. synchronous and  
with no redirections) you should be able to use the same socket.

Michele


On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote:

> AFAIK it's the default behavior in case of request/response
> interaction


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



http://www.w3.org/2003/05/soap-envelope"; xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
	
		http://192.168.230.1:8080/axis2/services/PIXManager_Service?wsdl
		urn:hl7-org:v3:PRPA_IN201301UV
		uuid:1.2.3.4.5.10512N1
		
			http://localhost:8080/mesa/test
		
	
	
		
			
			
			
			
			
			
			
			

	
	tested device 

			
			

	
	MESA Device 

			
			


	
		
		
		
			



	
		ELLIE
		EPSILON
	
	
	
	
	
	
		1 PINETREE
		WEBSTER
		MO
		63119
	


	
	

			
		
		
			

			
		
	

			
		
	


http://www.w3.org/2003/05/soap-envelope";>
	
		http://www.w3.org/2001/XMLSchema-instance"; xsi:type="ns1:PRPA_IN201301UV" ITSVersion="XML_1.0">
			
			
			
			
			
			
			


	

			
			


	

			
			

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

RE: Axis2 Sockets

2008-03-10 Thread Daniel Silva
Hi,

Thank you all for the provided help.
In fact, the incoming message has a ws-addressing "reply-to" EPR pointing to 
another listener. This is the problem.
When the response MessageContext is created, this values are automatically 
fielded.
If I set "To" as: "newMsgContext.setTo(new 
EndpointReference("http://www.w3.org/2005/08/addressing/anonymous";));" it works.

Thank you.

Best regards,

Daniel Silva
Software Developer

[EMAIL PROTECTED]
www.alert-online.com
 
ALERT Life Sciences Computing, S.A.
Edifício Lake Towers 
Rua Daciano Baptista Marques, n.º 245, Bloco D
4400-617 Vila Nova de Gaia

Tel.: +351 22 832 89 80/1
Fax: +351 22 832 89 82



This e-mail is privileged, confidential and contains private information. Any 
reading, retention, distribution or copying of this communication by any person 
other than its intended recipient is prohibited.


-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: domingo, 9 de Março de 2008 20:33
To: axis-user@ws.apache.org
Subject: Re: Axis2 Sockets

oh.. Sorry for the confusion.. That's exactly what I meant. .Using the
same socket is the default..

~Thilina

On Fri, Mar 7, 2008 at 11:34 AM, Michele Mazzucco
<[EMAIL PROTECTED]> wrote:
> Why? If the MEP is in/out with no complications (i.e. synchronous and
>  with no redirections) you should be able to use the same socket.
>
>  Michele
>
>
>
>  On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote:
>
>  > AFAIK it's the default behavior in case of request/response
>  > interaction
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

-
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]