07-14-2010 01:40 AM
07-14-2010 03:53 AM
07-14-2010 06:16 AM
package com.xxxx.km.alfresco.webservice;
public class TestWebServiceSOAP {
public String test(){
String str = "test";
return str;
}
}
#
# Set the following property to reference the Alfresco server that you would like web service client
# to communicate with
repository.location=http://x.x.x.x:8080/alfresco/api
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://webservice.alfresco.km.xxxx.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://webservice.alfresco.km.xxxx.com" xmlns:intf="http://webservice.alfresco.km.xxxx.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!–WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)–>
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://webservice.alfresco.km.xxxx.com" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="test">
<complexType/>
</element>
<element name="testResponse">
<complexType>
<sequence>
<element name="testReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="testResponse">
<wsdl:part element="impl:testResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="testRequest">
<wsdl:part element="impl:test" name="parameters"/>
</wsdl:message>
<wsdl:portType name="TestWebServiceSOAP">
<wsdl:operation name="test">
<wsdl:input message="impl:testRequest" name="testRequest"/>
<wsdl:output message="impl:testResponse" name="testResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestWebServiceSOAPSoapBinding" type="impl:TestWebServiceSOAP">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http'/>
<wsdl:operation name="test">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="testRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="testResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestWebServiceSOAPService">
<wsdl:port binding="impl:TestWebServiceSOAPSoapBinding" name="TestWebServiceSOAP">
<wsdlsoap:address location="http://localhost:8080/Test123/services/TestWebServiceSOAP'/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<wsdlsoap:address location="http://localhost:8080/Test123/services/TestWebServiceSOAP'/>
<wsdlsoap:address location="http://x.x.x.x:8080/alfresco/api/AlfWebService/services/TestWebServiceSOAP'/>
Axis HTTP Servlet
Hi, you have reached the AXIS HTTP Servlet. Normally you would be hitting this URL with a SOAP client rather than a browser.
In case you are interested, my AXIS transport name appears to be 'http'
07-15-2010 03:13 AM
The service class "com.xxxx.km.alfresco.webservice.SearchTopContributorWebService" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
The method "sortByValue" on the service class "com.xxxx.km.alfresco.webservice.SearchTopContributorWebService" uses a data type, "java.util.Map", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
The method "sortByValue" on the service class "com.xxxx.km.alfresco.webservice.SearchTopContributorWebService" uses a data type, "java.util.Map", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
IWAB0398E Error in generating WSDL from Java: java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializer cannot be cast to org.apache.axis.encoding.Serializer
java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializer cannot be cast to org.apache.axis.encoding.Serializer
at org.apache.axis.encoding.ser.BaseSerializerFactory.getSpecialized(BaseSerializerFactory.java:165)
at org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAsInternal(BaseSerializerFactory.java:91)
at org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAs(BaseSerializerFactory.java:82)
at org.apache.axis.encoding.ser.BeanSerializerFactory.getSerializerAs(BeanSerializerFactory.java:64)
at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1838)
at org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:421)
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1909)
at org.apache.axis.wsdl.fromJava.Emitter.writeFaultMessage(Emitter.java:1822)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1143)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:430)
at org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:243)
at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand.executeAntTask(Java2WSDLCommand.java:180)
at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand.execute(Java2WSDLCommand.java:95)
at org.eclipse.jst.ws.internal.axis.creation.ui.command.BUCodeGenOperation$BottomUpWSModifyOperation.execute(BUCodeGenOperation.java:116)
at org.eclipse.jst.ws.internal.axis.creation.ui.command.BUCodeGenOperation.execute(BUCodeGenOperation.java:80)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:944)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:823)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
07-15-2010 04:01 AM
07-16-2010 02:28 AM
private Map<String,UserDetails> usageMap = Collections.synchronizedMap(new HashMap<String,UserDetails>());
07-20-2010 12:17 AM
07-20-2010 04:34 AM
Is there any way i can expose my web scripts as web service? Any wrapper or such thing.
AFAIK, web scripts are also based on web services.So does this mechanism exist?
08-03-2010 06:50 AM
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.alfresco.km.xxxx.com">
<soapenv:Header/>
<soapenv:Body>
<web:startSearch>
<web:location>all</web:location>
<web:designation>all</web:designation>
<web:noOfContributors>10</web:noOfContributors>
</web:startSearch>
</soapenv:Body>
</soapenv:Envelope>
Axis HTTP Servlet
Hi, you have reached the AXIS HTTP Servlet. Normally you would be hitting this URL with a SOAP client rather than a browser.
In case you are interested, my AXIS transport name appears to be 'http'
// Getting reference to the RepositoryServiceSoapBindingStub.
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Getting reference to the AdministrationServiceSoapBindingStub.
AdministrationServiceSoapBindingStub adminService = WebServiceFactory.getAdministrationService();
String pathQuery = "/app:company_home/cm:"+ISO9075.encode("Required Path String");
//Creating Query for Web Service.
String kmWsQuery = "PATH:\"/" + pathQuery + "//.\" AND TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"";
Query userSearchQuery = new Query(Constants.QUERY_LANG_LUCENE,kmWsQuery);
logger.debug("userSearchQuery : "+userSearchQuery.getStatement());
//Using predicate for querying repository.
Predicate searchPredicate = new Predicate(null, STORE, userSearchQuery);
//Getting nodes as result.
Node[] nodes= repositoryService.get(searchPredicate);
for (Node node : nodes) {
org.alfresco.webservice.types.NamedValue[] nodeProperties = node.getProperties();
for (org.alfresco.webservice.types.NamedValue nodeProperty : nodeProperties) {
if(nodeProperty.getName().endsWith(ContentModel.PROP_CREATOR.toString())){
String contentCreator = nodeProperty.getValue();
….}
for (org.alfresco.webservice.types.NamedValue nodeProperty : nodeProperties) {
if(nodeProperty.getName().endsWith(ContentModel.PROP_CREATOR.toString())){
String contentCreator = nodeProperty.getValue();
//Getting user location for creator found above using RepositoryServiceSoapBindingStub.
org.alfresco.webservice.administration.UserDetails userDetails = adminService.getUser(contentCreator);
org.alfresco.webservice.types.NamedValue[] userProperties = userDetails.getProperties();
for(org.alfresco.webservice.types.NamedValue userProp : userProperties){
if(userProp.getName().endsWith(ContentModel.PROP_LOCATION.toString())){
String userLocation = userProp.getValue();
}
}
….}
<wsdlsoap:address location="http://ur.server.ip.addessort/alfresco/api/SomeWebService'/>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.