UNBOUND_PREFIX error for the web service client build from wsdl file.

Tuesday, August 16, 2011
Avatar
Try to build web services client from wsdl for spiraTeam. The link is.
http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl

1. use eclipse-jee-indigo-win32-x86_64 to build it. Can generate some java files, but when call 
            ImportExportLocator exportLocator = new ImportExportLocator(
                    "http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl",
                    new QName("https://www.inflectra.com/SpiraTest/Services/v3.0/", "ImportExport")
            );
failed with error
javax.xml.rpc.ServiceException: Error processing WSDL document:  
WSDLException (at /wsdl:definitions/wsdl:message[1]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'tns:Connection_Authenticate'.: 

failed with error
[WARNING] src-resolve.4.2: Error resolving component 'q190:ArrayOfint'. It was d
etected that 'q190:ArrayOfint' is in namespace 'http://schemas.microsoft.com/200
3/10/Serialization/Arrays', but components from this namespace are not reference
able from schema document 'http://spirateam-2.smsi.com/ST/Services/v3_0/ImportEx
port.svc?wsdl#types?schema4'. If this is the incorrect namespace, perhaps the pr
efix of 'q190:ArrayOfint' needs to be changed. If this is the correct namespace,
 then an appropriate 'import' tag should be added to 'http://spirateam-2.smsi.co
m/ST/Services/v3_0/ImportExport.svc?wsdl#types?schema4'.
  line 72 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl#
types?schema4

[WARNING] src-resolve.4.2: Error resolving component 'q1:RemoteUser'. It was det
ected that 'q1:RemoteUser' is in namespace 'http://schemas.datacontract.org/2004
/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects', but components from this
 namespace are not referenceable from schema document 'http://spirateam-2.smsi.c
om/ST/Services/v3_0/ImportExport.svc?wsdl#types?schema1'. If this is the incorre
ct namespace, perhaps the prefix of 'q1:RemoteUser' needs to be changed. If this
 is the correct namespace, then an appropriate 'import' tag should be added to '
http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl#types?schema1
'.
  line 1 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl#t
ypes?schema1

[WARNING] src-resolve.4.2: Error resolving component 'q50:ArrayOfint'. It was de
tected that 'q50:ArrayOfint' is in namespace 'http://schemas.microsoft.com/2003/
10/Serialization/Arrays', but components from this namespace are not referenceab
le from schema document 'http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExpo
rt.svc?wsdl#types?schema1'. If this is the incorrect namespace, perhaps the pref
ix of 'q50:ArrayOfint' needs to be changed. If this is the correct namespace, th
en an appropriate 'import' tag should be added to 'http://spirateam-2.smsi.com/S
T/Services/v3_0/ImportExport.svc?wsdl#types?schema1'.
  line 1 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl#t
ypes?schema1

[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 672 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl
[ERROR] (Related to above error) This is the other declaration.
  line 1124 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 655 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl
[ERROR] (Related to above error) This is the other declaration.
  line 1097 of http://spirateam-2.smsi.com/ST/Services/v3_0/ImportExport.svc?wsdl
It looks like the wsdl link have some problem, any suggestion?

2 Replies
Wednesday, August 17, 2011
Avatar
re: DaisyDai Tuesday, August 16, 2011
Hej Daisy I remembered the Chicago office had some success with this, perhaps contact somewhere there if they are helpful.
Saturday, August 27, 2011
Avatar
re: DaisyDai Tuesday, August 16, 2011
There is a known bug in wsimport that causes it to fail (not a bug in the WSDL). I would recommend downloading the JUnit add-on from our website (https://www.inflectra.com/SpiraTeam/Downloads.aspx) and using the pre-build Java classes in the soap package. They were built using wsimport but then manually fixed by our development team.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, August 16, 2011
  • Last Reply: Saturday, August 27, 2011
  • Replies: 2
  • Views: 11250