i'm trying upload file through webservice client but i m getting this error:
Caused by: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/StringLorg/apache/ws/
I suspect that there is conflict between org.apache.commons.schema.XmlSchema that is include in alfresco-repository:5.1.e.jar and org.apache.ws.xmlschema.xmlschema-core which i'm using in my webservice client.
Could you give me some advices how to solve this problem. If i run the client it works. but if i call client from workflow service task, i'm getting NoSuchMethodError.
Thank you so much for any help.
Hi Thong Huynh
It's very simple use case. I'm trying to call webservice from workflow. There is one userTask and one serviceTask in workflow. Service task is calling java class where is implemented call to our webservice. When I'm trying call webservice from some main class just like a java class its work. When i try to call ws from service Task i get this error. I try to solve it just localy with embedded tomcat server from alfresco-sdk-parent. Alfresco version is 5.1.e, activiti-cxf version 22.214.171.124 and org.apache.httpcomponents.httpcore version 4.4.5, those are external libraries i'm using.
Is it enough to test it for you?
Thank you for your answer
Hi Jakub Rautner
Thanks for the details but I'm afraid I would need to see your implementation to answer you why your code isn't working. It could be anything. Without a unit test to demonstrate the issue, I won't be able to answer you why.
I ran a quick unit test to test calling a web service (SOAP) from the Java Service Task and it works as expected. I have attached my unit test log and the process def xml. As you can see in the log, I was able to successfully call the public web service and get back the response.
There are many ways you can call web service from Java Service Task. My unit test uses this library Maven Repository: javax.xml.soap » saaj-api » 1.3.5
Please spend time to write up a unit test that shows your issue and share. That's the most effective way for people to understand your issue and help you.
Hi Thong Huynh,
Sorry I wasn't specific. Our webservice works, if im try it in browser or if i'm calling ws from console with client. But in alfresco context it does not work. There is problem with javax.xml.ws.Service class. In our ws classloader takes it from default jdk but in alfresco context it takes this class from geronimo-jaxws_2.1_spec-1.0.jar
Thank you for any advices.