cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Closed: (CXF-2970) Service cannot create a Socket
Date Fri, 03 Sep 2010 08:21:34 GMT

     [ https://issues.apache.org/jira/browse/CXF-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang closed CXF-2970.
-----------------------------

    Resolution: Won't Fix

> Service cannot create a Socket
> ------------------------------
>
>                 Key: CXF-2970
>                 URL: https://issues.apache.org/jira/browse/CXF-2970
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: Windows XP, Java jdk1.6.0_20, Maven 2.2.1, Eclipse 3.6.0, activemq-core
5.4.0
>            Reporter: Paulo Rodrigez
>            Assignee: Willem Jiang
>            Priority: Minor
>
> Hey
> I've got a problem to create a service SOAP over JMS. I have created a WSDL and use you
codegen plugin to generate the server-skel. Now I try to start this service with the following
lines:
> {code}
> public class ProjectServer {
> 	private ProjectServer() throws NamingException {
> 		// You just need to set the address with JMS URI
> 		String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue"
> 			+ "?jndiInitialContextFactory"
> 			+ "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
> 			+ "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61610";
> 		Project implementor = new ProjectImpl();
> 		JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
> 		svrFactory.setServiceClass(Project.class);
> 		svrFactory.setAddress(address);
> 		// And specify the transport ID with SOAP over JMS specification
> 		svrFactory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
> 		svrFactory.setServiceBean(implementor);
> 		svrFactory.create();
> 	}
> 	/**
> 	 * @param args
> 	 * @throws NamingException 
> 	 */
> 	public static void main(String[] args) throws NamingException {
> 		new ProjectServer();
> 	}
> }
> {code}
> Here is my WSDL:
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 	xmlns:tns="http://www.mycompany.com/project/service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapjms="http://www.w3.org/2008/07/soap/bindings/JMS/"
> 	xmlns:model="http://www.mycompany.com/project/model"
> 	name="project" targetNamespace="http://www.mycompany.com/project/service">
> 	<wsdl:types>
> 		<xsd:schema targetNamespace="http://www.mycompany.com/project/model">
> 			<xsd:element name="GreetMeOp">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="in" type="xsd:string" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="GreetMeOpResponse">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="out" type="xsd:string" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="StringName" type="xsd:string"></xsd:element>
> 			<xsd:element name="StringText" type="xsd:string"></xsd:element>
> 		</xsd:schema>
> 	</wsdl:types>
> 	<wsdl:message name="greetMeRequest">
> 		<wsdl:part element="model:StringName" name="name" />
> 	</wsdl:message>
> 	<wsdl:message name="greetMeResponse">
> 		<wsdl:part element="model:StringText" name="greetings" />
> 	</wsdl:message>
> 	<wsdl:portType name="project">
> 		<wsdl:operation name="greetMe">
> 			<wsdl:input message="tns:greetMeRequest" />
> 			<wsdl:output message="tns:greetMeResponse" />
> 		</wsdl:operation>
> 	</wsdl:portType>
> 	<wsdl:binding name="projectSOAP" type="tns:project">
> 		<soap:binding style="document"
> 			transport="http://www.w3.org/2008/07/soap/bindings/JMS/" />
> 		<!-- <soapjms:jndiContextParameter name="name" value="value" /> -->
> 		<soapjms:jndiConnectionFactoryName>ConnectionFactory
> 		</soapjms:jndiConnectionFactoryName>
> 		<soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory
> 		</soapjms:jndiInitialContextFactory>
> 		<soapjms:jndiURL>tcp://localhost:61616</soapjms:jndiURL>
> 		<soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
> 		<soapjms:priority>5</soapjms:priority>
> 		<soapjms:timeToLive>1000</soapjms:timeToLive>
> 		<wsdl:operation name="greetMe">
> 			<soap:operation soapAction="http://www.mycompany.com/project/service/GreetMeOp"
/>
> 			<wsdl:input>
> 				<soap:body use="literal" />
> 			</wsdl:input>
> 			<wsdl:output>
> 				<soap:body use="literal" />
> 			</wsdl:output>
> 		</wsdl:operation>
> 	</wsdl:binding>
> 	<wsdl:service name="project">
> 		<wsdl:port binding="tns:projectSOAP" name="ServicePort">
> 			<soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue" />
> 		</wsdl:port>
> 	</wsdl:service>
> </wsdl:definitions>
> {code}
> Error is:
> INFO: Setting the server's publish address to be jms:jndi:dynamicQueues/test.cxf.jmstransport.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61610
> Exception in thread "main" org.springframework.jms.UncategorizedJmsException: Uncategorized
exception occured during JMS processing; nested exception is javax.jms.JMSException: Could
not connect to broker URL: tcp://localhost:61610. Reason: java.net.ConnectException: Connection
refused: connect
> 	at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
> 	at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
> 	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
> 	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:431)
> 	at org.apache.cxf.transport.jms.JMSFactory.resolveOrCreateDestination(JMSFactory.java:337)
> 	at org.apache.cxf.transport.jms.JMSFactory.createJmsListener(JMSFactory.java:290)
> 	at org.apache.cxf.transport.jms.JMSFactory.createJmsListener(JMSFactory.java:175)
> 	at org.apache.cxf.transport.jms.JMSDestination.activate(JMSDestination.java:112)
> 	at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
> 	at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:181)
> 	at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:838)
> 	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
> 	at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:186)
> 	at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:183)
> 	at com.mycompany.project.server.ProjectServer.<init>(ProjectServer.java:26)
> 	at com.mycompany.project.server.ProjectServer.main(ProjectServer.java:35)
> Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61610.
Reason: java.net.ConnectException: Connection refused: connect
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> 	at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> 	at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
> 	at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
> 	at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.doCreateConnection(UserCredentialsConnectionFactoryAdapter.java:178)
> 	at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.createConnection(UserCredentialsConnectionFactoryAdapter.java:150)
> 	at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
> 	at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
> 	at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
> 	at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
> 	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:456)
> 	... 13 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> 	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> 	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> 	at java.net.Socket.connect(Socket.java:529)
> 	at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> 	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> 	at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> 	at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> 	at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> 	at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> 	at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> 	at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> 	... 22 more
> As sample I use this: http://cxf.apache.org/docs/soap-over-jms-10-support.html
> Regards,
> Paulo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message