cancel
Showing results for 
Search instead for 
Did you mean: 

raw XML code to access Authentication in WSDL

dbridges
Champ in-the-making
Champ in-the-making
I am evaluating Alfresco to be used as a document repository and imaging engine to hook into our application. Our application is written in BASIC (stop snickering) using IBM's UniData database. At this point, we can only use raw XML to SOAP clients. JAVA or scripts would not be an option although IBM is working on this for a future programming releases. I have written raw XML to access against another product's WSDL and was able to log in, get document counts, etc. So, I am hoping someone can tell me what I am doing wrong and why I keep getting the WSDL returned instead of a session string or ID.
Do I need to make modifications to the WSDL and change all reference to the namespace to my machine? For instance, in the binding section:
   <wsdl:binding name="AuthenticationServiceSoapBinding" type="auth:AuthenticationServiceSoapPort">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http'/>
      <wsdl:operation name="startSession">
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authentication/1.0/startSession'/>
Do I need to change the soapAction from http://www.alfresco.org to http://localhost:8080? If so, where do I find the ws/ directory? I looked in the installation directory but did not find it or service or authentication in subdirectories under Alfresco or Tomcat. I know where .properties, .classes, etc. are located.

The application is up and running on the server and I can create spaces, users, documents, etc.

Thanks in advance!

XML Code:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <startSession xmlns=HTTP://localhost:8080/alfresco/wsdl/authentication-service.wsdl>
<username>admin</username>
<password>admin</password>
    </startSession>
  </env:Body>
</env:Envelope>

The result:
Date: Thu, 17 Apr 2008 20:46:30 GMT
04/17/2008 15:46:30 [ 5232  176 ] Response message body(may be partial) length: 5899
04/17/2008 15:46:30 [ 5232  176 ] Response message body:
<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="authentication-service"
   targetNamespace="http://www.alfresco.org/ws/service/authentication/1.0"
   xmlns:apachesoap="http://xml.apache.org/xml-soap"
   xmlns:auth="http://www.alfresco.org/ws/service/authentication/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">
   <!– ************************************** –>
   <!– Copyright Alfresco Software, Inc. 2005 –>
   <!– ************************************** –>
   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/authentication/1.0" xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="startSession">
            <complexType>
               <sequence>
                  <element name="username" type="xsd:string"/>
                  <element name="password" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="startSessionResponse">
            <complexType>
               <sequence>
                  <element name="startSessionReturn" type="auth:AuthenticationResult"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="endSession">
            <complexType>
               <sequence>
                  <element name="ticket" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="endSessionResponse">
            <complexType>
               <sequence/>
            </complexType>
         </element>
        
         <complexType name="AuthenticationResult">
            <sequence>
               <element name="username" nillable="false" type="xsd:string"/>
               <element name="ticket" nillable="false" type="xsd:string"/>
               <element name="sessionid" nillable="true" type="xsd:string"/>
            </sequence>
         </complexType>
         <element name="AuthenticationResult" type="auth:AuthenticationResult"/>
        
         <complexType name="AuthenticationFault">
            <sequence>
               <element name="errorCode" type="xsd:int"/>
               <element name="message" type="xsd:string"/>
            </sequence>
         </complexType>
         <element name="AuthenticationFault" type="auth:AuthenticationFault"/>
        
      </schema>
   </wsdl:types>

   <wsdl:message name="startSessionRequest">
      <wsdlSmiley Tongueart element="auth:startSession" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="startSessionResponse">
      <wsdlSmiley Tongueart element="auth:startSessionResponse" name="parameters"/>
   </wsdl:message>
  
   <wsdl:message name="endSessionRequest">
      <wsdlSmiley Tongueart element="auth:endSession" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="endSessionResponse">
      <wsdlSmiley Tongueart element="auth:endSessionResponse" name="parameters"/>
   </wsdl:message>
  
   <wsdl:message name="AuthenticationFault">
      <wsdlSmiley Tongueart element="auth:AuthenticationFault" name="fault"/>
   </wsdl:message>
  
   <wsdlSmiley TongueortType name="AuthenticationServiceSoapPort">
      <wsdlSmiley Surprisedperation name="startSession">
         <wsdl:input message="auth:startSessionRequest" name="startSessionRequest"/>
         <wsdlSmiley Surprisedutput message="auth:startSessionResponse" name="startSessionResponse"/>
         <wsdl:fault message="auth:AuthenticationFault" name="AuthenticationFault"/>
      </wsdlSmiley Surprisedperation>
      <wsdlSmiley Surprisedperation name="endSession">
         <wsdl:input message="auth:endSessionRequest" name="endSessionRequest"/>
         <wsdlSmiley Surprisedutput message="auth:endSessionResponse" name="endSessionResponse"/>
         <wsdl:fault message="auth:AuthenticationFault" name="AuthenticationFault"/>
      </wsdlSmiley Surprisedperation>
   </wsdlSmiley TongueortType>
  
   <wsdl:binding name="AuthenticationServiceSoapBinding" type="auth:AuthenticationServiceSoapPort">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http'/>
      <wsdlSmiley Surprisedperation name="startSession">
         <wsdlsoapSmiley Surprisedperation soapAction="http://www.alfresco.org/ws/service/authentication/1.0/startSession'/>
         <wsdl:input name="startSessionRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdlSmiley Surprisedutput name="startSessionResponse">
            <wsdlsoap:body use="literal"/>
         </wsdlSmiley Surprisedutput>
         <wsdl:fault name="AuthenticationFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authentication/1.0" use="literal" name="AuthenticationFault"/>
         </wsdl:fault>
      </wsdlSmiley Surprisedperation>
      <wsdlSmiley Surprisedperation name="endSession">
         <wsdlsoapSmiley Surprisedperation soapAction="http://www.alfresco.org/ws/service/authentication/1.0/endSession'/>
         <wsdl:input name="endSessionRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdlSmiley Surprisedutput name="endSessionResponse">
            <wsdlsoap:body use="literal"/>
         </wsdlSmiley Surprisedutput>
         <wsdl:fault name="AuthenticationFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authentication/1.0" use="literal" name="AuthenticationFault"/>
         </wsdl:fault>
      </wsdlSmiley Surprisedperation>
   </wsdl:binding>

   <wsdl:service name="AuthenticationService">
      <wsdl:documentation>Provides simple authentication capability.</wsdl:documentation>
      <wsdlSmiley Tongueort binding="auth:AuthenticationServiceSoapBinding" name="AuthenticationService">
         <wsdlsoap:address location="http://localhost:8080/alfresco/api/AuthenticationService'/>
      </wsdlSmiley Tongueort>
   </wsdl:service>
  
