users@jax-ws.java.net

wsimport generates broken service from eBay WSDL

From: Mark Hansen <marklists_at_javector.com>
Date: Wed, 04 Apr 2007 10:04:59 -0400

I am using JAX-WS RI 2.1.1-hudson-1922-Nightly that is bundled with
GlassFish V2 b39.

When I use wsimport on this WSDL -
http://developer.ebay.com/webservices/479/eBaySvc.wsdl, it generates the
class EBayAPIInterfaceService (see listing below). When I try to create
an instance of that class using its noarg constructor, I a runtime error
indicating that {urn:ebay:apis:eBLBaseComponents}eBayAPIInterfaceService
is not a valid service (see stack trace below). But that service is
valid and contained in the WSDL.

Older versions of JAX-WS RI worked OK on this eBay example (sorry, but
I'm not sure how far back ...).

Does anyone have any thoughts on this? Should I file a bug report?

-- Mark

Stack Trace
============
javax.xml.ws.WebServiceException:
{urn:ebay:apis:eBLBaseComponents}eBayAPIInterfaceService is not a valid
service. Valid services are:
    at
com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:205)
    at
com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:173)
    at
com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:82)
    at javax.xml.ws.Service.<init>(Service.java:56)
    at
ebay.apis.eblbasecomponents.EBayAPIInterfaceService.<init>(EBayAPIInterfaceService.java:43)
    at
com.javector.soashopper.ebay.EBayShopperImp.<init>(EBayShopperImp.java:117)
    at com.javector.soashopper.ShopperImp.newShopperImp(ShopperImp.java:41)
    at com.javector.soashopper.Shopper.offerSearch(Shopper.java:49)
    at
com.javector.soashopper.TestSOAShopperService.runOfferSearch(TestSOAShopperService.java:69)
    at
com.javector.soashopper.TestSOAShopperService.testEBayOfferSearch(TestSOAShopperService.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
    at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
    at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)

Generated Source
=========================

/**
 * Version 479
 *
 * This class was generated by the JAXWS SI.
 * JAX-WS RI 2.1.1-hudson-1922-Nightly
 * Generated source version: 2.1
 *
 */
@WebServiceClient(name = "eBayAPIInterfaceService", targetNamespace =
"urn:ebay:apis:eBLBaseComponents", wsdlLocation =
"http://developer.ebay.com/webservices/479/eBaySvc.wsdl")
public class EBayAPIInterfaceService
    extends Service
{

    private final static URL EBAYAPIINTERFACESERVICE_WSDL_LOCATION;

    static {
        URL url = null;
        try {
            url = new
URL("http://developer.ebay.com/webservices/479/eBaySvc.wsdl");
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        EBAYAPIINTERFACESERVICE_WSDL_LOCATION = url;
    }

    public EBayAPIInterfaceService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public EBayAPIInterfaceService() {
        super(EBAYAPIINTERFACESERVICE_WSDL_LOCATION, new
QName("urn:ebay:apis:eBLBaseComponents", "eBayAPIInterfaceService"));
    }

 ..... // snip

}