users@jax-ws.java.net

Re: wsimport generates broken service from eBay WSDL

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Wed, 04 Apr 2007 14:50:24 -0700

* There was some problem when sjsxp StAX parser reuses the
XMLStreamReader instances when they are already in use. I think we took
care of it yesterday. Cany you try with the latest 2.1.1 nightly and let
us know whether it works. It would take a week before it gets into
Glassfish.

* The following error is primarily because of eating away the original
exception, ie it cannot access WSDL. This is also fixed.
javax.xml.ws.WebServiceException:
{urn:ebay:apis:eBLBaseComponents}eBayAPIInterfaceService is not a valid
service. Valid services are:

Jitu

Mark Hansen wrote:
> I have also tried this using JAX-WS RI 2.1.1-hudson-1983-Nightly
> (bundled with GlassFish V2 b41), and get a different error, as follows:
>
> (Note, there is no string "--" within comments at or near row 37096 of
> the WSDL.)
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[37096,31]
> Message: The string "--" is not permitted within comments.
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:242)
>
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.skipTags(XMLStreamReaderUtil.java:132)
>
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.skipElement(XMLStreamReaderUtil.java:105)
>
> at
> com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.definitionsElements(WSDLParserExtensionFacade.java:126)
>
> at
> com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:299)
>
> at
> com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:124)
>
> at
> com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:226)
>
> at
> com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:189)
>
> at
> com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:159)
>
> at
> com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:81)
>
> at javax.xml.ws.Service.<init>(Service.java:56)
> at
> ebay.apis.eblbasecomponents.EBayAPIInterfaceService.<init>(EBayAPIInterfaceService.java:43)
>
> at
> ebay.apis.eblbasecomponents.TestEBayAPIInterfaceService.testConstructor(TestEBayAPIInterfaceService.java:38)
>
>
>
>
> Mark Hansen wrote:
>
>> 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
>>
>> }
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>