You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by tina-- <el...@mail.ntua.gr> on 2007/11/20 00:04:03 UTC

problem with axis and sockets

hello!!
Can you please help me? I am facing a problem while calling(invoking) a web
service with a socket as its parameter. The exception is:

org.apache.axiom.om.OMException: java.lang.RuntimeException:
java.lang.IllegalAccessException: Class
org.apache.axis2.databinding.utils.BeanUtil can not access a member of class
java.net.SocketInputStream with modifiers "public final"
	at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
	at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
	at
org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:614)
	at
org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:583)
	at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:117)
	at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:239)
	at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:195)
	at
org.apache.axis2.client.ServiceClient.fillSOAPEnvelope(ServiceClient.java:689)
	at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:525)
	at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
	at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:101)
	at tcp2.LicenseServiceClient.deamon(LicenseServiceClient.java:36)
	at tcp2.LicenseDeamonHandler.run(LicenseDeamonHandler.java:30)
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException:
Class org.apache.axis2.databinding.utils.BeanUtil can not access a member of
class java.net.SocketInputStream with modifiers "public final"
	at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:246)
	at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:988)
	at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:854)
	at
org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.next(WrappingXMLStreamReader.java:48)
	at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:857)
	at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
	at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:153)
	... 12 more
Caused by: java.lang.IllegalAccessException: Class
org.apache.axis2.databinding.utils.BeanUtil can not access a member of class
java.net.SocketInputStream with modifiers "public final"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
	at java.lang.reflect.Method.invoke(Method.java:588)
	at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:224)
	... 18 more

I don't get this thing with "public and final" .
Thank you very much!!
-- 
View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13847572
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: problem with axis and sockets

Posted by tina-- <el...@mail.ntua.gr>.
Can i send a reference to a stream?

Michele Mazzucco-2 wrote:
> 
> You cannot send socket references across the network. Sockets - like  
> other resources like DB and JMS connections, are not serializable.
> The serialization mechanism is described here [1].
> 
> Michele
> 
> [1] http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/ 
> serialTOC.html
> 
> On 19 Nov 2007, at 23:04, tina-- wrote:
> 
>>
>> hello!!
>> Can you please help me? I am facing a problem while calling 
>> (invoking) a web
>> service with a socket as its parameter. The exception is:
>>
>> org.apache.axiom.om.OMException: java.lang.RuntimeException:
>> java.lang.IllegalAccessException: Class
>> org.apache.axis2.databinding.utils.BeanUtil can not access a member  
>> of class
>> java.net.SocketInputStream with modifiers "public final"
>> 	at
>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next 
>> (StAXOMBuilder.java:239)
>> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java: 
>> 318)
>> 	at
>> org.apache.axiom.om.impl.llom.OMElementImpl.build 
>> (OMElementImpl.java:614)
>> 	at
>> org.apache.axiom.om.impl.llom.OMElementImpl.detach 
>> (OMElementImpl.java:583)
>> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent 
>> (OMNodeImpl.java:117)
>> 	at
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild 
>> (OMElementImpl.java:239)
>> 	at
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild 
>> (OMElementImpl.java:195)
>> 	at
>> org.apache.axis2.client.ServiceClient.fillSOAPEnvelope 
>> (ServiceClient.java:689)
>> 	at
>> org.apache.axis2.client.ServiceClient.sendReceive 
>> (ServiceClient.java:525)
>> 	at
>> org.apache.axis2.client.ServiceClient.sendReceive 
>> (ServiceClient.java:508)
>> 	at
>> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking 
>> (RPCServiceClient.java:101)
>> 	at tcp2.LicenseServiceClient.deamon(LicenseServiceClient.java:36)
>> 	at tcp2.LicenseDeamonHandler.run(LicenseDeamonHandler.java:30)
>> Caused by: java.lang.RuntimeException:  
>> java.lang.IllegalAccessException:
>> Class org.apache.axis2.databinding.utils.BeanUtil can not access a  
>> member of
>> class java.net.SocketInputStream with modifiers "public final"
>> 	at
>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser 
>> (BeanUtil.java:246)
>> 	at
>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.proce 
>> ssProperties(ADBXMLStreamReaderImpl.java:988)
>> 	at
>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( 
>> ADBXMLStreamReaderImpl.java:854)
>> 	at
>> org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.next 
>> (WrappingXMLStreamReader.java:48)
>> 	at
>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( 
>> ADBXMLStreamReaderImpl.java:857)
>> 	at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
>> 	at
>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next 
>> (StAXOMBuilder.java:153)
>> 	... 12 more
>> Caused by: java.lang.IllegalAccessException: Class
>> org.apache.axis2.databinding.utils.BeanUtil can not access a member  
>> of class
>> java.net.SocketInputStream with modifiers "public final"
>> 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>> 	at java.lang.reflect.Method.invoke(Method.java:588)
>> 	at
>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser 
>> (BeanUtil.java:224)
>> 	... 18 more
>>
>> I don't get this thing with "public and final" .
>> Thank you very much!!
>> -- 
>> View this message in context: http://www.nabble.com/problem-with- 
>> axis-and-sockets-tf4840115.html#a13847572
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13870191
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: problem with axis and sockets

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
You cannot send socket references across the network. Sockets - like  
other resources like DB and JMS connections, are not serializable.
The serialization mechanism is described here [1].

