cancel
Showing results for 
Search instead for 
Did you mean: 

repository-service.wsdl problem

ibobalca
Champ in-the-making
Champ in-the-making
Hi!

I have some problems consuming the Repository Web Service. I already tried what was suggested here http://forums.alfresco.com/viewtopic.php?p=11234
but i still get some errors :
[WARNING] s4s-att-not-allowed: Attribute 'nillable' cannot appear in element 'group'.

  line 199 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/cml.xsd



[WARNING] src-resolve.4.2: Error resolving component 'cms:Store'. It was detected that 'cms:Store' is in namespace 'http://www.alfresco.org/ws/model/content/1.0', but components from this namespace are not referenceable from schema document 'file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/repository-service.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'cms:Store' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/repository-service.wsdl#types?schema1'.

  line 35 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/repository-service.wsdl#types?schema1



[WARNING] s4s-att-not-allowed: Attribute 'nillable' cannot appear in element 'group'.

  line 24 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/cml.xsd



[ERROR] A class/interface with the same name "javaapplication32.Query" is already in use. Use a class customization to resolve this conflict.

  line 54 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/repository-service.wsdl



[ERROR] (Relevant to above error) another "Query" is generated from here.

  line 203 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/types.xsd



[ERROR] Two declarations cause a collision in the ObjectFactory class.

  line 203 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/types.xsd



[ERROR] (Related to above error) This is the other declaration.  

  line 54 of file:/F:/temp/JavaApplication3/xml-resources/web-service-references/repository-service/wsdl/tcebelli_8082/alfresco/wsdl/repository-service.wsdl



BUILD SUCCESSFUL (total time: 1 second)

Anyway, why is this service not working out-of-the-box ?
8 REPLIES 8

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

We have seen some issues with different WSDL clients supporting different styles of WSDL.

I'm aware the .NET doesn't like the nillable attribute in some situations and there is an outstanding issue relating to this.

What client are you using to access the WSDL?

Cheers,
Roy

markhayen
Champ in-the-making
Champ in-the-making
Hi,

.Net is not alone with issues on group-nillable
Oracle Bpel also doesn't like this.

Why don't you save the wsdl file locally
edit out the nillable property
and in your project point to the local file

This works for me!

Mark

ibobalca
Champ in-the-making
Champ in-the-making
Sorry for the delay (I was on vacation Smiley Surprisedops: ). I already did that before writing here - as another post on this forum suggested - and I still got the other two or three errors regarding the Query object  
 … "javaapplication32.Query" is already in use. 

and

… another "Query" is generated from here.

I tried Delphi 7 and NetBeans 5.5 ( I copy/pasted from NetBeans).

Thanks.

ewwhitley
Champ in-the-making
Champ in-the-making
Hello -

I'm also receiving the same type of exception.  I got past the first bit by removing the nillable attributes for the groups in cml.xsd (thanks for that, btw Smiley Very Happy ), but am now also hitting the same problem you noted with Netbeans 5.5.  I'm using Netbeans 6 M10 on Mac OS X 10.4.10 (intel).

When I attempt to import the repository-service wsdl I get…

[WARNING] src-resolve.4.2: Error resolving component 'cmsSmiley Frustratedtore'. It was detected that 'cmsSmiley Frustratedtore' is in namespace 'http://www.alfresco.org/ws/model/content/1.0', but components from this namespace are not referenceable from schema document 'file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'cmsSmiley Frustratedtore' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl#types?schema1'.
  line 35 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl#types?schema1

[ERROR] A class/interface with the same name "com.alfresco.respositoryservice.Query" is already in use. Use a class customization to resolve this conflict.
  line 54 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl

Any tips much appreciated.  I'm new to both netbeans and alfresco, so I'm a bit behind the 8-ball in terms of poking at this intelligently.

ewwhitley
Champ in-the-making
Champ in-the-making
Hello -

Update on my wsdl registration issues on NetBeans.

* Had issues importing …
  -  repository-service.wsdl
  -  dictionary-service.wsdl

* dictionary-service.wsdl - NetBeans noted that it had problems importing this due to differences between the xmlns:cms reference and import targetNamespace attributes.  I modified dictionary-service.wsdl so that the attributes were both "http://www.alfresco.org/ws/model/content/1.0"


