• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem accessing webservice from client code

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have developed a WebService by using Sun-JaxWs-ri and service is working fine, i am able to access wsdl. Then i have generated the client code by using wsdl with "wsimport" tool from jdk6.

Problem:
Unable to execute the client code. Getting following exception.



Please find the attached wsdl file, client class, service class and port class and its data types.

wsdl file:


Client code:


Port class:


Service class:
 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well from error stack its clear that exception is thrown from line 11 of LoginValidationTest so Port class is not in picture yet. also it is shouting about null argument and only possibility from line 46 of LoginValidation is LOGINVALIDATION_WSDL_LOCATION being null.
I assumed you have overridden WSDL location to http://localhost:8082/JaxWsSunTopDown/LoginServicePort?wsdl is the ?wsdl correct here? I think it should be just [b]http://localhost:8082/JaxWsSunTopDown/LoginServicePort. so you need to rerun wsimport

if this does not work then try using jax-ws-catalog.xml with systemId=http://localhost:8082/JaxWsSunTopDown/LoginServicePort and uri=path of your wsdl, something like wsd/LoginServicePort.wsdl.

hope this helps.

-P
 
murali kankanala
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran the the command "wsimport -keep -s ./src -p com.training.jaxws.sun.topdown.client -d ./build/classes http://localhost:8082/JaxWsSunTopDown/LoginServicePort?wsdl"

If i remove ?wsdl it is not working and giving error invalid wsdl. So i must give "http://localhost: 8082/JaxWsSunTopDown /LoginServicePort?wsdl".
 
murali kankanala
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shall i know where to put jaxws-catalog.xml ? and what it should contain.
 
Praful Thakare
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://docs.oracle.com/cd/E13222_01/wls/docs103/webserv_adv/xml.html

it should be in your classpath, i guess one dir above wsdl directory.
 
reply
    Bookmark Topic Watch Topic
  • New Topic