Problem when calling service from the tomcat
djlxiong Apr 15, 2008 11:18 PMHi,
I want to call a web service from the tomcat, and my jboss_esb.xml is like below.
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5"> <providers> <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost"> <jms-bus busid="addEsbChannel"> <jms-message-filter dest-type="QUEUE" dest-name="queue/add_esb" /> </jms-bus> </jms-provider> </providers> <services> <service category="MyAddServiceCategory" name="addService1" description="Add service Consumer"> <listeners> <jms-listener name="JMS-ESBListener" busidref="addEsbChannel" maxThreads="1" /> </listeners> <actions> <action name="request-mapper" class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyRequestAction"> </action> <action name="soapui-client-action1" class="org.jboss.soa.esb.actions.soap.SOAPClient"> <property name="wsdl" value="http://localhost:8686/axis2/services/AddService?wsdl" /> <property name="responseAsOgnlMap" value="true" /> <property name="SOAPAction" value="add"/> </action> <action name="response-mapper" class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyResponseAction"> </action> </actions> </service> </services> </jbossesb>
When I call the service, it reports the errors like bellow.
10:14:16,437 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 10:14:16,437 INFO [STDOUT] Request map is: {sub.x=5, sub.y=2} 10:14:16,437 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 10:14:18,171 INFO [STDOUT] 10:14:18,171 WARN [SoapUI] Failed to load settings [soapui-settings.xml (the system cann't find the file)], creating new 10:14:21,296 INFO [STDOUT] Progress: 1 - Caching definition from url [http://localhost:8686/axis2/services/AddService?wsdl] 10:14:21,468 INFO [STDOUT] 10:14:21,468 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include 10:14:21,656 INFO [STDOUT] 10:14:21,656 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema 10:14:21,671 INFO [STDOUT] 10:14:21,671 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace 10:14:21,718 INFO [STDOUT] 10:14:21,718 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd 10:14:21,718 INFO [STDOUT] 10:14:21,718 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime 10:14:21,734 INFO [STDOUT] 10:14:21,734 INFO [SchemaUtils] Added default schema from file:/C:/JbossAs/server/default/tmp/deploy/tmp47695soapui-1.7.1.jar!/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime 10:14:25,671 INFO [STDOUT] 10:14:25,671 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. 10:14:25,750 INFO [STDOUT] Progress: 1 - Loading definition from cache 10:14:25,921 INFO [STDOUT] Retrieving document at 'http://localhost:8686/axis2/services/AddService?wsdl'. 10:14:26,453 INFO [STDOUT] 10:14:26,453 INFO [SchemaUtils] Loading schema types from [http://localhost:8686/axis2/services/AddService?wsdl] 10:14:26,453 INFO [STDOUT] 10:14:26,453 INFO [SchemaUtils] Getting schema http://localhost:8686/axis2/services/AddService?wsdl 10:14:26,500 INFO [STDOUT] 10:14:26,500 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces 10:14:27,421 INFO [STDOUT] 10:14:27,421 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP11Binding 10:14:27,437 INFO [STDOUT] 10:14:27,437 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP11Binding 10:14:27,593 INFO [STDOUT] 10:14:27,593 INFO [Soap11HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService 10:14:27,796 INFO [STDOUT] 10:14:27,796 INFO [Soap11HttpBindingImporter] importing operation add 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [Soap11HttpBindingImporter] importing operation mul 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [Soap11HttpBindingImporter] importing operation sub 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP12Binding 10:14:27,828 INFO [STDOUT] 10:14:27,828 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP12Binding 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [Soap12HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [Soap12HttpBindingImporter] importing operation add 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [Soap12HttpBindingImporter] importing operation mul 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [Soap12HttpBindingImporter] importing operation sub 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding 10:14:27,843 INFO [STDOUT] 10:14:27,843 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding 10:14:27,953 INFO [STDOUT] Progress: 1 - Caching definition from url [http://localhost:8686/axis2/services/AddService?wsdl] 10:14:28,937 INFO [STDOUT] 10:14:28,937 INFO [HttpClientSupport$Helper] Initializing SSL 10:14:29,375 INFO [STDOUT] 10:14:29,375 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. 10:14:29,406 INFO [STDOUT] Progress: 1 - Loading definition from cache 10:14:29,437 INFO [STDOUT] Retrieving document at 'http://localhost:8686/axis2/services/AddService?wsdl'. 10:14:29,453 INFO [STDOUT] 10:14:29,453 INFO [SchemaUtils] Loading schema types from [http://localhost:8686/axis2/services/AddService?wsdl] 10:14:29,453 INFO [STDOUT] 10:14:29,453 INFO [SchemaUtils] Getting schema http://localhost:8686/axis2/services/AddService?wsdl 10:14:29,484 INFO [STDOUT] 10:14:29,484 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces 10:14:31,781 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/sub_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/> > ] ReplyTo: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/sub_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='21779fda-32f4-4ec6-ad71-b86790f176fc'/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: ID:5-12083120562181 RelatesTo: jms:correlationID#c198bb26-3c69-46a8-90a7-97c5266fc356 ] org.jboss.soa.esb.actions.ActionProcessingException: Failed to invoke SOAP Endpoint: 'http://127.0.0.1:80/axis2/services/AddService ' - 'sub'. at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:382) at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:338) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316) at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:235) at org.apache.commons.httpclient.HttpParser.readRawLine(Unknown Source) at org.apache.commons.httpclient.HttpParser.readLine(Unknown Source) at org.apache.commons.httpclient.HttpConnection.readLine(Unknown Source) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown Source) at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown Source) at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source) at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source) at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source) at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:375) ... 6 more
It read the service from 'http://localhost:8686/axis2/services/AddService?wsdl', but after that it turns to invoke the endpoint from 'http://localhost:80/axis2/services/AddService '.
And the wsdl describe the all the ports as '8686'.
Does anybody know how to solve the problem?
Thanks a billion.