Skip to content

Commit addafd1

Browse files
committed
Updated wsdl to work with 7.12.3, updated test failure messages with error messages coming from the operation.
1 parent 813d8f8 commit addafd1

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

src/java/com/cms/webservices/TestEdit.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@ public void testPageTitleEdit() throws Exception
4141
Path path = new Path();
4242

4343
// set your page path and site name
44-
path.setPath("/test-block-overrides");
45-
path.setSiteName("bradley");
44+
path.setPath("/about");
45+
path.setSiteName("example.com");
4646
toRead.setPath(path);
4747
toRead.setType(EntityTypeString.page);
4848

4949
Read read = new Read();
5050
read.setIdentifier(toRead);
5151

5252
Authentication authentication = new Authentication();
53-
authentication.setUsername("bradley.wagner");
54-
authentication.setPassword("soosad");
53+
authentication.setUsername("admin");
54+
authentication.setPassword("admin");
5555

5656
// read the asset
5757
AssetOperationHandlerServiceLocator serviceLocator = new AssetOperationHandlerServiceLocator();
5858
AssetOperationHandler handler = serviceLocator.getAssetOperationService();
5959
ReadResult result = handler.read(authentication, toRead);
60-
assertTrue("Read was not successful", result.getSuccess().equals("true") ? true : false);
60+
assertTrue("Read was not successful: " + result.getMessage(), result.getSuccess().equals("true") ? true : false);
6161

6262
// edit the title
6363
Asset readAsset = result.getAsset();
6464
Page page = readAsset.getPage();
6565
page.getMetadata().setTitle("new title");
6666

6767
OperationResult editResult = handler.edit(authentication, readAsset);
68-
assertTrue("Edit was not successful", editResult.getSuccess().equals("true") ? true : false);
68+
assertTrue("Edit was not successful: " + result.getMessage(), editResult.getSuccess().equals("true") ? true : false);
6969

7070
// re-read to verify title change
7171
result = handler.read(authentication, toRead);
72-
assertTrue("Read was not successful", result.getSuccess().equals("true") ? true : false);
72+
assertTrue("Read was not successful: " + result.getMessage(), result.getSuccess().equals("true") ? true : false);
7373
assertEquals("Title was not changed", "new title", result.getAsset().getPage().getMetadata().getTitle());
7474
}
7575
}

src/java/com/cms/webservices/TestRead.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@
2727
public class TestRead
2828
{
2929
/**
30+
* <p>
3031
* Tests reading of the Base Folder in a given Site
32+
* </p>
3133
*
34+
* <p>
3235
* From inside Eclipse, run this test using:
36+
* </p>
3337
*
34-
* - alt+shift+x, t (Windows)
35-
* - option+command+x, t (Mac)
38+
* <ul>
39+
* <li>alt+shift+x, t (Windows)</li>
40+
* <li>option+command+x, t (Mac)</li>
41+
* </ul>
3642
*
3743
* @throws Exception
3844
*/
@@ -42,21 +48,21 @@ public void testBaseFolderRead() throws Exception
4248
Identifier toRead = new Identifier();
4349
Path path = new Path();
4450
path.setPath("/");
45-
path.setSiteName("bradley");
51+
path.setSiteName("example.com");
4652
toRead.setPath(path);
4753
toRead.setType(EntityTypeString.folder);
4854

4955
Read read = new Read();
5056
read.setIdentifier(toRead);
5157

5258
Authentication authentication = new Authentication();
53-
authentication.setUsername("bradley.wagner");
54-
authentication.setPassword("soosad");
59+
authentication.setUsername("admin");
60+
authentication.setPassword("admin");
5561

5662
AssetOperationHandlerServiceLocator serviceLocator = new AssetOperationHandlerServiceLocator();
5763
AssetOperationHandler handler = serviceLocator.getAssetOperationService();
5864
ReadResult result = handler.read(authentication, toRead);
5965

60-
assertTrue(result.getSuccess().equals("true") ? true : false);
66+
assertTrue("Error message: " + result.getMessage(), result.getSuccess().equals("true") ? true : false);
6167
}
6268
}

src/java/wsdl/asset-operation.wsdl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3283,6 +3283,10 @@
32833283

32843284
<element maxOccurs="1" minOccurs="1" name="linkCheckerEnabled" type="xsd:boolean"/>
32853285

3286+
<!-- REQUIRED Check external links when publishing assets in this site -->
3287+
3288+
<element maxOccurs="1" minOccurs="1" name="externalLinkCheckOnPublish" type="xsd:boolean"/>
3289+
32863290
<!-- The root folder id and containers idds - used only when reading a site. Unused in other cases
32873291
NOT REQUIRED ignored -->
32883292

@@ -7801,4 +7805,4 @@
78017805

78027806
</wsdl:service>
78037807

7804-
</wsdl:definitions>
7808+
</wsdl:definitions>

0 commit comments

Comments
 (0)