cancel
Showing results for 
Search instead for 
Did you mean: 

soapUI:how to fill <ns:extension> element

_valerio_
Champ in-the-making
Champ in-the-making
hi everybody
using soapUI to test the webservices exposed by alfresco on http://localhost:8080/alfresco/cmis I met some difficulties to fill some field of the soap envelope; as example, in the method getProperties exposed by ObjectServicePort I don't know to fill the <ns:extension> element

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getProperties>
         <ns:repositoryId>I know how to fill this field</ns:repositoryId>
         <ns:objectId>I know how to fill this field</ns:objectId>
         <ns:filter>?</ns:filter>
         <ns:extension>
            <!–You may enter ANY elements at this point–>
         </ns:extension>
      </ns:getProperties>
   </soapenv:Body>
</soapenv:Envelope>
having a look at the wisdl definition of <ns:extension> I found this:

<xs:element name="getProperties">
   <xs:complexType>
       <xs:sequence>
         <xs:element name="repositoryId" type="xs:string"/>
         <xs:element name="objectId" type="xs:string"/>
         <xs:element name="filter" type="xs:string"/>
     <xs:element name="extension" type="tns:cmisExtensionType"/>
       </xs:sequence>
   </xs:complexType>
</xs:element>

but I'm not able to understand what kind of type is tns:cmisExtensionType and how to fill the <ns:extension> element

thanks in advance
3 REPLIES 3

rameshbelli
Champ in-the-making
Champ in-the-making
Hi Valerio,

//Axis2 stubs created with XmlBeans binding


CreateDocumentDocument1 createDocumentDoc =  CreateDocumentDocument1.Factory.newInstance();
CreateDocumentDocument1.CreateDocument createDoc = createDocumentDoc.addNewCreateDocument();

createDoc.setFolderId(yourFolderId);
createDoc.setRepositoryId(yourrepositoryId);

CmisExtensionType extType = createDoc.addNewExtension();

XmlObject xmlObj = XmlObject.Factory.parse(doc.getDocumentElement()); //doc is org.w3c.dom.Document
extType.set(xmlObj);


I was able to set an XML document in the <extension> this way.

Hope this helps,

Ramesh

_valerio_
Champ in-the-making
Champ in-the-making
Thanks RameshBelli for your reply,I really appreciate that, but it is not what I'm looking for.
I'd like to test  CMIS Web Services API of Alfresco through soapUI and I'd like to know how to fill the  <ns:extension> element in the soap envelope; this is because I'd like to invoke the CMIS Web Services of Alfresco server from an external webservice client.

_valerio_
Champ in-the-making
Champ in-the-making
I found the answer on http://docs.oasis-open.org/cmis/CMIS/v1.0/cd06/cmis-spec-v1.0.html#_Toc243905616
4.3.3 Extensions

On all input messages and some output messages exists an element called extension. This element is used to provide vendor or repository-specific information between client and server.

All of the types referenced by the schema also support xs:any for vendor or repository-specific information.

Hope this will help other people with the same issue

Best regards
Valerio Smiley Very Happy