</wsdl:definitions>

04/17/2008 15:46:30 [ 5232  176 ] next field = Server:
04/17/2008 15:46:30 [ 5232  176 ] next field = Apache-Coyote/1.1
04/17/2008 15:46:30 [ 5232  176 ] next field = ETag:
04/17/2008 15:46:30 [ 5232  176 ] next field = W/"5899-1185214242000"
04/17/2008 15:46:30 [ 5232  176 ] next field = Last-Modified:
04/17/2008 15:46:30 [ 5232  176 ] next field = Mon,
04/17/2008 15:46:30 [ 5232  176 ] next field = 23
04/17/2008 15:46:30 [ 5232  176 ] next field = Jul
04/17/2008 15:46:30 [ 5232  176 ] next field = 2007
04/17/2008 15:46:30 [ 5232  176 ] next field = 18:10:42
04/17/2008 15:46:30 [ 5232  176 ] next field = GMT
04/17/2008 15:46:30 [ 5232  176 ] next field = Content-Length:
04/17/2008 15:46:30 [ 5232  176 ] next field = 5899
04/17/2008 15:46:30 [ 5232  176 ] next field = Date:
04/17/2008 15:46:30 [ 5232  176 ] next field = Thu,
04/17/2008 15:46:30 [ 5232  176 ] next field = 17
04/17/2008 15:46:30 [ 5232  176 ] next field = Apr
04/17/2008 15:46:30 [ 5232  176 ] next field = 2008
04/17/2008 15:46:30 [ 5232  176 ] next field = 20:46:30
04/17/2008 15:46:30 [ 5232  176 ] next field = GMT
04/17/2008 15:46:30 [ 5232  176 ] HTTP_MOREDATA
04/17/2008 15:46:30 [ 5232  176 ] HTTP_FINISH
2 REPLIES 2

dbridges
Champ in-the-making
Champ in-the-making
bump.
I am still looking for information on how to use XML in my application to interface with Alfresco. *grovel*

peterwilson
Champ in-the-making
Champ in-the-making
I too am having problems, but have found this some use:

http://www.nabble.com/Integrating-with-Alfresco-ECM-td17585606.html

Peter