Michele

[1] http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/ 
serialTOC.html

On 19 Nov 2007, at 23:04, tina-- wrote:

>
> hello!!
> Can you please help me? I am facing a problem while calling 
> (invoking) a web
> service with a socket as its parameter. The exception is:
>
> org.apache.axiom.om.OMException: java.lang.RuntimeException:
> java.lang.IllegalAccessException: Class
> org.apache.axis2.databinding.utils.BeanUtil can not access a member  
> of class
> java.net.SocketInputStream with modifiers "public final"
> 	at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next 
> (StAXOMBuilder.java:239)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java: 
> 318)
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.build 
> (OMElementImpl.java:614)
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.detach 
> (OMElementImpl.java:583)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent 
> (OMNodeImpl.java:117)
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild 
> (OMElementImpl.java:239)
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild 
> (OMElementImpl.java:195)
> 	at
> org.apache.axis2.client.ServiceClient.fillSOAPEnvelope 
> (ServiceClient.java:689)
> 	at
> org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:525)
> 	at
> org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:508)
> 	at
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking 
> (RPCServiceClient.java:101)
> 	at tcp2.LicenseServiceClient.deamon(LicenseServiceClient.java:36)
> 	at tcp2.LicenseDeamonHandler.run(LicenseDeamonHandler.java:30)
> Caused by: java.lang.RuntimeException:  
> java.lang.IllegalAccessException:
> Class org.apache.axis2.databinding.utils.BeanUtil can not access a  
> member of
> class java.net.SocketInputStream with modifiers "public final"
> 	at
> org.apache.axis2.databinding.utils.BeanUtil.getPullParser 
> (BeanUtil.java:246)
> 	at
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.proce 
> ssProperties(ADBXMLStreamReaderImpl.java:988)
> 	at
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( 
> ADBXMLStreamReaderImpl.java:854)
> 	at
> org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.next 
> (WrappingXMLStreamReader.java:48)
> 	at
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( 
> ADBXMLStreamReaderImpl.java:857)
> 	at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
> 	at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next 
> (StAXOMBuilder.java:153)
> 	... 12 more
> Caused by: java.lang.IllegalAccessException: Class
> org.apache.axis2.databinding.utils.BeanUtil can not access a member  
> of class
> java.net.SocketInputStream with modifiers "public final"
> 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
> 	at java.lang.reflect.Method.invoke(Method.java:588)
> 	at
> org.apache.axis2.databinding.utils.BeanUtil.getPullParser 
> (BeanUtil.java:224)
> 	... 18 more
>
> I don't get this thing with "public and final" .
> Thank you very much!!
> -- 
> View this message in context: http://www.nabble.com/problem-with- 
> axis-and-sockets-tf4840115.html#a13847572
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: problem with axis and sockets

Posted by tina-- <el...@mail.ntua.gr>.
thank you Michelle Mazzucco!!
-- 
View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13975682
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: problem with axis and sockets

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Use WS-addressing and send the replyTo field as argument. That's the  
endpoint where the client is waiting for a reply.

Michele

On 21 Nov 2007, at 03:36, tina-- wrote:

> If I cannot have as a parameter of a web service, the socket of the
> client,and if I cannot have as parameters the in/out streams of the  
> client
> how can I do it?


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


Re: problem with axis and sockets

Posted by tina-- <el...@mail.ntua.gr>.
Imagine that I have 4 programs (.java); A,B,C,D. A is a server and is
listening to a port. When a client appears, A calls B, B, calls C and C
calls a webservice named D. The web service has to tranfer data between the
client and another server E. So , it has to read/write from/to the client's
stream . 

If I cannot have as a parameter of a web service, the socket of the
client,and if I cannot have as parameters the in/out streams of the client
how can I do it?

I tried to save the port and ip of the client, for D to open a stream in
these data, but I have to make a new socket. So I have to terminate the
first (client). If I terminate the client, system crashes. 
Is there a way, 1)to keep the client's socket alive 2)to make the web
service create the streams (...getInputStream();) or 3) to pass as a
parameter the socket? 

or is there a way to take the stream of a socket, just knowing the ip, and
without having the socket?

thanks you..

ps: I don't understand serialization. Maybe my questions are silly. :)
-- 
View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13870428
Sent from the Axis - User mailing list archive at Nabble.com.


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