Building Mobile Enterprise Applications : webMethods Mobile Development Help : Adding Services to a Mobile Project : Adding Web Services
Adding Web Services
If you want to generate Java classes based on a specific WSDL file, you have to import this WSDL file into your Mobile Project. After the import, you can find the WSDL file in the wsdl subfolder of your Mobile Project.
To generate the Java classes, use Generate Source Code > Application Model and API. The Java classes will be placed in the gen/api-src/com.softwareag.mobile.runtime.toolkit.ws/wsdlFileName folder.
Several XSD elements and data types are not supported by Mobile Development. These are:
*Unsupported elements:
*<xsd:simpleContent>
*<xsd:union>
*<xsd:complexType> variable elements are assumed to be in <sequence>, even if they are not.
*<port> as a child of <definitions>
*<extension> as a child of <xsd:complexContent>
*Unsupported data types:
*base64Binary (byte[]) - use string type instead
*integer (java.math.BigInteger) - use int, long or string decimal instead
*(java.math.BigDecimal) - use string instead (float and double would lose precision on financial data, but you might consider them acceptable in other use cases)
*dateTime (java.util.Calendar) - use string date instead
*(java.util.Date) - use string instead
*map
*All classes defined in com.ibm.ws.webservices.*
In addition, keep in mind the following when working with web services:
*Mandatory variables for objects are not featured in their constructors at this time.
*simpleType restrictions are parsed, but no code is output to enforce them.
*All setups are currently assumed to be SOAP 1.1 compliant.
To add a web service
1. Ensure the Mobile Project is open in the Outline Editor. For instructions, see Displaying a Mobile Project in the Outline Editor.
2. In the Model section of the Outline Editor, expand the project so that you view the Services container node.
If the model does not have a Services container node, add one by right-clicking the root application and selecting New Child > Services.
3. Drag the WebService object from the palette of the Outline Editor to the Services node. In the palette, you can find this object when clicking the header-type node Web Services.
Alternatively, select File > Import > Other > Import WSDL File and click Next.
4. In the WSDL File Import dialog box, click Browse and select the WSDL file that you want to import.
5. Click Finish.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback