SOAP over TCP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SOAP over TCP

xuxiaoxia
This post was updated on .
     Today,I try to use SOAP over TCP with Metro.I follow http://metro.java.net/guide/ch09.html#soaptcpc Chapter 9 of Metro User Guide step by step,but when I run the client I get a Exception,As follows:
SEVERE: WSTCP0001:Processing message failed!
javax.xml.ws.WebServiceException: WSTCP0017:Error executing webservice
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more

Exception in thread "main" javax.xml.ws.WebServiceException: WSTCP0017:Error executing webservice
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more
Java Result: 1



As the document show:I add the follow Policy to my Service EndPoint:
 <wsp:Policy wsu:Id="AddNumbersPortBindingPolicy"> 
    <wsp:ExactlyOne> 
       <wsp:All> 
            <tcp:OptimizedTCPTransport enabled="true"/> 
       </wsp:All> 
     </wsp:ExactlyOne> 
  </wsp:Policy> 
and in order to tell my client to use Tcp to transport SOAP,I add follow Policy to my client :
<wsp:Policy wsu:Id="AddNumbersPortBindingPolicy"> 
    <wsp:ExactlyOne> 
        <wsp:All> 
             <tcp:AutomaticallySelectOptimalTransport/>
        </wsp:All> 
    </wsp:ExactlyOne> 
</wsp:Policy>

when I delete the policy from my client,my client can communicate with my service by http .But when I add the policy,my client become very slow and finally give me the exception.
 
I should modify the configuration on Glassfish?Does that matter I run metro on windows?

Please,help me.
Reply | Threaded
Open this post in threaded view
|

Re: SOAP over TCP

TomekJavaMetro
This post has NOT been accepted by the mailing list yet.
This post was updated on .

For  me it was tricky to do it.
I suppose that it not work properly (Os vendor/version), i tried to use it, but i can not do it.
I also used Windows in my cases.

i had no idea now how to fix it.
my advice is try to look up to the Metro sources in these Metro packets You have exception.

My question about Metro version on Server and client side ?

Regards,
Tomek.
Reply | Threaded
Open this post in threaded view
|

Re: SOAP over TCP

b_kumarkrishna@rediff.com
This post has NOT been accepted by the mailing list yet.
In reply to this post by xuxiaoxia
Any one successfully executed Calculator app suing soap over TCP. I have tried to follow metro documentation (https://metro.java.net/guide/ch09.html )and execute the calculator sample app using soap over TCP and i am getting below error.

Severe:   WSTCP0001:Processing message failed!
com.sun.xml.ws.client.ClientTransportException: WSTCP0015:Error when exchanging protocol version
        at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:217)
        at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:169)
        at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:56)
        at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:239)
        at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:462)
        at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:128)
        at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:248)
        at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:140)
        at com.sun.enterprise.security.webservices.ClientSecurityPipe.processSecureRequest(ClientSecurityPipe.java:199)
        at com.sun.enterprise.security.webservices.ClientSecurityPipe.process(ClientSecurityPipe.java:187)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
        at com.sun.xml.ws.client.Stub.process(Stub.java:464)
        at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:174)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:91)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:154)
        at com.sun.proxy.$Proxy267.add(Unknown Source)
        at org.me.calculator.client.ClientServlet.processRequest(ClientServlet.java:71)
        at org.me.calculator.client.ClientServlet.doGet(ClientServlet.java:92)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException
        at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:96)
        at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:75)
        at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:329)
        at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:197)
        ... 56 more
Reply | Threaded
Open this post in threaded view
|

Re: SOAP over TCP

b_kumarkrishna@rediff.com
This post has NOT been accepted by the mailing list yet.
In reply to this post by xuxiaoxia
Is this a bug in metro framework ? Any has similar problem and find solution to this issue ? Please post if you have the solution.