[JBoss JIRA] Created: (JBWS-2886) Error doing multiple calls to web service
by Marco Benuzzi (JIRA)
Error doing multiple calls to web service
-----------------------------------------
Key: JBWS-2886
URL: https://jira.jboss.org/jira/browse/JBWS-2886
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.1.2
Environment: Linux Fedora 11 kernel 2.6.30.10-105
JBoss Application Platform 5.0.0.GA
Reporter: Marco Benuzzi
Priority: Critical
I'm testing JBossWS to access a remote web service.
Just for test I'm using a java console application; I run it with sun jdk 6.0.17 with classpath jboss-eap-5.0/jboss-as/client/*.jar (linux)
I've created stubs client classes with wsconsume.
If a make a single call all works fine.
MyWebServices service = new MyWebServices();
MYSOAPHandlerResolver handlerResolver = new MYSOAPHandlerResolver();
service.setHandlerResolver(handlerResolver);
MyWebServicesPT port = service.getMYWebServicesPort();
port.call1();
// OK
If a make more than one call, only the first ones works fine.
MyWebServices service = new MyWebServices();
MYSOAPHandlerResolver handlerResolver = new MYSOAPHandlerResolver();
service.setHandlerResolver(handlerResolver);
MyWebServicesPT port = service.getMYWebServicesPort();
port.call1();
// OK
port.call2();
// after 80 seconds I got an exception (please note that I don't see any network activity with wireshark)
javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:310)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:162)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:148)
at $Proxy15.commandCryptic(Unknown Source)
at it.celeweb.otagw.adapter.amadeus.test.AmadeusClient.main(AmadeusClient.java:77)
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:253)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:231)
... 4 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:250)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:162)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:167)
at org.jboss.remoting.Client.invoke(Client.java:1917)
at org.jboss.remoting.Client.invoke(Client.java:768)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:232)
... 7 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
at org.jboss.remoting.transport.http.HTTPClientInvoker.getResponseCode(HTTPClientInvoker.java:1269)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:351)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:232)
... 12 more
During the debugging of the problem, I found a strange workaround: putting a sleeb after each call.
MyWebServices service = new MyWebServices();
MYSOAPHandlerResolver handlerResolver = new MYSOAPHandlerResolver();
service.setHandlerResolver(handlerResolver);
MyWebServicesPT port = service.getMYWebServicesPort();
port.call1();
// OK
Thread.Sleep(5000);
port.call2();
// OK
Thread.Sleep(5000);
port.call3();
// OK
Thread.Sleep(5000);
port.call4();
I've tested the same web services using Axis2 as framework and all is working as expected without the need to use the sleep; so I'm sure the problem is on the JAXWS implemented in JBoss
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] Created: (JBWS-3131) CLONE -JBossWS is picking the wrong binding when both Soap1.1 and Soap1.2 bindings are provided for a port
by Fernando Rubbo (JIRA)
CLONE -JBossWS is picking the wrong binding when both Soap1.1 and Soap1.2 bindings are provided for a port
----------------------------------------------------------------------------------------------------------
Key: JBWS-3131
URL: https://jira.jboss.org/browse/JBWS-3131
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.0.2
Environment: AS 5.0.0.CR1
Reporter: Fernando Rubbo
Assignee: Alessio Soldano
Fix For: jbossws-native-3.0.4
I am implementing an interop test using WSDL organized as follows:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.wstf.org/docs/scenarios/sc002"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.wstf.org/docs/scenarios/sc002">
<wsdl:types>
. . .
</wsdl:types>
<wsdl:message name="Begin">
<wsdl:part name="Begin" element="tns:Begin"/>
. . .
</wsdl:message>
<wsdl:portType name="sc002Port">
<wsdl:operation name="Begin">
. . .
</wsdl:portType>
<wsdl:binding name="sc002SOAP11Binding" type="tns:sc002Port">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Begin">
. . .
</wsdl:binding>
<wsdl:binding name="sc002SOAP12Binding" type="tns:sc002Port">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Begin">
. . .
</wsdl:binding>
<wsdl:service name="sc002Service">
<wsdl:port name="soap11port" binding="tns:sc002SOAP11Binding">
<soap:address location="http://www.wstf.org/sc002/sc002SOAP11"/>
</wsdl:port>
<wsdl:port name="soap12port" binding="tns:sc002SOAP12Binding">
<soap12:address location="http://www.wstf.org/sc002/sc002SOAP12"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
In other words, there is one port, two bindings and one service exporting the two bindings.
I create a client proxy for the port named "soap11port" by invoking
new Sc002Service().getPort(new QName("http://www.wstf.org/docs/scenarios/sc002", "soap11port"), Sc002Port.class)
The returned port uses a SOAP12 binding even though the WSDL labels it clearly as a 1.1 port.
The problem arises because of an error in the construction of the ClientEndPointMetaData used as the endpointMetaData attached to the ClientProxy. This is constructed inside the ServiceDelegateImpl constructor by invoking JAXWSClientMetaDataBuilder.buildMetaData(). The error occurs in inherited method MetaDataBuilder.initEndpointBinding() when it tries to identify the binding associated with QName sc002:soap11port. The following 4 lines are where it goes wrong:
WSDLDefinitions wsdlDefinitions = wsdlEndpoint.getWsdlService().getWsdlDefinitions();
WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
String bindingType = wsdlBinding.getType();
The first two lines locate the port sc002 associated with the binding identified by sc002:soap11port. The 3rd line then reverse searches from the port to find a binding which binds it. Of course there are two of these and, mirabile dictu, the code even prints a warning about this. It then ignores the correct and returns the soap12 binding.
Ironically before reaching this point the JAXWSClientMetaDataBuilder does this search correctly in method buildMetaDataInternal at lines 154/5 it executes this code
WSDLBinding wsdlBinding = wsdlEndpoint.getWsdlService().getWsdlDefinitions().getBinding(bindingName);
String bindingType = wsdlBinding.getType();
I assume the convoluted code in the inherited method is there for a reason but, then again, that's what overriding was invented for.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (JBWS-3108) SOAPMessage returned from SOAPMessageContext doesn't support DOM
by Jay Rostosky (JIRA)
SOAPMessage returned from SOAPMessageContext doesn't support DOM
----------------------------------------------------------------
Key: JBWS-3108
URL: https://jira.jboss.org/browse/JBWS-3108
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.1.2
Environment: JBoss 5.1.0 on Java 1.5
Reporter: Jay Rostosky
The SOAPMessage returned from SOAPConnection.call() fully supports access via DOM API.
However, the SOAPMessage returned from SOAPMessageContext (when writing a SOAPHandler) does not.
Namely, SOAPBody.getElementsByTagName() results in a JBoss NotImplementedException.
Also, using SOAPElement.getChildElements() on the SOAPBody, and then navigating down to the <arg0> element, I cannot use Node.getTextContent() -> again get a NotImplementedException.
Only workaround is to navigate all the way down to the text node contained by <arg0>, and then call Node.getNodeValue() on that.
How did this pass the Sun verification tests?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (JBWS-3034) Annotation HandlerChain generating an StringIndexOutOfBoundsException when the file starts with "../"
by Rodrigo Leme (JIRA)
Annotation HandlerChain generating an StringIndexOutOfBoundsException when the file starts with "../"
-----------------------------------------------------------------------------------------------------
Key: JBWS-3034
URL: https://jira.jboss.org/browse/JBWS-3034
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.1.2
Environment: Windows XP Professional Service Pack 2
JDK 6
JBoss 5.1.0.GA
JBossWS-native-3.1.2.GA
EJB 3
Reporter: Rodrigo Leme
When the @HandlerChain annotation is used with a given Service Endpoint Interface, and the name starts with a "../", when the application is deployed in JBoss AS it fails with an StringIndexOutOfBoundsException:
2010-05-20 22:12:02,192 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Real: name=vfsfile:/C:/Desenvolvimento/Eclipse/eclipse-3.5.1/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy/RBSystem.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/C:/Desenvolvimento/Eclipse/eclipse-3.5.1/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy/RBSystem.ear/Dispute-ejb.jar/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.getHandlerChainsMetaData(JAXWSMetaDataBuilder.java:232)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.processHandlerChain(JAXWSMetaDataBuilder.java:174)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:188)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:76)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:69)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:129)
at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:76)
at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:113)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
... 25 more
Related to the HandlerChain:
@HandlerChain(file = "../../../../META-INF/handler-chain.xml")
Located in a class of package com.rbsystem.dispute.service.
The referenced file exists.
By taking a look on the method reported by the stack trace (JAXWSMetaDataBuilder.getHandlerChainsMetaData(Class, String)), I noticed the following lines:
while (filepath.startsWith("../"))
{
packagePath = packagePath.substring(0, packagePath.lastIndexOf("/"));
filepath = filepath.substring(3);
resourcePath = packagePath + "/" + filepath;
}
Where we have:
packagePath = packagePath.substring(0, packagePath.lastIndexOf("/"));
I believe it should be:
int endIndex = packagePath.lastIndexOf("/");
packagePath = packagePath.substring(0, endIndex == -1 ? 0 : index);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months