tim
17 years agoContributor
WsdlImporter works in junit test but not in my application
I'm trying to import a WSDL using the WsdlImporter class. It works fine when I import a WSDL as a URL in a junit test, but it doesn't work when I use it in my application.
Using the same line of code, I get different results depending on where I run it.
When I run it in my junit test, I get the following log statements:
and
The same code gives me a different result in my application:
and
Using the same line of code, I get different results depending on where I run it.
WsdlInterface[] wsdls = WsdlImporter.importWsdl(wsdlProject, "http://lyricwiki.org/server.php?wsdl");
When I run it in my junit test, I get the following log statements:
12:36:04,707 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\dev\trunk\scitegic root\java_src\integration-netbeans\integration\soapui-settings.xml]
Progress: 1 - Caching Definition from url [http://lyricwiki.org/server.php?wsdl]
12:36:05,207 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
12:36:05,238 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
12:36:05,254 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
12:36:05,254 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
12:36:05,254 INFO [SchemaUtils] Added default schema from file:/C:/dev/trunk/scitegic%20root/apps/scidev/integration/soapui-2.5-bin/bin/soapui-2.5.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
Progress: 2 - Loading [http://lyricwiki.org/server.php?wsdl]
12:36:05,254 DEBUG [WsdlLoader] Getting wsdl component from [http://lyricwiki.org/server.php?wsdl]
Progress: 1 - Loading Definition from url
12:36:06,285 DEBUG [AbstractDefinitionContext] Loading Definition...
12:36:06,301 DEBUG [AbstractWsdlDefinitionLoader] Returning baseInputSource [http://lyricwiki.org/server.php?wsdl]
Retrieving document at 'http://lyricwiki.org/server.php?wsdl'.
12:36:06,457 DEBUG [WsdlInterfaceDefinition] Loaded WSDL: ok
12:36:06,457 INFO [SchemaUtils] Loading schema types from [http://lyricwiki.org/server.php?wsdl]
12:36:06,457 INFO [SchemaUtils] Getting schema http://lyricwiki.org/server.php?wsdl
12:36:06,676 DEBUG [AbstractDefinitionContext] Loaded Definition: ok
12:36:06,676 INFO [WsdlImporter] Finding importer for {urn:LyricWiki}LyricWikiBinding
12:36:06,691 INFO [WsdlImporter] Importing binding {urn:LyricWiki}LyricWikiBinding
12:36:06,707 INFO [Soap11HttpBindingImporter] importing endpoint http://lyricwiki.org/server.php
12:36:06,723 INFO [Soap11HttpBindingImporter] importing operation checkSongExists
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getAlbum
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getArtist
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getHometown
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getSong
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getSongResult
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation getSOTD
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation postAlbum
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation postArtist
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation postSong
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation postSong_flags
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation searchAlbums
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation searchArtists
12:36:06,738 INFO [Soap11HttpBindingImporter] importing operation searchSongs
and
wsdls.lengthgives me 1.
The same code gives me a different result in my application:
2009-01-29 12:26:54,333 INFO [SchemaUtils] Loading schema types from [http://lyricwiki.org/server.php?wsdl]
2009-01-29 12:26:54,333 INFO [SchemaUtils] Getting schema http://lyricwiki.org/server.php?wsdl
and
wsdls.lengthgives me 0.