Skip to main content

javax.xml.ws.Service problem

1 reply [Last post]
magnum99
Offline
Joined: 2009-10-09
Points: 0

Hi everybody,

I'm having a problem with javax.xml.ws.Service.
When I write:

Code:

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:

Code:

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.(WSServiceDelegate.java:192)
at com.sun.xml.internal.ws.client.WSServiceDelegate.(WSServiceDelegate.java:162)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:86)
at javax.xml.ws.Service.(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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jammychen
Offline
Joined: 2009-06-17
Points: 0

Do you have delcared the Namespace for your webservice in WSDL? if yes please change QName qName = new QName("BusinessService") to invoke the webservice Namespace, if not please use new QName("", "BusinessService") retry. if this is't also available maybe you should delcare Namespace for webservice