Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL access error

 
Anuradha Prasanna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam new to web service.
Started trying my first simple program.

The following is the code i used.





Here is the simple test class as follows for the above web service.



i get the following error, when i run the test class,

Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://127.0.0.1:8080/ejb/HelloWorld?wsdl. It failed with:
http://127.0.0.1:8080/ejb/HelloWorld?wsdl.
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:263)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:226)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:56)
at javax.xml.ws.Service.create(Service.java:680)
at samples.webservice.TestEJB.getPort(TestEJB.java:29)
at samples.webservice.TestEJB.main(TestEJB.java:15)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:8080/ejb/HelloWorld?wsdl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
at java.net.URL.openStream(URL.java:1010)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:805)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:262)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:129)
... 8 more


I copied the example tutorial to run this example.
Can anyone please explain me how to correct the error.
What should be the value of the "endpointURI" in the TestEJB class in lines 1 and 2. I have no idea what it is used for and what's the value for it? If i correct it, then may be my example will run without error.

I guess its a very basic one for people in this form.
Please help me fix this.
 
QiFeng Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I can help you
remove the "?wsdl" from the endpoint string.
 
QiFeng Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
n
 
QiFeng Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,Please forget privious replay
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hard li wrote:

Please check your private messages for an important administrative matter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic