Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Web Services
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Web Services
javax.xml.ws.Service problem
Lukas Gorski
Greenhorn
Posts: 2
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi everybody,
I'm having a problem with javax.xml.ws.Service.
When I write:
QName qName = new QName("BusinessService"); Service s = Service.create(new URL("https://ws-test.publikations-plattform.de/services/BusinessService?wsdl"), qName);
Following error schows up:
Exception in thread "main" java.lang.IllegalArgumentException: prefix cannot be null. at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getNamespaceURI(XMLStreamReaderImpl.java:1274) at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.getNamespaceURI(XMLStreamReaderFilter.java:233) at com.sun.xml.internal.ws.wsdl.parser.ParserUtil.getQName(ParserUtil.java:69) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parseMessage(RuntimeWSDLParser.java:763) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:294) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:127) at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:229) at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:192) at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:162) at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:86) at javax.xml.ws.Service.<init>(Service.java:76) at javax.xml.ws.Service.create(Service.java:700) at Test.main(Test.java:105)
Do you know how to solve this problem ?
Thanks in advance
Ivan Krizsan
Ranch Hand
Posts: 2198
1
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi!
When you create the QName instance that is to identify the service, you do not supply the namespace of the service (the <wsdl:service> element).
A correct way of creating the QName can look like this:
QName serviceName = new QName("http://www.ivan.com/questionService", "QuestionService");
Best wishes!
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Webservice goes down after redeploy
JAX-WS Web Service Clients- Static Clients Problem
javax.xml.ws.WebServiceException: Failed to access the WSDL
Web Service *Client*
javax.xml.ws.Service problem
More...