
1125
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
$element7 = new Element();
$elementArray2 = new ArrayOf_xsd_anyType();
$element5->key = 'thickness';$element5->value = '30';
$element6->key = 'color';
$element6->value = 'green';
$element7->key = 'bordertype';
$element7->value = '';
$elementArray2->item[0] = $element5;
$elementArray2->item[1] = $element6;
$elementArray2->item[2] = $element7;
$ElementcollectionAddBorder = new Elementcollection();
$ElementcollectionAddBorder->key = 'AddBorder';
$ElementcollectionAddBorder->value = $elementArray2;
$input->serviceusername = "myuser";
$input->servicepassword = "mypassword";
$input->source = "http:/<php server>:<port>/image.jpg";
$input->attributes =
array($ElementcollectionCrop,$ElementcollectionAddBorder);
// call the operation
$response = $proxy->batchOperation($input);
Access a ColdFusion service from .NET
Create a new Web service project in Visual Studio and add ColdFusion WSDL as a web reference to the project. Then
add a new item such a web form.
Example: Creating a PDF using .NET
Following is the sample .NET code for creating a PDF from the web site www.google.com.
Document.DocumentService objWebService = new
Document.DocumentService();
Document.Documentsection[] docsectionArray = { };
Document.Documentitem[] docitemArray = { };
string result = objWebService.generate("myuser", "mypassword", "pdf",
"", "", "", "", "yes", "", "", "", "", "","", "", "", "", "", "", "", "", "",
"", "", "", "http://www.google.com/", "", "", "", "", docsectionArray,
docitemArray);
In this code snippet:
Document is the web reference for document WSDL.
generate() is the method to generate the PDF from the HTML source.
Integrating J2EE and Java Elements in CFML
Applications
You can integrate J2EE elements, including JSP pages and servlets; JSP tags; and Java objects, including Enterprise
JavaBeans (EJBs); into your Adobe ColdFusion application.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...