Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Consuming webservice using Java

Posted on 2014-03-07
5
Medium Priority
?
406 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 36

Assisted Solution

by:mccarl
mccarl earned 332 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 334 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 334 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

636 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