xmlns:cms="http://www.alfresco.org/ws/model/content/1.0"

<xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd" />[/b]


<wsdl:definitions name="dictionary-service"
   targetNamespace="http://www.alfresco.org/ws/service/dictionary/1.0"
   xmlns:apachesoap="http://xml.apache.org/xml-soap"
   xmlns:dict="http://www.alfresco.org/ws/service/dictionary/1.0"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:cms="http://www.alfresco.org/ws/model/content/1.0">
   <!– ************************************** –>
   <!– Copyright Alfresco Software, Inc. 2005 –>
   <!– ************************************** –>
   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/dictionary/1.0" xmlns="http://www.w3.org/2001/XMLSchema">

         <xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd" />

* repository-service.wsdl - NetBeans complained about not importing the content reference.  I modified repository-service.wsdl to append an import statement


<xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd" />


   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0" xmlns="http://www.w3.org/2001/XMLSchema">

         <xsd:import namespace="http://www.alfresco.org/ws/headers/1.0" schemaLocation="../wsdl/headers.xsd"></xsd:import>
         <xsd:import namespace="http://www.alfresco.org/ws/cml/1.0" schemaLocation="../wsdl/cml.xsd"></xsd:import>
         <xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd" />

I'm now also (only) getting the duplicate repositoryservice.Query exception.


[ERROR] A class/interface with the same name "edu.myuniversity.alfresco.repositoryservice.Query" is already in use. Use a class customization to resolve this conflict.
  line 55 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl

[ERROR] (Relevant to above error) another "Query" is generated from here.
  line 203 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/types.xsd

[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 203 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/types.xsd

[ERROR] (Related to above error) This is the other declaration.  
  line 55 of file:/Users/myuser/Documents/Work/netbeans/VisManager/src/conf/xml-resources/web-service-references/repository-service/wsdl/localhost_8080/alfresco/wsdl/repository-service.wsdl


Heh - from what I can tell this looks to be a fairly important service, too Smiley Wink Just my luck that this is the one that's unhappy.

Thanks,
Eric

ewwhitley
Champ in-the-making
Champ in-the-making
Sited from: http://www.nabble.com/Illegal-Annotations-Exception-t3171522.html

"
    to "fix" given errors right click on ws client node -> edit ws
attributes -> WSDL Customization -> Global Customization, check "Use
Default" next to "Package Name" and press OK.
"

That seemed to do it.  Well - that I can tell at least.  It now registers the service correctly without the Query exception.

Thanks,
Eric

char
Champ in-the-making
Champ in-the-making
i would heavily recommend on NOT editing the WSDL file locally and then creating the service artifacts out of it. Instead, check which SOAP Stack you are using and try to set some binding-customization stuff to change the Java-naming of the service artifacts that you are trying to generate.

char
Champ in-the-making
Champ in-the-making
Well, after a heavy fight, i have the same issues as well.

Mainly "src-resolve.4.2: Error resolving component 'cmsSmiley Frustratedtore'…." is breaking my neck.

I have integrated Alfresco as a WAR-application in JBoss 4.2.2. The wsdl files are published, but when i try to make an injection like this:
   @WebServiceRef(wsdlLocation="http://localhost:8080/alfresco/wsdl/repository-service.wsdl")
   static RepositoryService repositoryService ;

i get an error:

00:23:43,562 WARN  [JBossWSEntityResolver] Trying to resolve id as a non-file URL: http://www.alfresco.org/ws/model/content/1.0
00:23:44,750 FATAL [application] javax.ejb.EJBTransactionRolledbackException: java.lang.ExceptionInInitializerError
javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: java.lang.ExceptionInInitializerError
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
   at javax.faces.component.UICommand.broadcast(UICommand.java:383)
   at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:61)

Also trying to instanciate without injection doesnt work…

I think its because of the repository-service.wsdl file that got published. As one before mentioned, you can edit it locally, but how can you change what is to be published by alfresco.war? The injection of authentication-service.wsdl is working correctly without any trouble…. Any hints on this please?