Solved

Consuming webservice using Java

Posted on 2014-03-07
5
384 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
5 Comments
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 166 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 48
Path of Workbook 3 44
White board coding practice 3 60
mockito example issue 8 26
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now