Hello
        Everybody, help me.
        Envrionment:
                jboss-4.0.4.GA
                jbossws14.sar
                jbossws-samples-1.0.2.GA
        I download jbossws-samples-1.0.2.GA from jboss website and compile the 
package with build.xml provided by jbossws-samples-1.0.2.GA.
        But when I run the task "tests" defined in built.xml, the following 
error occurs:
        (jbossws-samples-rpcstyle.war,jbossws-samples-rpcstyle-client.jar)
        
        Could not dereference object
javax.naming.NamingException: Could not dereference object [Root exception is 
org.jboss.ws.metadata.wsdl.WSDLException: java.net.ConnectException: Connection 
refused: connect] at 
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705) at 
org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
 at $Proxy1.lookup(Unknown Source) at 
javax.naming.InitialContext.lookup(InitialContext.java:351) at 
org.jboss.test.ws.samples.rpcstyle.TrivialServiceRpcTestCase.setUp(TrivialServiceRpcTestCase.java:67)
 at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at 
junit.extensions.TestSetup$1.protect(TestSetup.java:19) at 
junit.extensions.TestSetup.run(TestSetup.java:23)Caused by: 
org.jboss.ws.metadata.wsdl.WSDLException: java.net.ConnectException: Connection 
refused: connect at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocu!
 ment(WSDLDefinitionsFactory.java:204) at 
org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:112)
 at 
org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
 at 
org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:110)
 at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:112) at 
org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:181)
 at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at 
org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125) at 
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
 ... 19 moreCaused 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.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) 
at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at 
sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at 
sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at 
sun.net.www.http.HttpClient.(HttpClient.java:214) at 
sun.net.www.http.HttpClient.New(HttpClient.java:287) at 
sun.net.www.http.HttpClient.New(HttpClient.java:299) at 
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
 at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
 at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669) 
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
 at java.net.URL.openStream(URL.java:1007) at 
org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:187)
 ... 27


The content of webservices.xml in jbossws-samples-rpcstyle.war:
<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' 
xmlns:impl='http://org.jboss.ws/samples/rpcstyle' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee 
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
 <webservice-description>
  <webservice-description-name>SampleService</webservice-description-name>
  <wsdl-file>WEB-INF/wsdl/SampleService.wsdl</wsdl-file>
  <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
  <port-component>
   <port-component-name>TrivialServicePort</port-component-name>
   <wsdl-port>impl:TrivialServicePort</wsdl-port>
   
<service-endpoint-interface>org.jboss.test.ws.samples.rpcstyle.TrivialService</service-endpoint-interface>
   <service-impl-bean>
    <servlet-link>TrivialEndpoint</servlet-link>
   </service-impl-bean>
  </port-component>
 </webservice-description>



The content of web.xml in jbossws-samples-rpcstyle.war:
<?xml version="1.0" encoding="UTF-8"?>

<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">

  
    <servlet-name>TrivialEndpoint</servlet-name>
    
<servlet-class>org.jboss.test.ws.samples.rpcstyle.TrivialEndpointJSE</servlet-class>
  
  
  <servlet-mapping>
    <servlet-name>TrivialEndpoint</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

</web-app>


The content of SampleService.wsdl in jbossws-samples-rpcstyle.war:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name='SampleService' 
targetNamespace='http://org.jboss.ws/samples/rpcstyle' 
xmlns='http://schemas.xmlsoap.org/wsdl/' 
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
xmlns:tns='http://org.jboss.ws/samples/rpcstyle' 
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
 
 
  
  
 
 
  
 
 
  
   
   
  
 
 
  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
  
   <soap:operation soapAction=''/>
   
    <soap:body namespace='http://org.jboss.ws/samples/rpcstyle' use='literal'/>
   
   
    <soap:body namespace='http://org.jboss.ws/samples/rpcstyle' use='literal'/>
   
  
 
 
  
   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
  
 



When I edit web.xml as following, the error also exists:
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:mh='http://org.jboss.ws/samples/rpcstyle'  
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
  version="2.4">

  
    <servlet-name>TrivialEndpoint</servlet-name>
    
<servlet-class>org.jboss.test.ws.samples.rpcstyle.TrivialEndpointJSE</servlet-class>
  
  
  <service-ref>
    <service-ref-name>service/TrivialService</service-ref-name>
    <service-interface>org.jboss.test.ws.samples.rpcstyle.TrivialService
    </service-interface>
    <wsdl-file>WEB-INF/wsdl/SampleService.wsdl</wsdl-file>
    <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
    <service-qname>mh:TrivialService</service-qname>
  </service-ref>
  

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

</web-app>

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982262#3982262

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982262

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to