Solved

Consuming webservice using Java

Posted on 2014-03-07
5
391 Views
Last Modified: 2014-03-10
Hi Experts,

we are trying to hit the service using Java webservice and the following is what has been used. its going into exception as soon as its reading the third line.

url wsdllocation = new url("http://WSDL");
QName qName = new QName ("Host", "service");
Service s = Service.create(wsdllocation, qName);
0
Comment
Question by:kalyangkm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 166 total points
ID: 39916417
its going into exception as soon as its reading the third line
Can you please post the details of the exception?

Also, if you are able to, posting the WSDL could be of assistance.
0
 
LVL 16

Accepted Solution

by:
Valeri earned 167 total points
ID: 39916929
I think that you have not pointed to the wsdl in the right way:
if the service is for example at this endpoint:
http://sample.com/hello/HelloService, then your first line should be like that:
url = new URL("http://sample.com/hello/HelloService?wsdl");
in other words: the URL of the service and "?wsdl" at the end.
0
 
LVL 12

Assisted Solution

by:Sharon Seth
Sharon Seth earned 167 total points
ID: 39917127
QName qName = new QName ("Host", "service");

In that line , host & service shld be varibles pointing to wsdllocation and the service name
0
 

Author Comment

by:kalyangkm
ID: 39918532
Thanks guys for the responses. Actually there was an issue with the WSDL, that it has a some number attached to it at the end

like htt://XXXXXXXX?wsdl?12344559333939

and that was changing for session. So we had to go for some stub model which i am not familiar with and someone else is performing that. I will reach out if i have doubts. Thanks.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This video teaches viewers about errors in exception handling.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question