User`s guide

IBM Lotus Notes, Domino, Domino Designer 8 Release Notes
Domino Designer, Domino Server
Web Service <any> element mappings - Java and LotusScript
Domino Designer 8 includes mapping support for the XML Schema
<any>
element, both during WSDL
import to a Web service provider or consumer script library, and during WSDL generation from a Web
service provider implementation.
Java
For Java Web service providers and Web service consumer script libraries, importing WSDL 1.1
documents containing XML Schema <any> elements (including wrapped service operation input or return
types) will generate those elements as javax.xml.soap.SOAPElement interface types. Alternatively,
javax.xml.soap.SOAPElement members of Java value type classes generate to WSDL as <any>
elements within sequence elements of some complexType, as will SOAPElement input or return types for
wrapped Java service operations.
javax.xml.soap.SOAPElement
objects can be instantiated in a Domino 8 Web service through the
use of the java.xml.soap.SOAPFactory class. Supported SOAPElement operations are those which
are specified for the javax.xml.soap.SOAPElement interface and its related interfaces in the
javax.xml.soap package. The following example illustrates how one might instantiate, populate, and
return a SOAPElement object in a Domino 8 Java Web service:
import javax.xml.soap.*;
public class PortType {
public SOAPElement getAny() {
try {
SOAPFactory SF = SOAPFactory.newInstance();
"theNamespace" );
SOAPElement SE = SF.createElement( "anyPart", "ns",
Name nam = SF.createName( "xsi:type", "xsi", "
http://www.w3.org/2001/XMLSchema-instance" );
SE.addAttribute ( nam, "xsd:string" );
SE.addTextNode( "The quick brown fox" );
return SE;
} catch (SOAPException se) {
}
return null;
se.printStackTrace();
}
}
LotusScript
For LotusScript Web service providers and Web service consumer script libraries, importing WSDL 1.1.
documents containing XML Schema <any> elements (including wrapped service operation input or return
types) will generate those elements as NotesDOMElementNode backend class instances. Alternatively,
NotesDOMElementNode members of LotusScript value type classes will generate to WSDL as <any>
elements within sequence elements of some complexType, as will NotesDOMElementNode input or
return types for wrapped LotusScript service operations.
NotesDOMElementNode objects can be instantiated in a Domino 8 Web service by using the documented
API's for the NotesDOMElementNode and related backend classes.
WSDL
Generated WSDL
<any>
elements include the namespace attribute value of "##other", defined by XML
Schema to indicate "not the targetNamespace for the ancestor <schema> element". This prevents invalid
overlap between namespaces for generated <any> elements and the default namespace for possible
adjacent elements within a complexType, and lessens the need for WSDL fixups and reimporting.
175