8 Replies Latest reply on Feb 21, 2009 12:08 PM by Karthik M

    Web Service Client : Could not transmit message

    alberto sarubbi Newbie

      I'm trying to deploy an J2EE application wich needs to consume web services located outside my server. Actually, the web services are published in a JBoss server.
      Followed tutorials from JBossWS to deploy a JNDI service to call from my client. Here is the exception first than all:

      java.rmi.RemoteException: Call invocation failed: Could not transmit message; nested exception is:
       javax.xml.soap.SOAPException: Could not transmit message
       at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:710)
       at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:403)
       at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
       at $Proxy54.RUCASLogin(Unknown Source)
       at py.com.sif.faje.struts.LogonAction.testTrivialAccess(LogonAction.java:221)
       at py.com.sif.faje.struts.LogonAction.validationUser(LogonAction.java:111)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
       at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
       at ar.com.sif.services.viewconfig.SmartAction.execute(SmartAction.java:243)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.xml.soap.SOAPException: Could not transmit message
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:201)
       at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:680)
       ... 36 more
      Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:201)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
       at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
       at org.jboss.remoting.Client.invoke(Client.java:525)
       at org.jboss.remoting.Client.invoke(Client.java:488)
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:186)
       ... 37 more
      Caused by: org.jboss.ws.WSException: Invalid HTTP server response [400] - Bad Request
       at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
       ... 42 more
      



      Here goes my mapping (named jaxrpc-mapping-session.xml):

      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
       <package-mapping>
       <package-type>py.com.sif.faje.webservices.rucas.stubs.connect</package-type>
       <namespaceURI>http://py.gov.set.services/rucas/</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>py.com.sif.faje.webservices.rucas.stubs.connect</package-type>
       <namespaceURI>http://beans.rucas.set.gov.py/jaws</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>py.com.sif.faje.webservices.rucas.stubs.connect</package-type>
       <namespaceURI>http://connect.beans.rucas.set.gov.py/jaws</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>py.com.sif.faje.webservices.rucas.stubs.connect</package-type>
       <namespaceURI>http://error.beans.rucas.set.gov.py/jaws</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>py.com.sif.faje.webservices.rucas.stubs.connect</package-type>
       <namespaceURI>http://components.beans.rucas.set.gov.py/jaws</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RucasError</java-type>
       <root-type-qname xmlns:typeNS="http://error.beans.rucas.set.gov.py/jaws">typeNS:RucasError</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>code</java-variable-name>
       <xml-element-name>code</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>description</java-variable-name>
       <xml-element-name>description</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>extendedCode</java-variable-name>
       <xml-element-name>extendedCode</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>family</java-variable-name>
       <xml-element-name>family</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>langKeyMessage</java-variable-name>
       <xml-element-name>langKeyMessage</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>langKeyTaggedMessage</java-variable-name>
       <xml-element-name>langKeyTaggedMessage</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.AppInfo</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:AppInfo</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>language</java-variable-name>
       <xml-element-name>language</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>uuid</java-variable-name>
       <xml-element-name>uuid</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>version</java-variable-name>
       <xml-element-name>version</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.SessionInfo</java-type>
       <root-type-qname xmlns:typeNS="http://components.beans.rucas.set.gov.py/jaws">typeNS:SessionInfo</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>expirationDate</java-variable-name>
       <xml-element-name>expirationDate</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>maxIdleTimeoutInMillis</java-variable-name>
       <xml-element-name>maxIdleTimeoutInMillis</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RUCAS</java-type>
       <root-type-qname xmlns:typeNS="http://connect.beans.rucas.set.gov.py/jaws">typeNS:RUCAS</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>uri</java-variable-name>
       <xml-element-name>uri</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.LoginMethod</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:LoginMethod</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>code</java-variable-name>
       <xml-element-name>code</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>params</java-variable-name>
       <xml-element-name>params</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>temporalSessionId</java-variable-name>
       <xml-element-name>temporalSessionId</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>version</java-variable-name>
       <xml-element-name>version</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RUCASLoginResponse</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:RUCASLoginResponse</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>errors</java-variable-name>
       <xml-element-name>errors</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>permanentSessionId</java-variable-name>
       <xml-element-name>permanentSessionId</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>sessionInfo</java-variable-name>
       <xml-element-name>sessionInfo</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>success</java-variable-name>
       <xml-element-name>success</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.Parameter</java-type>
       <root-type-qname xmlns:typeNS="http://beans.rucas.set.gov.py/jaws">typeNS:Parameter</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>value</java-variable-name>
       <xml-element-name>value</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.CryptMethod</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:CryptMethod</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>code</java-variable-name>
       <xml-element-name>code</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>version</java-variable-name>
       <xml-element-name>version</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.ClientSystem</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:ClientSystem</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>id</java-variable-name>
       <xml-element-name>id</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>name</java-variable-name>
       <xml-element-name>name</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>password</java-variable-name>
       <xml-element-name>password</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RUCASConnectResponse</java-type>
       <root-type-qname xmlns:typeNS="http://py.gov.set.services/rucas/">typeNS:RUCASConnectResponse</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>cryptMethod</java-variable-name>
       <xml-element-name>cryptMethod</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>errors</java-variable-name>
       <xml-element-name>errors</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>loginMethod</java-variable-name>
       <xml-element-name>loginMethod</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>rucasList</java-variable-name>
       <xml-element-name>rucasList</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>temporarySessionId</java-variable-name>
       <xml-element-name>temporarySessionId</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.Parameter[]</java-type>
       <anonymous-type-qname>http://py.gov.set.services/rucas/:LoginMethod>params[0,unbounded]</anonymous-type-qname>
       <qname-scope>complexType</qname-scope>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RucasError[]</java-type>
       <anonymous-type-qname>http://py.gov.set.services/rucas/:RUCASLoginResponse>errors[0,unbounded]</anonymous-type-qname>
       <qname-scope>complexType</qname-scope>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>py.com.sif.faje.webservices.rucas.stubs.connect.RUCAS[]</java-type>
       <anonymous-type-qname>http://py.gov.set.services/rucas/:RUCASConnectResponse>rucasList[0,unbounded]</anonymous-type-qname>
       <qname-scope>complexType</qname-scope>
       </java-xml-type-mapping>
       <service-interface-mapping>
       <service-interface>py.com.sif.faje.webservices.rucas.stubs.connect.SessionManagementService</service-interface>
       <wsdl-service-name xmlns:serviceNS="http://py.gov.set.services/rucas/">serviceNS:SessionManagementService</wsdl-service-name>
       <port-mapping>
       <port-name>SessionManagementPort</port-name>
       <java-port-name>SessionManagementPort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>py.com.sif.faje.webservices.rucas.stubs.connect.SessionManagement</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS="http://py.gov.set.services/rucas/">portTypeNS:SessionManagement</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS="http://py.gov.set.services/rucas/">bindingNS:SessionManagementBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>RUCASConnect</java-method-name>
       <wsdl-operation>RUCASConnect</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>py.com.sif.faje.webservices.rucas.stubs.connect.AppInfo</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASConnect</wsdl-message>
       <wsdl-message-part-name>appInfo</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>1</param-position>
       <param-type>py.com.sif.faje.webservices.rucas.stubs.connect.LoginMethod</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASConnect</wsdl-message>
       <wsdl-message-part-name>loginMethod</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>2</param-position>
       <param-type>py.com.sif.faje.webservices.rucas.stubs.connect.CryptMethod</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASConnect</wsdl-message>
       <wsdl-message-part-name>cryptMethod</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>py.com.sif.faje.webservices.rucas.stubs.connect.RUCASConnectResponse</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASConnectResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>RUCASLogin</java-method-name>
       <wsdl-operation>RUCASLogin</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>py.com.sif.faje.webservices.rucas.stubs.connect.LoginMethod</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASLogin</wsdl-message>
       <wsdl-message-part-name>loginMethod</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>1</param-position>
       <param-type>py.com.sif.faje.webservices.rucas.stubs.connect.CryptMethod</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASLogin</wsdl-message>
       <wsdl-message-part-name>cryptMethod</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>py.com.sif.faje.webservices.rucas.stubs.connect.RUCASLoginResponse</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_RUCASLoginResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>getClientSystem</java-method-name>
       <wsdl-operation>getClientSystem</wsdl-operation>
       <wsdl-return-value-mapping>
       <method-return-value>py.com.sif.faje.webservices.rucas.stubs.connect.ClientSystem</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_getClientSystemResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>getCurrentVersion</java-method-name>
       <wsdl-operation>getCurrentVersion</wsdl-operation>
       <wsdl-return-value-mapping>
       <method-return-value>java.lang.String</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://py.gov.set.services/rucas/">wsdlMsgNS:SessionManagement_getCurrentVersionResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      



      Here is my jboss-client.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-client PUBLIC
       "-//JBoss//DTD Application Client 4.0//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
      
      <jboss-client>
       <jndi-name>jbossws-client</jndi-name>
       <service-ref>
       <service-ref-name>service/SessionService</service-ref-name>
       <wsdl-override>
       http://interno.roshka.com.py/rucas/SessionManagementEJB?wsdl
       </wsdl-override>
       </service-ref>
      </jboss-client>
      


      Here is my application-client.xml :
      <application-client xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
       version="1.4">
       <display-name>rucas web service</display-name>
      
       <service-ref>
       <service-ref-name>service/SessionService</service-ref-name>
       <service-interface>javax.xml.rpc.Service</service-interface>
       <wsdl-file>http://interno.roshka.com.py/rucas/SessionManagementEJB?wsdl</wsdl-file>
       <jaxrpc-mapping-file>META-INF/jaxrpc-mapping-session.xml</jaxrpc-mapping-file>
       <port-component-ref>
       <service-endpoint-interface>
       py.com.sif.faje.webservices.rucas.stubs.connect.SessionManagement
       </service-endpoint-interface>
       </port-component-ref>
       </service-ref>
      </application-client>
      


      And the code of my client to invoke web service:
      protected InitialContext getInitialContext() throws NamingException
       {
       InitialContext iniCtx = new InitialContext();
       Hashtable env = iniCtx.getEnvironment();
       env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
       env.put("j2ee.clientName", "jbossws-client");
       return new InitialContext(env);
       }
      
       public void testTrivialAccess(){
       try{
       InitialContext iniCtx = getInitialContext();
       Service service = (Service)iniCtx.lookup("java:comp/env/service/SessionService");
       SessionManagement port = (SessionManagement)service.getPort(SessionManagement.class);
       RUCASLoginResponse resp = port.RUCASLogin(new LoginMethod(),new CryptMethod());
       }catch(Exception e){
       getLogger().error(e);
       }
      


      If i disable proxy, Network is unreachable error is present.
      The web service is fully functional (tested before posting) and the classes are generated with wscompile from JWSDP 2

      Any suggestions?


      Thanks in advance.

        • 1. Re: Web Service Client : Could not transmit message
          alberto sarubbi Newbie

          any "replacement technologies" will also be appreciated...
          :(

          • 2. Re: Web Service Client : Could not transmit message
            Heiko Braun Master

            well, get the remote server log file and look why it's responding with "Invalid HTTP server response [400] - Bad Request"...

            • 3. Re: Web Service Client : Could not transmit message
              alberto sarubbi Newbie

              No logs at the server. It does not pass through the proxy.
              Here's the proxy log:


              1152805871.888 4 myipaddress TCP_DENIED/400 1730 POST http://myproxyipaddress:3
              128http://myurl/rucas/SessionManagementEJB - NONE/- text/html


              watch that proxy address and port are appended to the invocation URL.



              • 4. Re: Web Service Client : Could not transmit message
                Marcel Moura Newbie

                Hi,

                I'm getting the same error in JBoss 4.0.5. Have you ever got to solve this problem?

                In a few words I'm trying to consume a web service hosted in what looks like to be a .NET server from a client running in JBoss 4.0.5.

                The same client running from a Java stand-alone application runs fine, with no transport errors. I'm able to receive a SOAP response with no problems. So the issue resides in the client web app. By the way, both the stand-alone and the web apps use the same code to build and send the soap messages. The only difference is that the web client used JNDI to retrieve the service interface.

                The client sends two different types of message to the server. One of them is small and runs fine. The other one sends a byte array and is quite big. That's the one that fails, returning a HTTP 400 - Bad request.

                Looking at the SOAP request message I could see that it was not being well formated by the JAX-RPC client. Please look at the bold Binario attribute below (it should be a Hex coded string - again, it works fine outside of JBoss - I'm not posting the correct message here):

                <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
                 <env:Header>
                 </env:Header>
                 <env:Body>
                 <ns1:RecebeLista xmlns:ns1="http://tempuri.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 <ns_mensagemLista:mensagemLista xmlns:ns_mensagemLista="http://www.atfla.serpro">
                 <ns_AC:AC xmlns:ns_AC="http://www.atfla.serpro/MensagemACLista.xsd">
                 <ns_AC:Nome>CN=AC CertiSign SRF, OU=Secretaria da Receita Federal - SRF, O=ICP-Brasil, C=BR</ns_AC:Nome>
                 <ns_AC:Chave>da2bac79587b4129976d42d04c29aec89fc972d0</ns_AC:Chave>
                 <ns_AC:Data>2007-06-28-03:00</ns_AC:Data>
                 <ns_AC:Hora>10:55:48.000-03:00</ns_AC:Hora>
                 </ns_AC:AC>
                 <ns_LCR:LCR xmlns:ns_LCR="http://www.atfla.serpro/MensagemACLista.xsd" Binario="[B@60232c">
                 <ns_LCR:Tamanho>1164.0</ns_LCR:Tamanho>
                 <ns_LCR:Delta>0.0</ns_LCR:Delta>
                 </ns_LCR:LCR>
                 </ns_mensagemLista:mensagemLista>
                 </ns1:RecebeLista>
                 </env:Body>
                </env:Envelope>
                


                Here's the stack trace (similar to the one posted above):

                br.com.certisign.ws.receita.client.exceptions.ServiceFailureException: br.com.certisign.ws.receita.client.exceptions.WSException: java.rmi.RemoteException: Call invocation failed: Could not transmit message; nested exception is:
                 javax.xml.soap.SOAPException: Could not transmit message
                 at br.com.certisign.ws.receita.client.control.ReceitaWSClientServlet.sendLCR(ReceitaWSClientServlet.java:298)
                 at br.com.certisign.ws.receita.client.control.ReceitaWSClientServlet.init(ReceitaWSClientServlet.java:179)
                 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
                 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
                 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
                 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
                 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                 at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                 at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
                 at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
                 at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
                 at org.jboss.web.WebModule.startModule(WebModule.java:83)
                 at org.jboss.web.WebModule.startService(WebModule.java:61)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:417)
                 at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                 at $Proxy38.start(Unknown Source)
                 at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                 at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                 at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                 at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
                 at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                 at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                 at $Proxy39.start(Unknown Source)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                 at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                 at $Proxy8.deploy(Unknown Source)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
                Caused by: br.com.certisign.ws.receita.client.exceptions.WSException: java.rmi.RemoteException: Call invocation failed: Could not transmit message; nested exception is:
                 javax.xml.soap.SOAPException: Could not transmit message
                 at br.com.certisign.ws.receita.client.ws.ReceitaWSClient.sendMessageACLista(ReceitaWSClient.java:32)
                 at br.com.certisign.ws.receita.client.control.ReceitaWSClientServlet.sendLCR(ReceitaWSClientServlet.java:284)
                 ... 92 more
                Caused by: java.rmi.RemoteException: Call invocation failed: Could not transmit message; nested exception is:
                 javax.xml.soap.SOAPException: Could not transmit message
                 at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:718)
                 at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
                 at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
                 at $Proxy55.recebeLista(Unknown Source)
                 at br.com.certisign.ws.receita.client.ws.ReceitaWSClient.sendMessageACLista(ReceitaWSClient.java:25)
                 ... 93 more
                Caused by: javax.xml.soap.SOAPException: Could not transmit message
                 at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
                 at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
                 ... 97 more
                Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:201)
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
                 at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
                 at org.jboss.remoting.Client.invoke(Client.java:525)
                 at org.jboss.remoting.Client.invoke(Client.java:488)
                 at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
                 ... 98 more
                Caused by: org.jboss.ws.WSException: Invalid HTTP server response [400] - Bad Request
                 at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
                 ... 103 more
                



                My web.xml follows:


                <?xml version = '1.0'?>

                <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
                <display-name>ReceitaWSClientServlet</display-name>

                <servlet-name>ReceitaWSClientServlet</servlet-name>
                <servlet-class>br.com.certisign.ws.receita.client.control.ReceitaWSClientServlet</servlet-class>
                <init-param>
                <param-name>propertiesFile</param-name>
                <param-value>WEB-INF/config/client.properties</param-value>
                </init-param>
                <init-param>
                <param-name>javax.xml.soap.MessageFactory</param-name>
                <param-value>com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl</param-value>
                </init-param>
                <load-on-startup>1</load-on-startup>

                <servlet-mapping>
                <servlet-name>ReceitaWSClientServlet</servlet-name>
                <url-pattern>/ReceitaWSClientServlet/*</url-pattern>
                </servlet-mapping>

                <session-config>
                <session-timeout>30</session-timeout>
                </session-config>

                <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                </welcome-file-list>

                <service-ref>
                <service-ref-name>services/ReceitaWSServer</service-ref-name>
                <service-interface>br.com.certisign.ws.receita.lcr.LCRReceber</service-interface>
                <wsdl-file>WEB-INF/lcrreceber.wsdl</wsdl-file>
                <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
                <port-component-ref>
                <service-endpoint-interface>
                br.com.certisign.ws.receita.lcr.LCRReceberSoap
                </service-endpoint-interface>
                </port-component-ref>
                </service-ref>

                </web-app>
                
                
                I tried to deploy the same app in JBoss 4.2.0 and got an exception:
                
                org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException: Entry not found with name ServiceRefHandler)
                
                
                
                I did not manage to configure the right Handler in the web.xml file. I tried something like the code below but it did not work:
                
                <handler>
                 <handler-name>Service Ref Handler</handler-name>
                 <handler-class>org.jboss.ws.core.jaxws.client.ServiceRefHandlerJAXWS</handler-class>
                </handler>
                
                
                
                
                I'd like to have the app running in 4.0.5.
                
                I can send you more information if necessary.
                
                Any help will be greatly appreciated!
                
                Thanks,
                Marcel
                


                • 5. Re: Web Service Client : Could not transmit message
                  alberto sarubbi Newbie

                  solved. not using JWSDP but JBossWS.
                  drop me a line if you want samples.

                  • 6. Re: Web Service Client : Could not transmit message
                    Marcel Moura Newbie

                    Thanks for your response.

                    Somehow I am not able to contact you through the forum. I was only able to get your user id.

                    Can you send a note to the following temp e-mail?
                    mmmm.rj at gmail dot com

                    We can go on from there if you don't mind.

                    Thanks again.

                    • 7. Re: Web Service Client : Could not transmit message
                      jb chs Newbie

                      Hi,
                      I have similar problem. Can you please let me know how you solved it.

                      Thanks,
                      JB

                      • 8. Re: Web Service Client : Could not transmit message
                        Karthik M Newbie

                        Hi i have the same problem can u please let me know the fix....