mirror of https://github.com/apache/cloudstack.git
Merging awsapi component to master
This commit is contained in:
parent
9aaaab0ebe
commit
bc7dbd7d96
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/antlr-2.7.6.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/apache-log4j-extras-1.0.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axiom-api-1.2.8.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axiom-impl-1.2.8.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-adb-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-ant-plugin-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-jaxbri-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-jaxws-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-jibx-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-json-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-kernel-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-transport-http-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/axis2-transport-local-1.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/cloud-gson.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-codec-1.4.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-collections-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-fileupload-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-httpclient-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-io-1.4.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/commons-logging-1.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/dom4j-1.6.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/hibernate3.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/httpcore-4.0.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/javassist-3.9.0.GA.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/jaxb-api-2.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/jaxb-impl-2.1.7.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/jaxb-xjc-2.1.7.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/jsch-0.1.42.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/json_simple-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/jta-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/junit-4.8.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/log4j-1.2.15.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/mail-1.4.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/mysql-connector-java-5.1.7-bin.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/neethi-2.0.4.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/slf4j-api-1.5.11.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/slf4j-jdk14-1.5.11.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/woden-api-1.0M8.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/woden-impl-dom-1.0M8.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/xercesImpl.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/xml-apis.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/XmlSchema-1.4.3.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/bcprov-jdk16-145.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/commons-collections-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/joda-time-1.5.2.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/opensaml-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/opensaml-2.2.3.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/openws-1.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/rampart-core-1.5.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/rampart-policy-1.5.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/rampart-trust-1.5.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/slf4j-api-1.5.11.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/slf4j-jdk14-1.5.11.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/velocity-1.5.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/wss4j-1.5.8.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/xmlsec-1.4.2.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/awsapi-lib/rampart-lib/xmltooling-1.2.0.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/john1/qgit/deps/cloudbridge-lib/servlet-api.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>awsapi</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
</pydev_project>
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
=========================================================================
|
||||
== NOTICE file corresponding to the section 4 d of ==
|
||||
== the Apache License, Version 2.0, ==
|
||||
== in this case for the Apache Axis2 distribution. ==
|
||||
=========================================================================
|
||||
|
||||
This product includes software developed by
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
Portions Copyright 2006 International Business Machines Corp.
|
||||
Portions Copyright 2005-2007 WSO2, Inc.
|
||||
|
||||
This product also includes schemas and specification developed by:
|
||||
- the W3C consortium (http://www.w3c.org)
|
||||
|
||||
This product also includes WS-* schemas developed by International
|
||||
Business Machines Corporation, Microsoft Corporation, BEA Systems,
|
||||
TIBCO Software, SAP AG, Sonic Software, and VeriSign
|
||||
|
||||
This product also includes a WSDL developed by salesforce.com
|
||||
- Copyright 1999-2006 salesforce.com, inc.
|
||||
|
||||
Portions of the included xmlbeans library were originally based on the following:
|
||||
- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
|
||||
|
||||
Please read the different LICENSE files present in the lib directory of
|
||||
this distribution.
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
======================================================
|
||||
Apache Axis2 1.6.2 build (17-04-2012)
|
||||
|
||||
http://axis.apache.org/axis2/java/core/
|
||||
------------------------------------------------------
|
||||
|
||||
___________________
|
||||
Building
|
||||
===================
|
||||
|
||||
We use Maven 2 (http://maven.apache.org) to build, and you'll find a
|
||||
pom.xml in each module, as well as at the top level. Use "mvn install"
|
||||
(or "mvn clean install" to clean up first) to build.
|
||||
|
||||
IMPORTANT: the *first* time you build a given version of Axis2, you will not
|
||||
be able to do a regular "mvn install" from the top level - this is because
|
||||
we have a couple of custom Maven plugins that (due to some dependency-
|
||||
resolution issues in Maven) must be built and installed in your local
|
||||
repository before a build will succeed. This means you need to do one
|
||||
of the following:
|
||||
|
||||
1) Use ant (http://ant.apache.org) to build the first time. There is
|
||||
a build.xml at the top level which automatically builds the plugins
|
||||
first and then runs a regular "mvn install".
|
||||
|
||||
2) Manually "mvn install" both of the plugins in the following places:
|
||||
|
||||
modules/tool/axis2-mar-maven-plugin
|
||||
modules/tool/axis2-aar-maven-plugin
|
||||
|
||||
___________________
|
||||
Documentation
|
||||
===================
|
||||
|
||||
Documentation can be found in the 'docs' distribution of this release
|
||||
and in the main site.
|
||||
|
||||
___________________
|
||||
Deploying
|
||||
===================
|
||||
|
||||
To deploy a new Web service in Axis2 the following three steps must
|
||||
be performed:
|
||||
1) Create the Web service implementation class, supporting classes
|
||||
and the services.xml file,
|
||||
2) Archive the class files into a jar with the services.xml file in
|
||||
the META-INF directory
|
||||
3) Drop the jar file to the $AXIS2_HOME/WEB-INF/services directory
|
||||
where $AXIS2_HOME represents the install directory of your Axis2
|
||||
runtime. (In the case of a servelet container this would be the
|
||||
"axis2" directory inside "webapps".)
|
||||
|
||||
To verify the deployment please go to http://<yourip>:<port>/axis2/ and
|
||||
follow the "Services" Link.
|
||||
|
||||
For more information please refer to the User's Guide.
|
||||
|
||||
___________________
|
||||
Support
|
||||
===================
|
||||
|
||||
Any problem with this release can be reported to Axis mailing list
|
||||
or in the JIRA issue tracker. If you are sending an email to the mailing
|
||||
list make sure to add the [Axis2] prefix to the subject.
|
||||
|
||||
Mailing list subscription:
|
||||
java-dev-subscribe@axis.apache.org
|
||||
|
||||
Jira:
|
||||
http://issues.apache.org/jira/browse/AXIS2
|
||||
|
||||
|
||||
Thank you for using Axis2!
|
||||
|
||||
The Axis2 Team.
|
||||
Binary file not shown.
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
<session-factory>
|
||||
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
|
||||
<property name="hibernate.connection.pool_size">20</property>
|
||||
<property name="hibernate.connection.autocommit">false</property>
|
||||
|
||||
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
|
||||
|
||||
<property name="hibernate.c3p0.min_size">5</property>
|
||||
<property name="hibernate.c3p0.max_size">50</property>
|
||||
<property name="hibernate.c3p0.timeout">7200</property>
|
||||
<property name="hibernate.c3p0.max_statements">50</property>
|
||||
<!-- This property forces the revalidation of a connection after the given amount of time (in secs) -->
|
||||
<!-- it must be set to LESS than the wait_timout setting for the mysql server (this setting defaults to 28800 secs (8 hours)) -->
|
||||
|
||||
<property name="hibernate.c3p0.idle_test_period">5400</property>
|
||||
|
||||
|
||||
<!-- transactiion isolation level : 1 - read uncommitted, 2 - read committed, 4 - repeatable read, 8 - Serializable -->
|
||||
<property name="hibernate.connection.isolation">2</property>
|
||||
|
||||
<property name="hibernate.order_updates">true</property>
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
|
||||
<property name="show_sql">false</property>
|
||||
<!-- to debug hibernate generated SQL, open following configuration property -->
|
||||
<!--
|
||||
<property name="show_sql">true</property>
|
||||
<property name="hibernate.format_sql">true</property>
|
||||
-->
|
||||
|
||||
<!-- Mapping files -->
|
||||
<mapping resource="com/cloud/stack/models/CloudStackConfiguration.hbm.xml"/>
|
||||
<mapping resource="com/cloud/stack/models/CloudStackServiceOffering.hbm.xml"/>
|
||||
<mapping resource="com/cloud/stack/models/CloudStackAccount.hbm.xml"/>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
host=http://localhost:8080/awsapi
|
||||
storage.root=/Users/john1/S3-Mount
|
||||
storage.multipartDir=__multipart__uploads__
|
||||
bucket.dns=false
|
||||
serviceEndpoint=localhost:8080
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
managementServer=127.0.0.1
|
||||
cloudAPIPort=7080
|
||||
cloudstackVersion=2.2.0
|
||||
WSDLVersion=2010-11-15
|
||||
keystore=xes.keystore
|
||||
keystorePass=apache
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
<session-factory>
|
||||
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
|
||||
<property name="hibernate.connection.pool_size">20</property>
|
||||
<property name="hibernate.connection.autocommit">false</property>
|
||||
|
||||
<!-- transactiion isolation level : 1 - read uncommitted, 2 - read committed, 4 - repeatable read, 8 - Serializable -->
|
||||
<property name="hibernate.connection.isolation">2</property>
|
||||
|
||||
<property name="hibernate.order_updates">true</property>
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
|
||||
<property name="show_sql">false</property>
|
||||
<!-- to debug hibernate generated SQL, open following configuration property -->
|
||||
<!--
|
||||
<property name="show_sql">true</property>
|
||||
<property name="hibernate.format_sql">true</property>
|
||||
-->
|
||||
<!-- Mapping files -->
|
||||
<mapping resource="com/cloud/bridge/model/UserCredentials.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SHost.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/MHost.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/MHostMount.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SBucket.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SObject.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SObjectItem.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SMeta.hbm.xml"/>
|
||||
<mapping resource="com/cloud/bridge/model/SAcl.hbm.xml"/>
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
#!/usr/bin/env bash
|
||||
# deploy.sh -- deploys a cloud-bridge
|
||||
#
|
||||
|
||||
usage() {
|
||||
printf "Usage: %s: -d [tomcat directory to deploy to] -z [zip file to use]\n" $(basename $0) >&2
|
||||
}
|
||||
|
||||
dflag=
|
||||
zflag=
|
||||
tflag=
|
||||
iflag=
|
||||
|
||||
deploydir=
|
||||
typ=
|
||||
|
||||
#set -x
|
||||
|
||||
while getopts 'd:z:x:h:' OPTION
|
||||
do
|
||||
case "$OPTION" in
|
||||
d) dflag=1
|
||||
deploydir="$OPTARG"
|
||||
;;
|
||||
z) zflag=1
|
||||
zipfile="$OPTARG"
|
||||
;;
|
||||
h) iflag="$OPTARG"
|
||||
;;
|
||||
?) usage
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$deploydir" == "" ]
|
||||
then
|
||||
if [ "$CATALINA_HOME" == "" ]
|
||||
then
|
||||
printf "Tomcat Directory to deploy to: "
|
||||
read deploydir
|
||||
else
|
||||
deploydir="$CATALINA_HOME"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$deploydir" == "" ]
|
||||
then
|
||||
printf "Tomcat directory was not specified, please set CATALINA_HOME environment variable'\n";
|
||||
exit 15;
|
||||
fi
|
||||
|
||||
printf "Check to see if the Tomcat directory exist: $deploydir\n"
|
||||
if [ ! -d $deploydir ]
|
||||
then
|
||||
printf "Tomcat directory does not exist\n";
|
||||
exit 16;
|
||||
fi
|
||||
|
||||
rm -rf $deploydir/webapps/bridge
|
||||
mkdir "$CATALINA_HOME/temp"
|
||||
mkdir "$CATALINA_HOME/webapps/bridge"
|
||||
|
||||
|
||||
if ! unzip -o ./axis2.war -d $deploydir/webapps/bridge
|
||||
then
|
||||
exit 10;
|
||||
fi
|
||||
|
||||
if ! cp -f services/* $deploydir/webapps/bridge/WEB-INF/services
|
||||
then
|
||||
exit 11;
|
||||
fi
|
||||
|
||||
if ! cp -f modules/* $deploydir/webapps/bridge/WEB-INF/modules
|
||||
then
|
||||
exit 12;
|
||||
fi
|
||||
|
||||
if ! cp -f rampart-lib/* $deploydir/webapps/bridge/WEB-INF/lib
|
||||
then
|
||||
exit 13;
|
||||
fi
|
||||
|
||||
if ! cp -f cloud-bridge.jar $deploydir/webapps/bridge/WEB-INF/lib
|
||||
then
|
||||
exit 14;
|
||||
fi
|
||||
|
||||
if ! cp -f lib/* $deploydir/lib
|
||||
then
|
||||
exit 17;
|
||||
fi
|
||||
|
||||
if ! cp -n conf/* $deploydir/conf
|
||||
then
|
||||
exit 18;
|
||||
fi
|
||||
|
||||
if ! cp -f classes/* $deploydir/webapps/bridge/WEB-INF/classes
|
||||
then
|
||||
exit 19;
|
||||
fi
|
||||
|
||||
if ! cp -f web.xml $deploydir/webapps/bridge/WEB-INF
|
||||
then
|
||||
exit 20;
|
||||
fi
|
||||
|
||||
if ! cp -f axis2.xml $deploydir/webapps/bridge/WEB-INF/conf
|
||||
then
|
||||
exit 21;
|
||||
fi
|
||||
|
||||
if ! rm -rf $deploydir/webapps/bridge/WEB-INF/lib/dom4j-1.6.1.jar
|
||||
then
|
||||
exit 22;
|
||||
fi
|
||||
|
||||
|
||||
printf "Installation is now complete\n"
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
1. Get the EC2 API tool
|
||||
http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip. Install it by unzipping it
|
||||
|
||||
2. Prepare a API request certificate, if you have Amazon account, Amazon has the service to let you generate and download a X509 certificate and its associated private key
|
||||
|
||||
3. Prepare EC2 command running environment
|
||||
|
||||
Set following environment variables and make them point to the right location.
|
||||
|
||||
EC2_ACCESS_KEY=<CloudStack API key>
|
||||
EC2_SECRET_KEY=<CloudStack Secret key>
|
||||
EC2_HOME: <full path to your EC2 API tool installation directory>
|
||||
EC2_CERT: <full path to your certficate file>
|
||||
EC2_PRIVATE_KEY: <full path to your private key file for the certficate>
|
||||
EC2_URL: http://<CloudBridge server address>/bridge/AmazonEC2
|
||||
|
||||
4. Generate CloudStack API key
|
||||
Login to CloudStack management console, you can generate an API key and its secret key pair there.
|
||||
|
||||
5. Inform CloudBridge about the API/security key pair to use
|
||||
|
||||
http://<CloudBridge server address>/bridge/rest/AmazonEC2?Action=SetUserKeys&accesskey=<key>&secretkey=<key>
|
||||
|
||||
6. Upload certificate and associate it with the API key
|
||||
There is not a convenient tool to do that, this has to be done in manual step. following HTML form can be used to submit the certificate, be sure to replace the content
|
||||
matching with your setup though.
|
||||
to ec2-service.properties
|
||||
|
||||
<HTML>
|
||||
<BODY>
|
||||
Save the cert into Cloud's EC2 Service:
|
||||
<P>
|
||||
<FORM name="setcert" action="http://<CloudBridge server address>/bridge/rest/AmazonEC2" method="get">
|
||||
<input type="hidden" name="Action" value="SetCertificate"/>
|
||||
<input type="hidden" name="AWSAccessKeyId" value="<your API key>" />
|
||||
<input type="hidden" name="SignatureMethod" value="HmacSHA1" />
|
||||
<input type="hidden" name="SignatureVersion" value="2" />
|
||||
<input type="hidden" name="Expires" value="2010-11-15T10:10:10Z" />
|
||||
<input type="hidden" name="Timestamp" value="2011-11-15T10:10:10Z" />
|
||||
<input type="hidden" name="Version" value="2010-08-31" />
|
||||
<input type="hidden" name="Signature" value="7KUYxW5YOpUZyZGCP49BudZraGU=" />
|
||||
<TEXTAREA name="cert" cols=100 rows=20></TEXTAREA>
|
||||
<P>
|
||||
<input type="submit" value="Submit" />
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Cloud.com's EC2 API Implementation Guide</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Cloud.com's EC2 API Implementation Guide</H1>
|
||||
3/24/2011
|
||||
<H2>Table of Contents</H2>
|
||||
<UL>
|
||||
<LI><A href="#conf">1. Configuration Parameters</A></LI>
|
||||
<LI><A href="#party">2. Required 3rd Party Software</A></LI>
|
||||
<LI><A href="#maintenace">3. Maintenance</A></LI>
|
||||
<LI><A href="#install">4. Installation Instructions</A></LI>
|
||||
<LI><A href="#refs">5. References</A></LI>
|
||||
</UL>
|
||||
<P>
|
||||
<H2 id="conf">1. Configuration Parameters</H2>
|
||||
Several configuration parameters are required to make Cloud.com's EC2 service work properly.
|
||||
The following parameters are defined in the file:</BR> <install directory>"/apache-tomcat-6.0.18/conf/ec2-service.properties":
|
||||
<pre>
|
||||
managementServer=192.168.154.36
|
||||
cloudAPIPort=8080
|
||||
WSDLVersion=2010-08-31
|
||||
keystore=xes.keystore
|
||||
keystorePass=apache
|
||||
dbName=cloudsbridge
|
||||
dbUser=root
|
||||
dbPassword=
|
||||
pollInterval1=100
|
||||
pollInterval2=100
|
||||
pollInterval3=100
|
||||
pollInterval4=1000
|
||||
pollInterval5=100
|
||||
pollInterval6=100
|
||||
</pre>
|
||||
<I>managementServer</I> - FQDN or IP address of a Cloud.com management server. This is the address that
|
||||
the EC2 service makes Cloud.com REST API calls against.</BR>
|
||||
<I>cloudAPIPort</I> - The TCP port that the CloudStack, User API is running on. If this property is not defined,
|
||||
then no port is used by the EC2 service when it queries the CloudStack.</BR>
|
||||
<I>WSDLVersion</I> - The string that defines the WSDL used by the SOAP API which the REST API also implements.
|
||||
This string is compared to the "Version=" parameter on each and every authorized REST request.</BR>
|
||||
<I>keystore</I> - The file name of the keystore used by EC2 which must be placed at the directory:
|
||||
"../apache-tomcat-6.0.18/webapps/bridge/WEB-INF/classes"</BR>
|
||||
<I>keystorePass</I> - The password to the EC2 keystore specified by the "keystore" parameter.</BR>
|
||||
<I>dbName</I> - The MySql database name holding the EC2 service's required tables.</BR>
|
||||
<I>dbUser=</I> - The user name used to access the "dbName" MySql database.</BR>
|
||||
<I>dbPassword</I> - The password (if any) the "dbUser" needs to access the EC2 MySql database.</BR>
|
||||
<I>pollInterval1</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API call: createTemplate. Default value is 100.</BR>
|
||||
<I>pollInterval2</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API call: deployVirtualMachine. Default value is 100.</BR>
|
||||
<I>pollInterval3</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API call: createVolume. Default value is 100.</BR>
|
||||
<I>pollInterval4</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API call: createSnapshot. Default value is 1000.</BR>
|
||||
<I>pollInterval5</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API calls: deleteSnapshot, deleteTemplate, deleteVolume, attachVolume, detachVolume, disassociateIpAddress, enableStaticNat, disableStaticNat. Default value is 100.</BR>
|
||||
<I>pollInterval6</I> - Time in milliseconds between asynchronous job completion polling for the following Cloud.com
|
||||
API calls: startVirtualMachine, destroyVirtualMachine, stopVirtualMachine. Default value is 100.</BR>
|
||||
<P>
|
||||
<BR>
|
||||
The following REST calls are used to configure a mapping between Amazon's instance types and CloudStack service offerings:
|
||||
<P>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=SetOfferMapping&amazonoffer=m1.large&cloudoffer=1<BR>
|
||||
<P>
|
||||
The 'amazonoffer' parameter defines the standard Amazon instance types while the 'cloudoffer' parameter defines its associated
|
||||
CloudStack service offering identifer. The result of this REST call is to save the defined relationship. A second call with the
|
||||
same value for amazonoffer but with a different cloudoffer value will overwrite a previously saved setting.
|
||||
<BR>
|
||||
SetOfferMapping is an authenticated REST call using the same authentication scheme as all other EC2 REST calls. This means that the following standard EC2 REST paramters must also be part of the request: Signature, SignatureMethod, Version, SignatureVersion, and Expires.
|
||||
A HTTP 200 result code is returned on success and a 404 on failure.
|
||||
<P>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=DeleteOfferMapping&amazonoffer=m1.large<BR>
|
||||
<P>
|
||||
The result of this REST call is to delete any relationship previously defined by a call to the SetOfferMapping call for the
|
||||
value passed in the 'amazonoffer' parameter.<BR>
|
||||
DeleteOfferMapping is an authenticated REST call using the same authentication scheme as all other EC2 REST calls. This means that the following standard EC2 REST paramters must also be part of the request: Signature, SignatureMethod, Version, SignatureVersion, and Expires.
|
||||
A HTTP 200 result code is returned on success and a 404 on failure.
|
||||
<P>
|
||||
Examples of other Amazon instance types are:
|
||||
{ "m1.small", "m1.large", "m1.xlarge", "c1.medium", "c1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge" }.</BR>
|
||||
Service offering IDs can be obtained from the following Cloud.com API calls: listServiceOfferings.
|
||||
Cloud.com's service offerings are configurable and thus can be different per installation, and they
|
||||
can also be viewed from the Cloud.com's Admin UI.
|
||||
<P>
|
||||
<H2 id="party">2. Required 3rd Party Software</H2>
|
||||
Cloud.com's EC2 service has been built and tested on the following set of 3rd party software:
|
||||
<pre>
|
||||
MySql
|
||||
apache-tomcat 6.0.18
|
||||
axis2 1.5.1
|
||||
rampart 1.5 (installed into axis2 for WS-Security)
|
||||
used for testing: ec2-api-tools-1.3-53907
|
||||
</pre>
|
||||
<P>
|
||||
<H2 id="maintenace">3. Maintenance</H2>
|
||||
As a result of the SetCertificate REST call <A href="#ref1">[1]</A>, X509 Certificates used for SOAP authentication are
|
||||
stored in the following keystore:
|
||||
<pre>
|
||||
<install directory>/apache-tomcat-6.0.18/webapps/bridge/WEB-INF/classes/xes.keystore
|
||||
</pre>
|
||||
The keytool <A href="#ref2">[2]</A> command line tool can be used to delete certificates no longer in use.
|
||||
<P>
|
||||
As a result of the SetUserKeys REST call <A href="#ref1">[1]</A>, entries are inserted into
|
||||
the "usercredentials" table of the "cloudbridge" MySql database.
|
||||
The MySql command line client can be used to delete usercredentials entries no longer in use.
|
||||
<P>
|
||||
<H2 id="install">4. Installation Instructions</H2>
|
||||
<P>
|
||||
On the very first install an EC2/S3 MySql database is created by running the following
|
||||
scripts in the given order: cloudsbridge_db.sql, cloudsbridge_schema.sql, cloudbridge_index.sql
|
||||
<P>
|
||||
After a successful installation the following directory and file structure should exist:
|
||||
<pre>
|
||||
<install directory>
|
||||
apache-tomcat-6.0.18
|
||||
conf
|
||||
ec2-service.properties (EC2 service's configuration parameters)
|
||||
server.xml
|
||||
lib
|
||||
<many axis2 jar files>
|
||||
webapps
|
||||
bridge
|
||||
WEB-INF
|
||||
classes
|
||||
crypto.properties
|
||||
xes.keystore (holds X509 certificates for SOAP authentication)
|
||||
modules
|
||||
cloud-auth-ec2.mar
|
||||
rampart-1.5.mar
|
||||
rahas-1.5.mar
|
||||
addressing-1.5.1.mar
|
||||
services
|
||||
cloud-ec2.aar (the Axis2 EC2 service)
|
||||
</pre>
|
||||
The "../modules/cloud-auth-ec2.mar" module performs a mapping from an X509 certificate appearing in a SOAP
|
||||
request (since its signed via WS-Security) to a matching user's Cloud.com API access and secret keys. This association
|
||||
is first created via the SetUserKeys and SetCertificate REST calls [1].
|
||||
<P>
|
||||
<H2 id="refs">5. References</H2>
|
||||
<OL>
|
||||
<LI id="ref1">Cloud.com's EC2 API User's Guide, 7/15/2010</LI>
|
||||
<LI id="ref2"><A href="http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/tooldocs/windows/keytool.html">keytool - Key and Certificate Management Tool</A></LI>
|
||||
</OL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Cloud.com's EC2 local deployment Guide</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Cloud.com's EC2 local deployment Guide</H1>
|
||||
8/30/2010
|
||||
8/25/2011 (updated)
|
||||
<H2>Table of Contents</H2>
|
||||
<UL>
|
||||
<LI><A href="#prereq">1. Required 3rd Party Software</A></LI>
|
||||
<LI><A href="#git">2. Clone repository</A></LI>
|
||||
<LI><A href="#build">3. Build, deploy and run cloud-bridge with ant</A></LI>
|
||||
</UL>
|
||||
<P>
|
||||
<H2 id="prereq">1. Required 3rd Party Software</H2>
|
||||
1) Following software has to be installed in order to deploy and run cloud-bridge tool:
|
||||
<pre>
|
||||
apache-tomcat-6.0.32
|
||||
axis2 1.5.1 (http://apache.imghat.com//ws/axis2/1_5/axis2-1.5-bin.zip)
|
||||
ant
|
||||
java
|
||||
mysql
|
||||
</pre>
|
||||
2) Set following environment variables:
|
||||
<pre>
|
||||
ANT_HOME
|
||||
CATALINA_HOME
|
||||
export ANT_HOME
|
||||
export JAVA_HOME
|
||||
</pre>
|
||||
3) Go to CATALINA_HOME directory and excute “mkdir temp” (this directory is used for storing temporary axis files)
|
||||
<P>
|
||||
<H2 id="git">2. Clone repository</H2>
|
||||
Clone cloud-bridge repository:
|
||||
<pre>
|
||||
git clone git@github.com:alena11081/cloud-bridge.git
|
||||
</pre>
|
||||
<P>
|
||||
<H2 id="build">3. Build, deploy and run cloud-bridge with ant</H2>
|
||||
Deployment procedure using ant (build.xml and build-cloud-bridge.xml are config files), execute from cloned cloud-bridge directory:.
|
||||
<pre>
|
||||
|
||||
* ant clean - removes dist directory
|
||||
* ant clean-tomcat - cleans up $CATALINA_HOME/webapps/bridge directory
|
||||
* ant build-cloud-bridge compiles and places the resulting jars into cloud-bridge/dist:
|
||||
|
||||
ls dist/
|
||||
cloud-auth-ec2.mar cloud-auth-s3.mar cloud-bridge.jar cloud-ec2.aar cloud-s3.aar
|
||||
|
||||
|
||||
* deploy-axis - copies and unwars cloud-bridge/lib/axis2.war to $CATALINA_HOME/webapps/bridge directory
|
||||
|
||||
<b>ant deploy-cloud-bridge</b> copies files to $CATALINA_HOME/webapps/bridge tomcat directory:
|
||||
|
||||
|
||||
- copy cloud-bridge/dist/cloud-ec2.aar and cloud-s3.aar to $CATALINA_HOME/webapps/bridge/WEB-INF/services
|
||||
- copy cloud-bridge/dist/cloud-auth-ec2.mar and cloud-auth-s3.mar to $CATALINA_HOME/webapps/bridge/WEB-INF/modules
|
||||
- copy all .mar files from cloud-bridge/modules to $CATALINA_HOME/webapps/bridge/WEB-INF/modules
|
||||
- copy cloud-bridge/dist/cloud-bridge.jar to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
|
||||
- copy all .jar files from cloud-bridge/lib directory to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
|
||||
- copy all .jar files from cloud-bridge/rampartlib directory to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
|
||||
<del>- copy all files from cloud-bridge/conf directory to $CATALINA_HOME/webapps/bridge/WEB-INF/conf</del>
|
||||
- copy cloud-bridge/resource/Axis2/axis2.xml to $CATALINA_HOME/webapps/bridge/WEB-INF/conf
|
||||
- copy cloud-bridge/web/web.xml to $CATALINA_HOME/webapps/bridge/WEB-INF
|
||||
- copy cloud-bridge/resource/AmazonEC2/crypto.properties and xes.keystore to $CATALINA_HOME/webapps/bridge/WEB-INF/classes/
|
||||
- remove $CATALINA_HOME/webapps/bridge/WEB-INF/lib/dom4j-1.6.1.jar
|
||||
|
||||
|
||||
ant deploydb - execute cloud-bridge/db/mysql/deploy-db-bridge.sh (for Unix). If it's a windows deployment, execute db/mysql/init_db.bat script
|
||||
5) Configure ec2-service.properties (see parameters descriptions in resource/AmazonEC2/docs/EC2-implementation-guide.html).
|
||||
6) To run application execute "./catalina.sh run" from $CATALINA_HOME/bin directory.
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Cloud.com's EC2 API User's Guide</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Cloud.com's EC2 API User's Guide</H1>
|
||||
4/17/2010
|
||||
<H2>Table of Contents</H2>
|
||||
<UL>
|
||||
<LI><A href="#part1">Part 1. Cloud.com's Specific Implementation Details</A></LI>
|
||||
<UL>
|
||||
<LI><A href="#registration">1. User Registration</A></LI>
|
||||
<UL>
|
||||
<LI><A href="#cloudkeys">1.1 Setting Cloud.com API Keys</A></LI>
|
||||
<LI><A href="#certifiates">1.2 Setting a User's X509 Certificate</A></LI>
|
||||
</UL>
|
||||
<LI><A href="#endpoints">2. Endpoints</LI>
|
||||
<LI><A href="#differences">3. Differences between Amazon's and Cloud.com's EC2 Implementations</A></LI>
|
||||
<LI><A href="#misc">4. Miscellaneous</A><P></LI>
|
||||
</UL>
|
||||
<LI><A href="#part2">Part 2. Generic EC2 Details</A></LI>
|
||||
<UL>
|
||||
<LI><A href="#functions">List of EC2 Functions Implemented</A></LI>
|
||||
<LI><A href="#wsdl">Supported WSDL Version</A><P></LI>
|
||||
</UL>
|
||||
<LI><A href="#refs">References</A></LI>
|
||||
</UL>
|
||||
<P></BR>
|
||||
<H2 id="part1">Part 1. Cloud.com's Specific Implementation Details</H2>
|
||||
<H3 id="registration">1. User Registration</H3>
|
||||
To access Cloud.com's EC2 service via REST follow the instructions in Section 1.1.
|
||||
To access Cloud.com's EC2 service via SOAP follow instructions in both Section 1.1 and 1.2 below.
|
||||
<P>
|
||||
<H3 id="cloudkeys">1.1 Setting Cloud.com API Keys</H3>
|
||||
The EC2 service needs to be given the user's Cloud.com API access and secret keys <A href="#ref2">[2]</A> so that it
|
||||
can make Cloud.com API calls on the user's behalf. This is done by the following REST command.
|
||||
|
||||
<pre>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=SetUserKeys&accesskey=<key>&secretkey=<key>
|
||||
</pre>
|
||||
SetUserKeys is an <I>unauthorized</I> REST call.</br>
|
||||
A HTTP 200 result code is returned on success and a 401 on failure.
|
||||
<P>
|
||||
<H3 id="certifiates">1.2 Setting a User's X509 Certificate</H3>
|
||||
EC2 uses WS-Security <A href="#ref4">[4]</A> for authentication on SOAP access. WS-Security signs the entire SOAP request
|
||||
using a public/private key pair. The user of Cloud.com's EC2 service must
|
||||
generate a public/private key pair with the public key defined in an X509
|
||||
certificate. The private key is used by a SOAP client in generating
|
||||
the WS-Security signature of a SOAP request. The matching public key is stored on
|
||||
a server and is used to verify the signature on each request.
|
||||
<P>
|
||||
The following REST command must be used by a Cloud.com's EC2 service user to
|
||||
load their certificate into the service. No access via the SOAP API is
|
||||
possible until this step is performed. Also for this REST command to be
|
||||
successful the instructions in Section 1.1 must be performed first.
|
||||
|
||||
<pre>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=SetCertificate&AWSAccessKeyId=<Cloud.com API AccessKey>&cert=<pem encoded cert>
|
||||
</pre>
|
||||
SetCertificate is an <I>authenticated</I> REST call using the same authentication scheme as all other EC2 REST calls.
|
||||
This means that the following standard EC2 REST paramters must also be part of the request: Signature, SignatureMethod, Version,
|
||||
SignatureVersion, and Expires <A href="#ref3">[3]</A>.</br>
|
||||
A HTTP 200 result code is returned on success and a 404 on failure.
|
||||
<P>
|
||||
An example of a PEM encoded X509 Certificate is <A href="#ref5">[5]</A>:
|
||||
<pre>
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICdzCCAeCgAwIBAgIGAPCRHu3UMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNVBAYT
|
||||
AlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMQwwCgYDVQQLEwNBV1MxITAfBgNVBAMT
|
||||
GEFXUyBMaW1pdGVkLUFzc3VyYW5jZSBDQTAeFw0xMDA2MjMxODE4MTZaFw0xMTA2
|
||||
MjMxODE4MTZaMFIxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMRcw
|
||||
FQYDVQQLEw5BV1MtRGV2ZWxvcGVyczEVMBMGA1UEAxMMZWZieDQ0eXF1d3E2MIGf
|
||||
MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCw+RO1QV7t5EbluyAAD11SoZ4ats5t
|
||||
DBSta/QB3G9T0y3p2gURrYMDYVJ1BZmyel/DuMANx6UG6Vw+0o0SXOS3mH8Yu/lO
|
||||
OOH9WxWiXulGMIrpPCiUpnWMrWhIlHu8mqLLhBx+5k4I92plMfH97BySunbv9zaf
|
||||
ZRKXX3cXIYbUMwIDAQABo1cwVTAOBgNVHQ8BAf8EBAMCBaAwFgYDVR0lAQH/BAww
|
||||
CgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUCzKwCQvocPYFki/9
|
||||
NORZFTsjcZ8wDQYJKoZIhvcNAQEFBQADgYEAXmIe6+XsNHYIiLGQO6dh8nvHHzDw
|
||||
3sltNa7z6BSdNr7WDxpJg9oFUcddQVca1LZsjsqx6dIc1WxQUjPE9oOfSYqQZuMD
|
||||
/GOpWyXMb/oJ2MLI1Vp1ABKhHoHUJmPOrIou4UbCifMeD7MFZkezkKDqqH3jQMjA
|
||||
4YDNkSWLnJ9xba8=
|
||||
-----END CERTIFICATE-----
|
||||
</pre>
|
||||
<P>
|
||||
To remove a previously loaded certificate the user can simply execute
|
||||
the following REST command.
|
||||
<pre>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=DeleteCertificate&AWSAccessKeyId=<Cloud.com API AccessKey>
|
||||
where the same value for the 'AWSAccessKeyId' parameter as was used in a previous call to SetCertificate.
|
||||
</pre>
|
||||
DeleteCertificate is an <I>authenticated</I> REST call using the same authentication scheme (and having all the same
|
||||
required parameters) as all other EC2 REST calls.</br>
|
||||
A HTTP 200 result code is returned on success and a 404 on failure.
|
||||
<P>
|
||||
<H3 id="endpoints">2. Endpoints</H3>
|
||||
For SOAP access the endpoint is:
|
||||
<pre>http://<fqdn-or-ip>:<port>/bridge/services/AmazonEC2</pre>
|
||||
For REST access the endpoint is:
|
||||
<pre>http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2</pre>
|
||||
<P>
|
||||
|
||||
<H3 id="differences">3. Differences between Amazon's and Cloud.com's EC2 Implementations</H3>
|
||||
<font size=+1><I>EC2's RegisterImage Function</I></font>
|
||||
<P>
|
||||
This function maps to the Cloud.com's API "registerTemplate" function <A href="#ref2">[2]</A>. However the registerTemplate function
|
||||
requires the following additional parameters that are not present in the RegisterImage function:
|
||||
<pre>
|
||||
format - the format for the template. Possible values include QCOW2, RAW, and VHD.</br>
|
||||
osTypeId - the ID of the OS Type that best represents the OS of this template.</br>
|
||||
zoneId - the ID of the zone the template is to be hosted on.</br>
|
||||
</pre>
|
||||
These parameters must be provided for a successful registerTemplate call and thus a RegsiterImage call.
|
||||
To accomidate these values we have redefined the "architecture" parameter defined for RegisterImage.
|
||||
The Amazon defined valid values are: "i386 | x86_64" and it is of type xsd:string. Neither of these
|
||||
defined values has any meaning in the context of the Cloud.com API.
|
||||
|
||||
The new definition of the architecture field is a three part value of the form:
|
||||
"<format>:<zoneName>:<osTypeName>", where ":" is the field delimitor. A valid example
|
||||
would be: "VHD:ZONE1:Centos 4.5". Cloud.com's EC2 code translates the "zoneName" value into a valid zoneId,
|
||||
and the "osTypeName" value into a matching osTypeId. In addition, whereas the architecture field
|
||||
is optional in Amazon's definition of RegisterImage, it is required in Cloud.com's modified version.
|
||||
<P>
|
||||
Another difference for the RegisterImage function concerns the use of the "imageLocation" parameter.
|
||||
As defined by Amazon <A href="#ref3">[3]</A>:
|
||||
<pre>
|
||||
imageLocation - a full path to your AMI manifest in Amazon S3 storage.
|
||||
</pre>
|
||||
As defined for Cloud.com's EC2 implementation:
|
||||
<pre>
|
||||
imageLocation - is a URL of where the template is hosted. Possible URL include http:// and https://
|
||||
</pre>
|
||||
<P>
|
||||
<font size=+1><I>EC2's DescribeInstances Function</I></font>
|
||||
<P>
|
||||
Only the following list of filters are currently supported:
|
||||
<pre>
|
||||
availability-zone
|
||||
hypervisor
|
||||
image-id
|
||||
instance-id
|
||||
instance-type
|
||||
instance-state-code
|
||||
instance-state-name
|
||||
ip-address
|
||||
owner-id
|
||||
root-device-name
|
||||
</pre>
|
||||
<P>
|
||||
<font size=+1><I>EC2's DescribeVolumes Function</I></font>
|
||||
<P>
|
||||
Only the following list of filters are currently supported:
|
||||
<pre>
|
||||
attachment.attach-time
|
||||
attachment.device
|
||||
attachment.instance-id
|
||||
availability-zone
|
||||
create-time
|
||||
size
|
||||
snapshot-id
|
||||
status
|
||||
volume-id
|
||||
</pre>
|
||||
<P>
|
||||
<font size=+1><I>EC2's DescribeSnapshots Function</I></font>
|
||||
<P>
|
||||
Only the following list of filters are currently supported:
|
||||
<pre>
|
||||
owner-alias
|
||||
owner-id (here its the CloudStack API key)
|
||||
snapshot-id
|
||||
start-time
|
||||
status
|
||||
volume-id
|
||||
volume-size
|
||||
</pre>
|
||||
<P>
|
||||
<P>
|
||||
<font size=+1><I>EC2's DescribeSecurityGroups Function</I></font>
|
||||
<P>
|
||||
Only the following list of filters are currently supported:
|
||||
<pre>
|
||||
description
|
||||
group-id
|
||||
group-name
|
||||
ip-permission.cidr
|
||||
ip-permission.from-port
|
||||
ip-permission.to-port
|
||||
ip-permission.protocol
|
||||
owner-id
|
||||
</pre>
|
||||
<P>
|
||||
<H3 id="misc">4. Miscellaneous</H3>
|
||||
The EC2 service provides a Cloud.com extension to obtain the release version of the EC2 software.
|
||||
|
||||
<pre>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonEC2?Action=CloudEC2Version
|
||||
</pre>
|
||||
CloudEC2Version is an <I>unauthorized</I> REST call.</br>
|
||||
An example of a valid response from this function is:
|
||||
<pre>
|
||||
<CloudEC2Version>1.01</CloudEC2Version>
|
||||
</pre>
|
||||
<P></BR>
|
||||
<H2 id="part2">Part 2. Generic EC2 Details</H2>
|
||||
<H3 id="functions">List of EC2 Functions Implemented</H3>
|
||||
Refer to the Amazon EC2 documentation <A href="#ref3">[3]</A> for a description of each function.
|
||||
Also see Part1, section 3 above, for differences between Amazon's and Cloud.com's EC2 implementations.
|
||||
<pre>
|
||||
AllocateAddress
|
||||
AssociateAddress
|
||||
AttachVolume
|
||||
AuthorizeSecurityGroupIngress
|
||||
CreateImage
|
||||
CreateSecurityGroup
|
||||
CreateSnapshot
|
||||
CreateVolume
|
||||
DeleteSecurityGroup
|
||||
DeleteSnapshot
|
||||
DeleteVolume
|
||||
DeregisterImage
|
||||
DescribeAvailabilityZones
|
||||
DescribeImageAttribute
|
||||
DescribeImages
|
||||
DescribeInstanceAttribute
|
||||
DescribeInstances
|
||||
DescribeSecurityGroups
|
||||
DescribeSnapshots
|
||||
DescribeVolumes
|
||||
DetachVolume
|
||||
DisassociateAddress
|
||||
ModifyImageAttribute
|
||||
RebootInstances
|
||||
ReleaseAddress
|
||||
RegisterImage
|
||||
RevokeSecurityGroupIngress
|
||||
ResetImageAttribute
|
||||
RunInstances
|
||||
StartInstances
|
||||
StopInstances
|
||||
TerminateInstances
|
||||
</pre>
|
||||
<P>
|
||||
<H3 id="wsdl">Supported WSDL Version</H3>
|
||||
<A href="http://ec2.amazonaws.com/doc/2010-08-31/">http://ec2.amazonaws.com/doc/2010-08-31/</A></BR>
|
||||
Amazon EC2 Command Line Tool used for testing was version 1.3-57419.
|
||||
<P>
|
||||
</BR>
|
||||
<H2 id="refs">References</H2>
|
||||
<OL>
|
||||
<LI id="ref1"><A href="http://en.wikipedia.org/wiki/Public_Key_Cryptography">Public-key cryptograph</A></LI>
|
||||
<LI id="ref2"><A href="http://cloud.com/community/kb">Cloud.com's Developer API</A></LI>
|
||||
<LI id="ref3"><A href="http://aws.amazon.com/documentation/ec2/">Amazon's EC2 API</A></LI>
|
||||
<LI id="ref4"><A href="http://en.wikipedia.org/wiki/WS-Security">WS-Security</A></LI>
|
||||
<LI id="ref5"><A href="http://en.wikipedia.org/wiki/X.509">X.509 Certificates</A></LI>
|
||||
</OL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
To generate the Java AXIS2 classes from the Amazon EC2 wsdl use the following command line:
|
||||
C:\axis2-1.5.1\bin>wsdl2java.bat -ss -sd -ssi -g -p com.amazon.ec2 -ns2p "http://ec2.amazonaws.com/doc/2010-08-31/"=com.amazon.ec2 -uri ec2.wsdl
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Cloud.com's S3 API User's Guide</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Cloud.com's S3 API User's Guide</H1>
|
||||
3/4/2011
|
||||
<H2>Table of Contents</H2>
|
||||
<UL>
|
||||
<LI><A href="#part1">Part 1. Cloud.com's Specific Implementation Details</A></LI>
|
||||
<UL>
|
||||
<LI><A href="#registration">User Registration</A></LI>
|
||||
<LI><A href="#endpoints">Endpoints</LI>
|
||||
</UL>
|
||||
<LI><A href="#part2">Part 2. Generic S3 Details</A></LI>
|
||||
<UL>
|
||||
<LI><A href="#functions">List of S3 Functions Implemented</A></LI>
|
||||
<LI><A href="#wsdl">Supported WSDL Version</A><P></LI>
|
||||
</UL>
|
||||
<LI><A href="#refs">References</A></LI>
|
||||
</UL>
|
||||
<P></BR>
|
||||
<H2 id="part1">Part 1. Cloud.com's Specific Implementation Details</H2>
|
||||
<H3 id="registration">User Registration</H3>
|
||||
The S3 service uses the user's Cloud.com API access and secret keys <A href="#ref1">[1]</A> to implement both
|
||||
the REST and SOAP authentication algorithms. This is done by re-using an EC2 provided REST command. Once
|
||||
this URL is invoked the user has registered for both the S3 service and the EC2 REST service.
|
||||
<pre>
|
||||
http://<fqdn-or-ip>:<port>/bridge/rest/AmazonS3?Action=SetUserKeys&accesskey=<key>&secretkey=<key>
|
||||
</pre>
|
||||
SetUserKeys is an <I>unauthorized</I> REST call.</br>
|
||||
A HTTP 200 result code is returned on success and a 401 on failure.
|
||||
<P>
|
||||
<P>
|
||||
<H3 id="endpoints">Endpoints</H3>
|
||||
For SOAP access the endpoint is:
|
||||
<pre>http://<fqdn-or-ip>:<port>/bridge/services/AmazonS3</pre>
|
||||
|
||||
For the SOAP PutObject function with a DIME attachment <A href="#ref3">[3]</A>:
|
||||
<pre>http://<fqdn-or-ip>:<port>/bridge/dime/AmazonS3</pre>
|
||||
|
||||
For REST access the endpoint is:
|
||||
<pre>http://<fqdn-or-ip>:<port>/bridge/rest/AmazonS3</pre>
|
||||
<P>
|
||||
|
||||
<H2 id="part2">Part 2. Generic S3 Details</H2>
|
||||
<H3 id="functions">List of S3 Functions Implemented</H3>
|
||||
Refer to the Amazon S3 documentation <A href="#ref2">[2]</A> for a description of each function.
|
||||
Also see Part1, section 3 above, for a list of unsupported S3 features.
|
||||
<pre>
|
||||
REST calls:
|
||||
GET Service
|
||||
DELETE Bucket
|
||||
GET Bucket
|
||||
GET Bucket acl
|
||||
GET Bucket versioning
|
||||
PUT Bucket
|
||||
PUT Bucket acl
|
||||
PUT Bucket versioning
|
||||
List Multipart Uploads
|
||||
DELETE Object
|
||||
GET Object
|
||||
GET Object acl
|
||||
HEAD Object
|
||||
POST Object
|
||||
PUT Object
|
||||
PUT Object (Copy)
|
||||
Initiate Multipart Upload
|
||||
Upload Part
|
||||
Complete Multipart Upload
|
||||
Abort Multipart Upload
|
||||
List Parts
|
||||
|
||||
SOAP calls:
|
||||
ListAllMyBuckets
|
||||
CreateBucket
|
||||
DeleteBucket
|
||||
ListBucket
|
||||
GetBucketAccessControlPolicy
|
||||
SetBucketAccessControlPolicy
|
||||
PutObjectInline
|
||||
PutObject
|
||||
CopyObject
|
||||
GetObject
|
||||
GetObjectExtended
|
||||
DeleteObject
|
||||
GetObjectAccessControlPolicy
|
||||
SetObjectAccessControlPolicy
|
||||
</pre>
|
||||
<P>
|
||||
<H3 id="wsdl">Supported WSDL Version</H3>
|
||||
<A href="http://s3.amazonaws.com/doc/2006-03-01/">http://s3.amazonaws.com/doc/2006-03-01/</A></BR>
|
||||
<P>
|
||||
</BR>
|
||||
<H2 id="refs">References</H2>
|
||||
<OL>
|
||||
<LI id="ref1"><A href="http://cloud.com/community/kb">Cloud.com's Developer API</A></LI>
|
||||
<LI id="ref2"><A href="http://aws.amazon.com/documentation/s3/">Amazon's S3 API</A></LI>
|
||||
<LI id="ref3"><A href="http://msdn.microsoft.com/en-us/magazine/cc188797.aspx">DIME</A></LI>
|
||||
</OL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Example of headers for a rest call of copyObject
|
||||
|
||||
Authorization: AWS Mark:djdjdjdjdjdjdjdj\n
|
||||
Host: Henry2.s3.amazonaws.com\n
|
||||
x-amz-copy-source: /Henry1/test1\n
|
||||
x-amz-metadata-directive: REPLACE\n
|
||||
x-amz-meta-hight: 55 feet\n
|
||||
x-amz-meta-width: 13 yards\n
|
||||
x-amz-meta-weight: 4 tons\n
|
||||
x-amz-acl: public-read\n
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
To generate the Java AXIS2 classes from the Amazon EC2 wsdl use the following command line, assuming source definitions in the local directory:
|
||||
$ wsdl2java.sh -ss -sd -ssi -g -p com.amazon.s3 -ns2p "http://s3.amazonaws.com/doc/2006-03-01/"=com.amazon.s3 -uri cloud-AmazonS3.wsdl
|
||||
|
||||
This runs the wsdl2java code generation tool to produce stubs with asynchronous invocation methods, such as those useful for REST using the com.amazon.s3 package.
|
||||
|
||||
This creates the following java source files in the src/com/amazon/s3 subdirectory …
|
||||
|
||||
AccessControlList.java ListAllMyBucketsResponse.java
|
||||
AccessControlPolicy.java ListAllMyBucketsResult.java
|
||||
AmazonCustomerByEmail.java ListBucket.java
|
||||
AmazonS3CallbackHandler.java ListBucketResponse.java
|
||||
AmazonS3MessageReceiverInOut.java ListBucketResult.java
|
||||
AmazonS3Skeleton.java ListEntry.java
|
||||
AmazonS3SkeletonInterface.java ListVersionsResponse.java
|
||||
AmazonS3Stub.java ListVersionsResult.java
|
||||
BucketLoggingStatus.java ListVersionsResultChoice_type0.java
|
||||
CanonicalUser.java LocationConstraint.java
|
||||
CopyObject.java LoggingSettings.java
|
||||
CopyObjectResponse.java MetadataDirective.java
|
||||
CopyObjectResult.java MetadataEntry.java
|
||||
CreateBucket.java MfaDeleteStatus.java
|
||||
CreateBucketConfiguration.java NotificationConfiguration.java
|
||||
CreateBucketResponse.java Payer.java
|
||||
CreateBucketResult.java Permission.java
|
||||
DeleteBucket.java PostResponse.java
|
||||
DeleteBucketResponse.java PrefixEntry.java
|
||||
DeleteMarkerEntry.java PutObject.java
|
||||
DeleteObject.java PutObjectInline.java
|
||||
DeleteObjectResponse.java PutObjectInlineResponse.java
|
||||
ExtensionMapper.java PutObjectResponse.java
|
||||
GetBucketAccessControlPolicy.java PutObjectResult.java
|
||||
GetBucketAccessControlPolicyResponse.java RequestPaymentConfiguration.java
|
||||
GetBucketLoggingStatus.java Result.java
|
||||
GetBucketLoggingStatusResponse.java SetBucketAccessControlPolicy.java
|
||||
GetObject.java SetBucketAccessControlPolicyResponse.java
|
||||
GetObjectAccessControlPolicy.java SetBucketLoggingStatus.java
|
||||
GetObjectAccessControlPolicyResponse.java SetBucketLoggingStatusResponse.java
|
||||
GetObjectExtended.java SetObjectAccessControlPolicy.java
|
||||
GetObjectExtendedResponse.java SetObjectAccessControlPolicyResponse.java
|
||||
GetObjectResponse.java Status.java
|
||||
GetObjectResult.java StorageClass.java
|
||||
Grant.java TopicConfiguration.java
|
||||
Grantee.java User.java
|
||||
Group.java VersionEntry.java
|
||||
ListAllMyBuckets.java VersioningConfiguration.java
|
||||
ListAllMyBucketsEntry.java VersioningStatus.java
|
||||
ListAllMyBucketsList.java
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# install.sh -- deploys cloud-bridge and the corresponding DB
|
||||
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
#### deploying cloud-bridge
|
||||
echo "Installing cloud-bridge..."
|
||||
sh deploy-cloud-bridge.sh -d "$CATALINA_HOME"
|
||||
echo "Deploying database..."
|
||||
cd db && sh deploy-db-bridge.sh
|
||||
|
||||
#change port to 8090 in server.xml
|
||||
#change ec2-service.properties file
|
||||
|
||||
exit 0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,12 @@
|
|||
cloud (1.0.0) unstable; urgency=low
|
||||
|
||||
* Bumped version up to 1.0.0
|
||||
|
||||
-- Cloud <cloud@cloud.com> Thu, 31 Jan 2011 08:33:25 -0700
|
||||
|
||||
cloud (0.9.0) unstable; urgency=low
|
||||
|
||||
* Initial entry
|
||||
|
||||
-- Cloud <cloud@cloud.com> Thu, 13 Jan 2011 10:05:11 -0700
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
/usr/share/cloud/bridge/*
|
||||
/usr/share/cloud/setup/bridge/*
|
||||
/usr/bin/*
|
||||
/etc/init.d/*
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! id cloud > /dev/null 2>&1 ; then
|
||||
adduser --system --home /usr/share/cloud --no-create-home \
|
||||
--group --disabled-password --shell /bin/sh cloud
|
||||
fi
|
||||
|
||||
for i in /usr/share/cloud/bridge
|
||||
do
|
||||
chmod 0775 $i
|
||||
chown -R cloud.cloud $i
|
||||
done
|
||||
|
||||
if [ "$2" = "" ] ; then # no recently configured version, this is a first install
|
||||
/usr/sbin/update-rc.d cloud-bridge defaults || true
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Source: cloud
|
||||
Section: libs
|
||||
Priority: extra
|
||||
Maintainer: Cloud <cloud@cloud.com>
|
||||
Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6
|
||||
|
||||
Package: cloud-bridge
|
||||
Provides: cloud-bridge
|
||||
Conflicts: cloud-bridge
|
||||
Replaces: cloud-bridge
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre
|
||||
Description: Cloud.com Bridge
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
#
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
#
|
||||
# Modified to make a template file for a multi-binary package with separated
|
||||
# build-arch and build-indep targets by Bill Allombert 2001
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
(cd ../..; ./waf configure --prefix=/usr --libdir=/usr/lib --bindir=/usr/bin --javadir=/usr/share/java --sharedstatedir=/var/lib --localstatedir=/var --sysconfdir=/etc --mandir=/usr/share/man --libexecdir=/usr/bin)
|
||||
(cd ../..; ./waf showconfig)
|
||||
|
||||
|
||||
#Architecture
|
||||
# build: build-arch build-indep
|
||||
build: build-arch
|
||||
|
||||
build-arch: build-arch-stamp
|
||||
build-arch-stamp: configure-stamp
|
||||
|
||||
|
||||
# build-indep: build-indep-stamp
|
||||
# build-indep-stamp: configure-stamp
|
||||
#
|
||||
# # Add here commands to compile the indep part of the package.
|
||||
# #$(MAKE) doc
|
||||
# touch $@
|
||||
#
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
(cd ../..; ./waf distclean)
|
||||
dh_clean
|
||||
|
||||
install: install-arch
|
||||
# install: install-indep install-arch
|
||||
# install-indep:
|
||||
# dh_testdir
|
||||
# dh_testroot
|
||||
# dh_prep -i
|
||||
# dh_installdirs -i
|
||||
#
|
||||
# # Add here commands to install the indep part of the package into
|
||||
# # debian/<package>-doc.
|
||||
# #INSTALLDOC#
|
||||
#
|
||||
# dh_install -i
|
||||
|
||||
install-arch:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -s
|
||||
dh_installdirs -s
|
||||
(cd ../..; ant deploy-debian-install)
|
||||
chmod 755 debian/tmp/etc/init.d/cloud-bridge
|
||||
chmod 755 debian/tmp/usr/bin/cloud-setup-bridge
|
||||
chmod 755 debian/tmp/usr/bin/cloud-bridge-register
|
||||
chmod 755 debian/tmp/usr/bin/cloud-setup-bridge-db
|
||||
dh_install -s
|
||||
# Must not depend on anything. This is to be called by
|
||||
# binary-arch/binary-indep
|
||||
# in another 'make' thread.
|
||||
binary-common:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
# dh_installchangelogs
|
||||
# dh_installdocs -A README.html
|
||||
# dh_installexamples
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
# Build architecture independant packages using the common target.
|
||||
# binary-indep: build-indep install-indep
|
||||
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
||||
|
||||
# Build architecture dependant packages using the common target.
|
||||
binary-arch: build-arch install-arch
|
||||
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
|
||||
|
||||
# binary: binary-arch binary-indep
|
||||
binary: binary-arch
|
||||
# .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
|
||||
.PHONY: build clean binary-arch binary install install-arch configure
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
%define __os_install_post %{nil}
|
||||
%global debug_package %{nil}
|
||||
|
||||
%define _rel 1
|
||||
|
||||
Name: cloud-bridge
|
||||
Summary: CloudStack CloudBridge
|
||||
Version: %{_ver}
|
||||
#http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages
|
||||
%if "%{?_prerelease}" != ""
|
||||
Release: 0.%{_build_number}%{_prerelease}
|
||||
%else
|
||||
Release: %{_rel}
|
||||
%endif
|
||||
License: GPLv3+ with exceptions or CSL 1.1
|
||||
Vendor: Citrix Systems, Inc. <sqa@cloud.com>
|
||||
Packager: Citrix Systems, Inc. <cloud@cloud.com>
|
||||
Source0: cloud-bridge-%{_ver}.tar.bz2
|
||||
Group: System Environment/Libraries
|
||||
Requires: java >= 1.6.0
|
||||
Requires: tomcat6
|
||||
Obsoletes: cloud-bridge < %{version}-%{release}
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%description
|
||||
This is the CloudStack CloudBridge
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q -n %{name}-%{_ver}
|
||||
|
||||
%build
|
||||
|
||||
%define _localstatedir /var
|
||||
%define _sharedstatedir /usr/share
|
||||
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir} --sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --fast --package-version=%{_ver}
|
||||
|
||||
%install
|
||||
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
ant deploy-rpm-install -Dversion=%{version}
|
||||
mv ../cloud-bridge-%{_ver}-1 ${RPM_BUILD_ROOT}
|
||||
mkdir $RPM_BUILD_ROOT/usr/share/cloud/bridge/logs
|
||||
mkdir $RPM_BUILD_ROOT/usr/share/cloud/bridge/work
|
||||
mkdir $RPM_BUILD_ROOT/usr/share/cloud/bridge/temp
|
||||
|
||||
%clean
|
||||
|
||||
#[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
|
||||
%preun
|
||||
/sbin/service cloud-bridge stop || true
|
||||
if [ "$1" == "0" ] ; then
|
||||
/sbin/chkconfig --del cloud-bridge > /dev/null 2>&1 || true
|
||||
/sbin/service cloud-bridge stop > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%pre
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack CloudBridge unprivileged user" \
|
||||
-r -s /bin/sh -d %{_sharedstatedir}/cloud cloud|| true
|
||||
# user harcoded here
|
||||
|
||||
%post
|
||||
if [ "$1" == "1" ] ; then
|
||||
/sbin/chkconfig --add cloud-bridge > /dev/null 2>&1 || true
|
||||
/sbin/chkconfig --level 345 cloud-bridge on > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(0644,cloud,cloud,0755)
|
||||
/usr/share/cloud/bridge/conf/*
|
||||
/usr/share/cloud/bridge/lib/*
|
||||
/usr/share/cloud/bridge/webapps/*
|
||||
%dir %attr(0775,cloud,cloud) /usr/share/cloud/bridge/logs
|
||||
%dir %attr(0775,cloud,cloud) /usr/share/cloud/bridge/work
|
||||
%dir %attr(0775,cloud,cloud) /usr/share/cloud/bridge/temp
|
||||
%attr(0644,root,root) /usr/share/cloud/setup/bridge/db/*
|
||||
%attr(0755,root,root) /etc/init.d/cloud-bridge
|
||||
%attr(0755,root,root) /usr/bin/cloud-bridge-register
|
||||
%attr(0755,root,root) /usr/bin/cloud-setup-bridge
|
||||
%attr(0755,root,root) /usr/bin/cloud-setup-bridge-db
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="">
|
||||
<title>Welcome to Apache Axis2 version 1.6.2</title>
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<h1>Welcome to Apache Axis2 version 1.6.2</h1>
|
||||
|
||||
<h3>April 17, 2012</h3>
|
||||
|
||||
<pre>Axis2 1.6.2 is a maintenance release that upgrades Axiom to version 1.2.13 and
|
||||
Neethi to version 3.0.2. it contains fixes for several issues discovered
|
||||
over the last six months. The complete list can be found <a href="http://s.apache.org/7lT">here</a>.
|
||||
|
||||
|
||||
About Axis2
|
||||
|
||||
Downloads are available at:
|
||||
http://axis.apache.org/axis2/java/core/download.cgi
|
||||
|
||||
Apache Axis2 is a complete re-design and re-write of the widely used
|
||||
Apache Axis engine and is a more efficient, more scalable, more modular
|
||||
and more XML-oriented Web services framework. It is carefully designed to
|
||||
support the easy addition of plug-in "modules" that extend its
|
||||
functionality for features such as security and reliability.
|
||||
|
||||
Modules supporting WS-Security/Secure-Conversation (Apache Rampart),
|
||||
WS-Trust (Apache Rahas), WS-Reliable Messaging (Apache Sandesha) and
|
||||
WS-Eventing (Apache Savan) will be available soon after the Apache Axis2
|
||||
@axisVersion@ release. Please see these projects' own sites for further information.
|
||||
|
||||
Known Issues and Limitations in 1.6.2 Release:
|
||||
- Please see JIRA
|
||||
|
||||
We are striving for a simple and happy first time user experience as well as a
|
||||
satisfying experienced user experience with this release. We welcome any
|
||||
and all feedback at:
|
||||
java-user@axis.apache.org (please include "[axis2]" in the subject)
|
||||
java-dev@axis.apache.org (please include "[axis2]" in the subject)
|
||||
http://issues.apache.org/jira/browse/AXIS2
|
||||
|
||||
Thank you for your interest in Apache Axis2!
|
||||
|
||||
The Axis2 Development Team
|
||||
http://axis.apache.org/axis2/java/core/
|
||||
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Features of Apache Axis2:
|
||||
|
||||
Programming Model
|
||||
- Simple XML-centric client API with full WSDL and policy support
|
||||
- Support for POJO and Spring services and clients
|
||||
- Support for any message exchange pattern (MEP)
|
||||
- Synchronous and asynchronous programming model
|
||||
- Archived service deployment model supporting full service
|
||||
encapsulation with versioning support
|
||||
- Archived module deployment model supporting controlled
|
||||
extensibility with versioning support
|
||||
- Hot deployment
|
||||
- WS-Policy driven code generation extensions
|
||||
- Flexible service life cycle model
|
||||
- Automatic support for POX (REST) style invocation of services
|
||||
- Support for querying service's WSDL (with ?wsdl), schema (with
|
||||
?xsd) and policies (with ?policy)
|
||||
|
||||
Supported Specifications
|
||||
- SOAP 1.1 and 1.2
|
||||
- Message Transmission Optimization Mechanism (MTOM)
|
||||
- XML Optimized Packaging (XOP)
|
||||
- SOAP with Attachments
|
||||
- WSDL 1.1, including both SOAP and HTTP bindings , WSDL 2.0
|
||||
- WS-Addressing submission and 1.0
|
||||
- WS-Policy
|
||||
- SAAJ 1.1
|
||||
|
||||
Transports
|
||||
- HTTP
|
||||
- SMTP
|
||||
- JMS
|
||||
- TCP
|
||||
- udp
|
||||
- xmpp
|
||||
|
||||
For more details refer to the <a href="http://axis.apache.org/axis2/java/transports/">Axis2 Transports</a> project.
|
||||
|
||||
Supported Data Bindings
|
||||
- Axis Data Binding (ADB)
|
||||
- XMLBeans
|
||||
- JibX
|
||||
- JAXB
|
||||
|
||||
Tools
|
||||
- WSDL2Java: Generate Java stubs and skeletons from a WSDL document.
|
||||
- Java2WSDL: Generate a WSDL document from a Java class.
|
||||
- Eclipse Plugins
|
||||
- IntelliJ Idea Plugins
|
||||
- Maven2 Plugins
|
||||
- Web application for administering Apache Axis2
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
1.0.2.RC6
|
||||
=========
|
||||
|
||||
* ec2-allocate-address and ec2-run-instances should now work with CloudStack advanced network mode.
|
||||
* findNetwork improved and now used with ec2-allocate-address.
|
||||
* Support for string based id's (UUIDs) for all objects. Prior to this, CB used Long's to store objectIds returned from CloudStack.
|
||||
|
||||
1.0.2.RC5
|
||||
=========
|
||||
|
||||
* Fixed ec2-register/registerTemplate calls
|
||||
|
||||
1.0.2.RC4
|
||||
=========
|
||||
|
||||
* Bug 14037 CloudBridge deployment would overwrite files in /usr/share/cloud/bridge/conf, is now fixed
|
||||
|
||||
1.0.2.RC3
|
||||
=========
|
||||
|
||||
* Bug 14015 When using cloudStackApi, we must be sure to reset access/secret keys on each call in e
|
||||
* Better error error checking for bad json responses (empty lists) from CloudStack...
|
||||
* Bug 13400: CloudBridge didn't honor free-form end-points (instead expecting hostnames). This change allows for free form end-points.
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,6 @@
|
|||
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
|
||||
org.apache.ws.security.crypto.merlin.keystore.type=jks
|
||||
org.apache.ws.security.crypto.merlin.keystore.password=apache
|
||||
org.apache.ws.security.crypto.merlin.keystore.alias=xeskey
|
||||
org.apache.ws.security.crypto.merlin.alias.password=apache
|
||||
org.apache.ws.security.crypto.merlin.file=xes.keystore
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This file was auto-generated from WSDL -->
|
||||
<!-- by the Apache Axis2 version: 1.5 Built on : Apr 30, 2009 (06:07:24 EDT) -->
|
||||
<serviceGroup>
|
||||
<service name="AmazonEC2" class="com.cloud.bridge.lifecycle.ServiceEngineLifecycle">
|
||||
<messageReceivers>
|
||||
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="com.amazon.ec2.AmazonEC2MessageReceiverInOut"/>
|
||||
</messageReceivers>
|
||||
<parameter name="ServiceClass">com.cloud.bridge.service.EC2SoapService</parameter>
|
||||
<parameter name="useOriginalwsdl">true</parameter>
|
||||
<parameter name="modifyUserWSDLPortAddress">true</parameter>
|
||||
<operation name="ModifyInstanceAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ModifyInstanceAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ModifyInstanceAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateVolume" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateVolume</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateVolumeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="StopInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>StopInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/StopInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ConfirmProductInstance" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ConfirmProductInstance</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ConfirmProductInstanceResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="RequestSpotInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>RequestSpotInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/RequestSpotInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteSecurityGroup" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteSecurityGroup</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteSecurityGroupResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateSpotDatafeedSubscription" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateSpotDatafeedSubscription</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateSpotDatafeedSubscriptionResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="RegisterImage" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>RegisterImage</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/RegisterImageResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteKeyPair" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteKeyPair</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteKeyPairResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteSubnet" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteSubnet</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteSubnetResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ResetSnapshotAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ResetSnapshotAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ResetSnapshotAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteCustomerGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteCustomerGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteCustomerGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteVolume" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteVolume</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteVolumeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="StartInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>StartInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/StartInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeAddresses" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeAddresses</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeAddressesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateSubnet" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateSubnet</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateSubnetResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="PurchaseReservedInstancesOffering" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>PurchaseReservedInstancesOffering</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/PurchaseReservedInstancesOfferingResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeDhcpOptions" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeDhcpOptions</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeDhcpOptionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateVpnConnection" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateVpnConnection</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateVpnConnectionResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeImageAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeImageAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeImageAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteDhcpOptions" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteDhcpOptions</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteDhcpOptionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateSnapshot" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateSnapshot</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateSnapshotResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateDhcpOptions" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateDhcpOptions</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateDhcpOptionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSpotPriceHistory" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSpotPriceHistory</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSpotPriceHistoryResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribePlacementGroups" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribePlacementGroups</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribePlacementGroupsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeLicenses" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeLicenses</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeLicensesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSpotInstanceRequests" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSpotInstanceRequests</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSpotInstanceRequestsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="TerminateInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>TerminateInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/TerminateInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="RevokeSecurityGroupIngress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>RevokeSecurityGroupIngress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/RevokeSecurityGroupIngressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ImportKeyPair" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ImportKeyPair</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ImportKeyPairResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreatePlacementGroup" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreatePlacementGroup</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreatePlacementGroupResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AllocateAddress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AllocateAddress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AllocateAddressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeAvailabilityZones" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeAvailabilityZones</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeAvailabilityZonesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteVpnGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteVpnGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteVpnGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteVpc" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteVpc</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteVpcResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteSnapshot" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteSnapshot</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteSnapshotResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSubnets" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSubnets</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSubnetsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateVpc" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateVpc</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateVpcResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ActivateLicense" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ActivateLicense</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ActivateLicenseResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSnapshotAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSnapshotAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSnapshotAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeTags" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeTags</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeTagsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeVpnConnections" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeVpnConnections</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeVpnConnectionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AuthorizeSecurityGroupIngress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AuthorizeSecurityGroupIngress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AuthorizeSecurityGroupIngressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeReservedInstancesOfferings" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeReservedInstancesOfferings</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeReservedInstancesOfferingsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeVpcs" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeVpcs</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeVpcsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteTags" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteTags</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteTagsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="UnmonitorInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>UnmonitorInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/UnmonitorInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="RebootInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>RebootInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/RebootInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AssociateDhcpOptions" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AssociateDhcpOptions</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AssociateDhcpOptionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeInstanceAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeInstanceAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeInstanceAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeletePlacementGroup" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeletePlacementGroup</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeletePlacementGroupResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateKeyPair" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateKeyPair</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateKeyPairResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="BundleInstance" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>BundleInstance</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/BundleInstanceResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AttachVpnGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AttachVpnGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AttachVpnGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeKeyPairs" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeKeyPairs</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeKeyPairsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ResetImageAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ResetImageAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ResetImageAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateTags" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateTags</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateTagsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeVolumes" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeVolumes</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeVolumesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DetachVpnGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DetachVpnGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DetachVpnGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CancelBundleTask" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CancelBundleTask</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CancelBundleTaskResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="GetConsoleOutput" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>GetConsoleOutput</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/GetConsoleOutputResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DetachVolume" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DetachVolume</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DetachVolumeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="RunInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>RunInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/RunInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ResetInstanceAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ResetInstanceAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ResetInstanceAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeCustomerGateways" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeCustomerGateways</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeCustomerGatewaysResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AssociateAddress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AssociateAddress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AssociateAddressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ReleaseAddress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ReleaseAddress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ReleaseAddressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteSpotDatafeedSubscription" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteSpotDatafeedSubscription</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteSpotDatafeedSubscriptionResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSecurityGroups" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSecurityGroups</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSecurityGroupsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateImage" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateImage</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateImageResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="GetPasswordData" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>GetPasswordData</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/GetPasswordDataResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeBundleTasks" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeBundleTasks</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeBundleTasksResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="AttachVolume" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>AttachVolume</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/AttachVolumeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DisassociateAddress" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DisassociateAddress</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DisassociateAddressResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeregisterImage" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeregisterImage</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeregisterImageResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeleteVpnConnection" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeleteVpnConnection</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeleteVpnConnectionResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeImages" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeImages</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeImagesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateSecurityGroup" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateSecurityGroup</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateSecurityGroupResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateVpnGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateVpnGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateVpnGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ModifySnapshotAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ModifySnapshotAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ModifySnapshotAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CancelSpotInstanceRequests" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CancelSpotInstanceRequests</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CancelSpotInstanceRequestsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DeactivateLicense" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DeactivateLicense</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DeactivateLicenseResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="MonitorInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>MonitorInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/MonitorInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="ModifyImageAttribute" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>ModifyImageAttribute</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/ModifyImageAttributeResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSnapshots" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSnapshots</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSnapshotsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="CreateCustomerGateway" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>CreateCustomerGateway</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/CreateCustomerGatewayResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeSpotDatafeedSubscription" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeSpotDatafeedSubscription</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeSpotDatafeedSubscriptionResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeReservedInstances" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeReservedInstances</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeReservedInstancesResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeRegions" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeRegions</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeRegionsResponse</outputActionMapping>
|
||||
</operation>
|
||||
<operation name="DescribeVpnGateways" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://ec2.amazonaws.com/doc/2010-11-15/">
|
||||
<actionMapping>DescribeVpnGateways</actionMapping>
|
||||
<outputActionMapping>http://ec2.amazonaws.com/doc/2010-11-15/AmazonEC2PortType/DescribeVpnGatewaysResponse</outputActionMapping>
|
||||
</operation>
|
||||
</service>
|
||||
</serviceGroup>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,561 @@
|
|||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<axisconfig name="AxisJava2.0">
|
||||
<!-- ================================================= -->
|
||||
<!-- Parameters -->
|
||||
<!-- ================================================= -->
|
||||
<parameter name="hotdeployment">true</parameter>
|
||||
<parameter name="hotupdate">false</parameter>
|
||||
<parameter name="enableMTOM">false</parameter>
|
||||
<parameter name="enableSwA">false</parameter>
|
||||
|
||||
<!--Uncomment if you want to enable file caching for attachments -->
|
||||
<!--parameter name="cacheAttachments">true</parameter>
|
||||
<parameter name="attachmentDIR"></parameter>
|
||||
<parameter name="sizeThreshold">4000</parameter-->
|
||||
|
||||
<!--Uncomment if you want to plugin your own attachments lifecycle implementation -->
|
||||
<!--<attachmentsLifecycleManager class="org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl"/>-->
|
||||
|
||||
|
||||
<!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
|
||||
<!--In some server environments, the available memory heap is limited and can fill up under load -->
|
||||
<!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
|
||||
<!--to reduce the memory needed for the cached WSDL definitions. -->
|
||||
<!--parameter name="reduceWSDLMemoryCache">true</parameter-->
|
||||
|
||||
<!--This will give out the timout of the configuration contexts, in milliseconds-->
|
||||
<parameter name="ConfigContextTimeoutInterval">30000</parameter>
|
||||
|
||||
<!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
|
||||
<!--that behavior.-->
|
||||
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>
|
||||
|
||||
<!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
|
||||
<!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
|
||||
<!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
|
||||
<!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
|
||||
<parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
|
||||
|
||||
<parameter name="userName">admin</parameter>
|
||||
<parameter name="password">axis2</parameter>
|
||||
|
||||
<!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
|
||||
<!--ServicesDirectory only works on the following cases-->
|
||||
<!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
|
||||
<!---When creating URL Based configurator with URL file:// -->
|
||||
<!--- War based configurator with expanded case , -->
|
||||
|
||||
<!--All the other scenarios it will be ignored.-->
|
||||
<!--<parameter name="ServicesDirectory">service</parameter>-->
|
||||
<!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
|
||||
<!--<parameter name="ModulesDirectory">modules</parameter>-->
|
||||
|
||||
|
||||
<!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
|
||||
<!--root which can configured using the following contextRoot parameter-->
|
||||
<!--<parameter name="contextRoot">axis2</parameter>-->
|
||||
|
||||
<!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
|
||||
<!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
|
||||
<!--context path to proper Axis2 servlets-->
|
||||
<!--<parameter name="servicePath">services</parameter>-->
|
||||
<!--<parameter name="restPath">rest</parameter>-->
|
||||
|
||||
<!-- Following parameter will completely disable REST handling in Axis2-->
|
||||
<parameter name="disableREST" locked="false">false</parameter>
|
||||
|
||||
<!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
|
||||
<parameter name="disableSOAP12" locked="true">false</parameter>
|
||||
|
||||
<!--POJO deployer , this will alow users to drop .class file and make that into a service-->
|
||||
<deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
|
||||
<deployer extension=".jar" directory="servicejars"
|
||||
class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
|
||||
<deployer extension=".jar" directory="transports"
|
||||
class="org.apache.axis2.deployment.TransportDeployer"/>
|
||||
|
||||
<!--CORBA deployer , this will alow users to invoke remote CORBA services through Axis2-->
|
||||
<!--<deployer extension=".xml" directory="corba" class="org.apache.axis2.corba.deployer.CorbaDeployer"/>-->
|
||||
|
||||
<!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
|
||||
|
||||
|
||||
<!-- Following parameter will set the host name for the epr-->
|
||||
<!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
|
||||
|
||||
<!-- If you have a front end host which exposes this webservice using a different public URL -->
|
||||
<!-- use this parameter to override autodetected url -->
|
||||
<!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
|
||||
|
||||
|
||||
<!-- The way of adding listener to the system-->
|
||||
<!-- <listener class="org.apache.axis2.ObserverIMPL">-->
|
||||
<!-- <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
|
||||
<!-- </listener>-->
|
||||
|
||||
<threadContextMigrators>
|
||||
<threadContextMigrator listId="JAXWS-ThreadContextMigrator-List"
|
||||
class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator"/>
|
||||
</threadContextMigrators>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Message Receivers -->
|
||||
<!-- ================================================= -->
|
||||
<!--This is the default MessageReceiver for the system , if you want to have MessageReceivers for -->
|
||||
<!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
|
||||
<!--any operation -->
|
||||
<!--Note : You can override this for a particular service by adding the same element with your requirement-->
|
||||
<messageReceivers>
|
||||
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
|
||||
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
|
||||
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
|
||||
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
|
||||
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
|
||||
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
|
||||
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
|
||||
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
|
||||
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
|
||||
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
|
||||
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
|
||||
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
|
||||
</messageReceivers>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Message Formatter -->
|
||||
<!-- ================================================= -->
|
||||
<!--Following content type to message formatter mapping can be used to implement support for different message -->
|
||||
<!--format serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
|
||||
<messageFormatters>
|
||||
<messageFormatter contentType="application/x-www-form-urlencoded"
|
||||
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
|
||||
<messageFormatter contentType="multipart/form-data"
|
||||
class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
|
||||
<messageFormatter contentType="application/xml"
|
||||
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
|
||||
<messageFormatter contentType="text/xml"
|
||||
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
|
||||
<messageFormatter contentType="application/soap+xml"
|
||||
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
|
||||
</messageFormatters>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Message Builders -->
|
||||
<!-- ================================================= -->
|
||||
<!--Following content type to builder mapping can be used to implement support for different message -->
|
||||
<!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
|
||||
<messageBuilders>
|
||||
<messageBuilder contentType="application/xml"
|
||||
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
|
||||
<messageBuilder contentType="application/x-www-form-urlencoded"
|
||||
class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
|
||||
<messageBuilder contentType="multipart/form-data"
|
||||
class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
|
||||
</messageBuilders>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Transport Ins -->
|
||||
<!-- ================================================= -->
|
||||
<transportReceiver name="http"
|
||||
class="org.apache.axis2.transport.http.SimpleHTTPServer">
|
||||
<parameter name="port">8080</parameter>
|
||||
<!-- Here is the complete list of supported parameters (see example settings further below):
|
||||
port: the port to listen on (default 6060)
|
||||
hostname: if non-null, url prefix used in reply-to endpoint references (default null)
|
||||
originServer: value of http Server header in outgoing messages (default "Simple-Server/1.1")
|
||||
requestTimeout: value in millis of time that requests can wait for data (default 20000)
|
||||
requestTcpNoDelay: true to maximize performance and minimize latency (default true)
|
||||
false to minimize bandwidth consumption by combining segments
|
||||
requestCoreThreadPoolSize: number of threads available for request processing (unless queue fills up) (default 25)
|
||||
requestMaxThreadPoolSize: number of threads available for request processing if queue fills up (default 150)
|
||||
note that default queue never fills up: see HttpFactory
|
||||
threadKeepAliveTime: time to keep threads in excess of core size alive while inactive (default 180)
|
||||
note that no such threads can exist with default unbounded request queue
|
||||
threadKeepAliveTimeUnit: TimeUnit of value in threadKeepAliveTime (default SECONDS) (default SECONDS)
|
||||
-->
|
||||
<!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
|
||||
<!-- <parameter name="originServer">My-Server/1.1</parameter> -->
|
||||
<!-- <parameter name="requestTimeout">10000</parameter> -->
|
||||
<!-- <parameter name="requestTcpNoDelay">false</parameter> -->
|
||||
<!-- <parameter name="requestCoreThreadPoolSize">50</parameter> -->
|
||||
<!-- <parameter name="requestMaxThreadPoolSize">100</parameter> -->
|
||||
<!-- <parameter name="threadKeepAliveTime">240000</parameter> -->
|
||||
<!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter> -->
|
||||
</transportReceiver>
|
||||
|
||||
<!--Uncomment if you want to have TCP transport support-->
|
||||
<!--transportReceiver name="tcp"
|
||||
class="org.apache.axis2.transport.tcp.TCPServer">
|
||||
<parameter name="port">6060</parameter-->>
|
||||
<!--If you want to give your own host address for EPR generation-->
|
||||
<!--uncomment the following paramter , and set it as you required.-->
|
||||
<!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
|
||||
<!-- /transportReceiver -->
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Transport Outs -->
|
||||
<!-- ================================================= -->
|
||||
|
||||
<!--Uncomment if you want to have TCP transport support-->
|
||||
<!--
|
||||
<transportSender name="tcp"
|
||||
class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
|
||||
-->
|
||||
<transportSender name="local"
|
||||
class="org.apache.axis2.transport.local.LocalTransportSender"/>
|
||||
<transportSender name="http"
|
||||
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
|
||||
<parameter name="PROTOCOL">HTTP/1.1</parameter>
|
||||
<parameter name="Transfer-Encoding">chunked</parameter>
|
||||
|
||||
<!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
|
||||
<!-- <parameter name="OmitSOAP12Action">true</parameter> -->
|
||||
</transportSender>
|
||||
|
||||
<transportSender name="https"
|
||||
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
|
||||
<parameter name="PROTOCOL">HTTP/1.1</parameter>
|
||||
<parameter name="Transfer-Encoding">chunked</parameter>
|
||||
</transportSender>
|
||||
|
||||
<!-- Please enable this if you need the java transport -->
|
||||
<!-- <transportSender name="java"
|
||||
class="org.apache.axis2.transport.java.JavaTransportSender"/> -->
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Global Modules -->
|
||||
<!-- ================================================= -->
|
||||
<!-- Comment this to disable Addressing -->
|
||||
<!-- <module ref="addressing"/> -->
|
||||
|
||||
<!--Configuring module , providing parameters for modules whether they refer or not-->
|
||||
<!--<moduleConfig name="addressing">-->
|
||||
<!--<parameter name="addressingPara">N/A</parameter>-->
|
||||
<!--</moduleConfig>-->
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Clustering -->
|
||||
<!-- ================================================= -->
|
||||
<!--
|
||||
To enable clustering for this node, set the value of "enable" attribute of the "cluster"
|
||||
element to "true". The initilization of a node in the cluster is handled by the class
|
||||
corresponding to the "class" attribute of the "cluster" element. It is also responsible for
|
||||
getting this node to join the cluster.
|
||||
-->
|
||||
<cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager" enable="false">
|
||||
|
||||
<!--
|
||||
This parameter indicates whther the cluster has to be automatically initalized
|
||||
when the AxisConfiguration is built. If set to "true" the initialization will not be
|
||||
done at that stage, and some other party will have to explictly initialize the cluster.
|
||||
-->
|
||||
<parameter name="AvoidInitiation">true</parameter>
|
||||
|
||||
<!--
|
||||
Indicates whether this member is active or not. This will be useful in a setup where
|
||||
members are deployed in ACTIVE and/or PASSIVE configuration
|
||||
-->
|
||||
<parameter name="isActive">true</parameter>
|
||||
|
||||
<!--
|
||||
An implementation of org.apache.axis2.clustering.MembershipListener
|
||||
which will be called on membership changes
|
||||
-->
|
||||
<!--
|
||||
<parameter name="membershipListener">
|
||||
<class>org.apache.axis2.clustering.MembershipListenerImpl</class>
|
||||
<properties>
|
||||
<property name="foo">bar</property>
|
||||
</properties>
|
||||
</parameter>
|
||||
-->
|
||||
|
||||
<!--
|
||||
The membership scheme used in this setup. The only values supported at the moment are
|
||||
"multicast" and "wka"
|
||||
|
||||
1. multicast - membership is automatically discovered using multicasting
|
||||
2. wka - Well-Known Address based multicasting. Membership is discovered with the help
|
||||
of one or more nodes running at a Well-Known Address. New members joining a
|
||||
cluster will first connect to a well-known node, register with the well-known node
|
||||
and get the membership list from it. When new members join, one of the well-known
|
||||
nodes will notify the others in the group. When a member leaves the cluster or
|
||||
is deemed to have left the cluster, it will be detected by the Group Membership
|
||||
Service (GMS) using a TCP ping mechanism.
|
||||
-->
|
||||
<parameter name="membershipScheme">multicast</parameter>
|
||||
|
||||
<!--
|
||||
The clustering domain/group. Nodes in the same group will belong to the same multicast
|
||||
domain. There will not be interference between nodes in different groups.
|
||||
-->
|
||||
<parameter name="domain">apache.axis2.domain</parameter>
|
||||
|
||||
<!--
|
||||
This parameter is only valid when the "mode" parameter is set to application. This indicates
|
||||
the domain in which the the applications being load balanced are deployed.
|
||||
-->
|
||||
<parameter name="applicationDomain">apache.axis2.application.domain</parameter>
|
||||
|
||||
<!--
|
||||
When a Web service request is received, and processed, before the response is sent to the
|
||||
client, should we update the states of all members in the cluster? If the value of
|
||||
this parameter is set to "true", the response to the client will be sent only after
|
||||
all the members have been updated. Obviously, this can be time consuming. In some cases,
|
||||
such this overhead may not be acceptable, in which case the value of this parameter
|
||||
should be set to "false"
|
||||
-->
|
||||
<parameter name="synchronizeAll">true</parameter>
|
||||
|
||||
<!--
|
||||
The maximum number of times we need to retry to send a message to a particular node
|
||||
before giving up and considering that node to be faulty
|
||||
-->
|
||||
<parameter name="maxRetries">10</parameter>
|
||||
|
||||
<!-- The multicast address to be used -->
|
||||
<parameter name="mcastAddress">228.0.0.4</parameter>
|
||||
|
||||
<!-- The multicast port to be used -->
|
||||
<parameter name="mcastPort">45564</parameter>
|
||||
|
||||
<!-- The frequency of sending membership multicast messages (in ms) -->
|
||||
<parameter name="mcastFrequency">500</parameter>
|
||||
|
||||
<!-- The time interval within which if a member does not respond, the member will be
|
||||
deemed to have left the group (in ms)
|
||||
-->
|
||||
<parameter name="memberDropTime">3000</parameter>
|
||||
|
||||
<!--
|
||||
The IP address of the network interface to which the multicasting has to be bound to.
|
||||
Multicasting would be done using this interface.
|
||||
-->
|
||||
<parameter name="mcastBindAddress">127.0.0.1</parameter>
|
||||
|
||||
<!-- The host name or IP address of this member -->
|
||||
<parameter name="localMemberHost">127.0.0.1</parameter>
|
||||
|
||||
<!--
|
||||
The TCP port used by this member. This is the port through which other nodes will
|
||||
contact this member
|
||||
-->
|
||||
<parameter name="localMemberPort">4000</parameter>
|
||||
|
||||
<!--
|
||||
Preserve message ordering. This will be done according to sender order.
|
||||
-->
|
||||
<parameter name="preserveMessageOrder">true</parameter>
|
||||
|
||||
<!--
|
||||
Maintain atmost-once message processing semantics
|
||||
-->
|
||||
<parameter name="atmostOnceMessageSemantics">true</parameter>
|
||||
|
||||
<!--
|
||||
The list of static or well-known members. These entries will only be valid if the
|
||||
"membershipScheme" above is set to "wka"
|
||||
-->
|
||||
<members>
|
||||
<member>
|
||||
<hostName>127.0.0.1</hostName>
|
||||
<port>4000</port>
|
||||
</member>
|
||||
<member>
|
||||
<hostName>127.0.0.1</hostName>
|
||||
<port>4001</port>
|
||||
</member>
|
||||
</members>
|
||||
|
||||
<!--
|
||||
Enable the load balancer entry if you need to run this node as a load balancer.
|
||||
Multiple application domains with different LoadBalanceEventHandler implementations
|
||||
can be defined in this section.
|
||||
-->
|
||||
<loadBalancer enable="false">
|
||||
<applicationDomain name="apache.axis2.application.domain"
|
||||
handler="org.apache.axis2.clustering.DefaultLoadBalanceEventHandler"/>
|
||||
</loadBalancer>
|
||||
|
||||
<!--
|
||||
This interface is responsible for handling configuration management.
|
||||
Configuraion changes include:
|
||||
|
||||
1. Rebooting an entire cluster, in which case, all nodes have to load the new
|
||||
Axis2 configuration in a consistent manner
|
||||
2. Deploying a new service to a cluster or undeploying a service from a cluster
|
||||
3. Changing the policies of a service deployed on the cluster
|
||||
|
||||
The "enable" attribute indicates whether Configuration management has been enabled
|
||||
-->
|
||||
<configurationManager
|
||||
class="org.apache.axis2.clustering.configuration.DefaultConfigurationManager"
|
||||
enable="true">
|
||||
<listener
|
||||
class="org.apache.axis2.clustering.configuration.DefaultConfigurationManagerListener"/>
|
||||
</configurationManager>
|
||||
|
||||
<!--
|
||||
This interface is responsible for handling context replication. The property changes in
|
||||
the Axis2 context hierarchy in this node, are propagated to all other nodes in the cluster.
|
||||
|
||||
The "excludes" patterns can be used to specify the prefixes (e.g. local_*) or
|
||||
suffixes (e.g. *_local) of the properties to be excluded from replication. The pattern
|
||||
"*" indicates that all properties in a particular context should not be replicated.
|
||||
|
||||
The "enable" attribute indicates whether context replication has been enabled
|
||||
-->
|
||||
<contextManager class="org.apache.axis2.clustering.context.DefaultContextManager"
|
||||
enable="true">
|
||||
<listener class="org.apache.axis2.clustering.context.DefaultContextManagerListener"/>
|
||||
<replication>
|
||||
<defaults>
|
||||
<exclude name="local_*"/>
|
||||
<exclude name="LOCAL_*"/>
|
||||
</defaults>
|
||||
<context class="org.apache.axis2.context.ConfigurationContext">
|
||||
<exclude name="UseAsyncOperations"/>
|
||||
<exclude name="SequencePropertyBeanMap"/>
|
||||
</context>
|
||||
<context class="org.apache.axis2.context.ServiceGroupContext">
|
||||
<exclude name="my.sandesha.*"/>
|
||||
</context>
|
||||
<context class="org.apache.axis2.context.ServiceContext">
|
||||
<exclude name="my.sandesha.*"/>
|
||||
</context>
|
||||
</replication>
|
||||
</contextManager>
|
||||
</cluster>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Phases -->
|
||||
<!-- ================================================= -->
|
||||
<phaseOrder type="InFlow">
|
||||
<!-- System predefined phases -->
|
||||
<phase name="Transport">
|
||||
<handler name="RequestURIBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
|
||||
<order phase="Transport"/>
|
||||
</handler>
|
||||
<handler name="SOAPActionBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
|
||||
<order phase="Transport"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<phase name="Addressing">
|
||||
<handler name="AddressingBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
|
||||
<order phase="Addressing"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<!-- needs to be before the X509 cert is removed -->
|
||||
<phase name="ec2authentication">
|
||||
<handler name="InFlowEC2Auth"
|
||||
class="com.cloud.bridge.auth.ec2.AuthenticationHandler">
|
||||
<order phase="ec2authentication"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<phase name="Security"/>
|
||||
<phase name="PreDispatch"/>
|
||||
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
|
||||
<handler name="RequestURIBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
|
||||
<handler name="SOAPActionBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
|
||||
<handler name="RequestURIOperationDispatcher"
|
||||
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
|
||||
<handler name="SOAPMessageBodyBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
|
||||
<handler name="HTTPLocationBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
|
||||
<handler name="GenericProviderDispatcher"
|
||||
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
|
||||
<handler name="MustUnderstandValidationDispatcher"
|
||||
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
|
||||
</phase>
|
||||
<phase name="RMPhase"/>
|
||||
<!-- System predefined phases -->
|
||||
<!-- After Postdispatch phase module author or service author can add any phase he want -->
|
||||
<phase name="OperationInPhase">
|
||||
<handler name="MustUnderstandChecker"
|
||||
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
|
||||
<order phase="OperationInPhase"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<phase name="s3authentication">
|
||||
<handler name="InFlowS3Auth"
|
||||
class="com.cloud.bridge.auth.s3.AuthenticationHandler">
|
||||
<order phase="s3authentication"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<phase name="soapmonitorPhase"/>
|
||||
</phaseOrder>
|
||||
<phaseOrder type="OutFlow">
|
||||
<!-- user can add his own phases to this area -->
|
||||
<phase name="soapmonitorPhase"/>
|
||||
<phase name="OperationOutPhase"/>
|
||||
<!--system predefined phase-->
|
||||
<!--these phase will run irrespective of the service-->
|
||||
<phase name="RMPhase"/>
|
||||
<phase name="PolicyDetermination"/>
|
||||
<phase name="MessageOut"/>
|
||||
<phase name="Security"/>
|
||||
</phaseOrder>
|
||||
<phaseOrder type="InFaultFlow">
|
||||
<phase name="Addressing">
|
||||
<handler name="AddressingBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
|
||||
<order phase="Addressing"/>
|
||||
</handler>
|
||||
</phase>
|
||||
<phase name="Security"/>
|
||||
<phase name="PreDispatch"/>
|
||||
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
|
||||
<handler name="RequestURIBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
|
||||
<handler name="SOAPActionBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
|
||||
<handler name="RequestURIOperationDispatcher"
|
||||
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
|
||||
<handler name="SOAPMessageBodyBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
|
||||
<handler name="HTTPLocationBasedDispatcher"
|
||||
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
|
||||
<handler name="GenericProviderDispatcher"
|
||||
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
|
||||
<handler name="MustUnderstandValidationDispatcher"
|
||||
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
|
||||
</phase>
|
||||
<phase name="RMPhase"/>
|
||||
<!-- user can add his own phases to this area -->
|
||||
<phase name="OperationInFaultPhase"/>
|
||||
<phase name="soapmonitorPhase"/>
|
||||
</phaseOrder>
|
||||
<phaseOrder type="OutFaultFlow">
|
||||
<!-- user can add his own phases to this area -->
|
||||
<phase name="soapmonitorPhase"/>
|
||||
<phase name="OperationOutFaultPhase"/>
|
||||
<phase name="RMPhase"/>
|
||||
<phase name="PolicyDetermination"/>
|
||||
<phase name="MessageOut"/>
|
||||
<phase name="Security"/>
|
||||
</phaseOrder>
|
||||
</axisconfig>
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
java -cp cloud-tool.jar;./lib/XmlSchema-1.4.3.jar;./lib/antlr-2.7.6.jar;./lib/apache-log4j-extras-1.0.jar;./lib/axiom-api-1.2.8.jar;./lib/axiom-impl-1.2.8.jar;./lib/axis2-adb-1.5.1.jar;./lib/axis2-ant-plugin-1.5.1.jar;./lib/axis2-jaxbri-1.5.1.jar;./lib/axis2-jaxws-1.5.1.jar;./lib/axis2-jibx-1.5.1.jar;./lib/axis2-json-1.5.1.jar;./lib/axis2-kernel-1.5.1.jar;./lib/axis2-transport-http-1.5.1.jar;./lib/axis2-transport-local-1.5.1.jar;./lib/commons-codec-1.3.jar;./lib/commons-collections-3.1.jar;./lib/commons-fileupload-1.2.jar;./lib/commons-httpclient-3.1.jar;./lib/commons-io-1.4.jar;./lib/commons-logging-1.1.1.jar;./lib/dom4j-1.6.1.jar;./lib/hibernate3.jar;./lib/httpcore-4.0.jar;./lib/javassist-3.9.0.GA.jar;./lib/jta-1.1.jar;./lib/junit-4.8.1.jar;./lib/log4j-1.2.15.jar;./lib/mail-1.4.jar;./lib/mysql-connector-java-5.1.7-bin.jar;./lib/neethi-2.0.4.jar;./lib/servlet-api.jar;./lib/slf4j-api-1.5.11.jar;./lib/slf4j-simple-1.5.11.jar;./lib/wsdl4j-1.6.2.jar com.cloud.gate.tool.CloudS3CmdTool %*
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
CP=.
|
||||
for file in lib/*.jar
|
||||
do
|
||||
CP=${CP}:$file
|
||||
done
|
||||
|
||||
java -cp $CP:./cloud-tool.jar com.cloud.gate.tool.CloudS3CmdTool $@
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* ActivateLicense.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* ActivateLicense bean class
|
||||
*/
|
||||
|
||||
public class ActivateLicense
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"ActivateLicense",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for ActivateLicense
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.ActivateLicenseType localActivateLicense ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.ActivateLicenseType
|
||||
*/
|
||||
public com.amazon.ec2.ActivateLicenseType getActivateLicense(){
|
||||
return localActivateLicense;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param ActivateLicense
|
||||
*/
|
||||
public void setActivateLicense(com.amazon.ec2.ActivateLicenseType param){
|
||||
|
||||
this.localActivateLicense=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
ActivateLicense.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localActivateLicense==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localActivateLicense.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localActivateLicense.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static ActivateLicense parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
ActivateLicense object =
|
||||
new ActivateLicense();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","ActivateLicense").equals(reader.getName())){
|
||||
|
||||
object.setActivateLicense(com.amazon.ec2.ActivateLicenseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* ActivateLicenseResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* ActivateLicenseResponse bean class
|
||||
*/
|
||||
|
||||
public class ActivateLicenseResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"ActivateLicenseResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for ActivateLicenseResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.ActivateLicenseResponseType localActivateLicenseResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.ActivateLicenseResponseType
|
||||
*/
|
||||
public com.amazon.ec2.ActivateLicenseResponseType getActivateLicenseResponse(){
|
||||
return localActivateLicenseResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param ActivateLicenseResponse
|
||||
*/
|
||||
public void setActivateLicenseResponse(com.amazon.ec2.ActivateLicenseResponseType param){
|
||||
|
||||
this.localActivateLicenseResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
ActivateLicenseResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localActivateLicenseResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localActivateLicenseResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localActivateLicenseResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static ActivateLicenseResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
ActivateLicenseResponse object =
|
||||
new ActivateLicenseResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","ActivateLicenseResponse").equals(reader.getName())){
|
||||
|
||||
object.setActivateLicenseResponse(com.amazon.ec2.ActivateLicenseResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,567 @@
|
|||
|
||||
/**
|
||||
* ActivateLicenseResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* ActivateLicenseResponseType bean class
|
||||
*/
|
||||
|
||||
public class ActivateLicenseResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = ActivateLicenseResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for _return
|
||||
*/
|
||||
|
||||
|
||||
protected boolean local_return ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean get_return(){
|
||||
return local_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param _return
|
||||
*/
|
||||
public void set_return(boolean param){
|
||||
|
||||
this.local_return=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
ActivateLicenseResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":ActivateLicenseResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"ActivateLicenseResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"return", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"return");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("return");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("return cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"return"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static ActivateLicenseResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
ActivateLicenseResponseType object =
|
||||
new ActivateLicenseResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"ActivateLicenseResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (ActivateLicenseResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","return").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.set_return(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,567 @@
|
|||
|
||||
/**
|
||||
* ActivateLicenseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* ActivateLicenseType bean class
|
||||
*/
|
||||
|
||||
public class ActivateLicenseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = ActivateLicenseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for LicenseId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localLicenseId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getLicenseId(){
|
||||
return localLicenseId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param LicenseId
|
||||
*/
|
||||
public void setLicenseId(java.lang.String param){
|
||||
|
||||
this.localLicenseId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Capacity
|
||||
*/
|
||||
|
||||
|
||||
protected int localCapacity ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return int
|
||||
*/
|
||||
public int getCapacity(){
|
||||
return localCapacity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Capacity
|
||||
*/
|
||||
public void setCapacity(int param){
|
||||
|
||||
this.localCapacity=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
ActivateLicenseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":ActivateLicenseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"ActivateLicenseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"licenseId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"licenseId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("licenseId");
|
||||
}
|
||||
|
||||
|
||||
if (localLicenseId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("licenseId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localLicenseId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"capacity", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"capacity");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("capacity");
|
||||
}
|
||||
|
||||
if (localCapacity==java.lang.Integer.MIN_VALUE) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("capacity cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCapacity));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"licenseId"));
|
||||
|
||||
if (localLicenseId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLicenseId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("licenseId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"capacity"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCapacity));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static ActivateLicenseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
ActivateLicenseType object =
|
||||
new ActivateLicenseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"ActivateLicenseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (ActivateLicenseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","licenseId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setLicenseId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","capacity").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setCapacity(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AllocateAddress.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AllocateAddress bean class
|
||||
*/
|
||||
|
||||
public class AllocateAddress
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AllocateAddress",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AllocateAddress
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AllocateAddressType localAllocateAddress ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AllocateAddressType
|
||||
*/
|
||||
public com.amazon.ec2.AllocateAddressType getAllocateAddress(){
|
||||
return localAllocateAddress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AllocateAddress
|
||||
*/
|
||||
public void setAllocateAddress(com.amazon.ec2.AllocateAddressType param){
|
||||
|
||||
this.localAllocateAddress=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AllocateAddress.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAllocateAddress==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAllocateAddress.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAllocateAddress.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AllocateAddress parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AllocateAddress object =
|
||||
new AllocateAddress();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AllocateAddress").equals(reader.getName())){
|
||||
|
||||
object.setAllocateAddress(com.amazon.ec2.AllocateAddressType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AllocateAddressResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AllocateAddressResponse bean class
|
||||
*/
|
||||
|
||||
public class AllocateAddressResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AllocateAddressResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AllocateAddressResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AllocateAddressResponseType localAllocateAddressResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AllocateAddressResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AllocateAddressResponseType getAllocateAddressResponse(){
|
||||
return localAllocateAddressResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AllocateAddressResponse
|
||||
*/
|
||||
public void setAllocateAddressResponse(com.amazon.ec2.AllocateAddressResponseType param){
|
||||
|
||||
this.localAllocateAddressResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AllocateAddressResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAllocateAddressResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAllocateAddressResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAllocateAddressResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AllocateAddressResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AllocateAddressResponse object =
|
||||
new AllocateAddressResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AllocateAddressResponse").equals(reader.getName())){
|
||||
|
||||
object.setAllocateAddressResponse(com.amazon.ec2.AllocateAddressResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
|
||||
/**
|
||||
* AllocateAddressResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AllocateAddressResponseType bean class
|
||||
*/
|
||||
|
||||
public class AllocateAddressResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AllocateAddressResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for PublicIp
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localPublicIp ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getPublicIp(){
|
||||
return localPublicIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param PublicIp
|
||||
*/
|
||||
public void setPublicIp(java.lang.String param){
|
||||
|
||||
this.localPublicIp=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AllocateAddressResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AllocateAddressResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AllocateAddressResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"publicIp", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"publicIp");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("publicIp");
|
||||
}
|
||||
|
||||
|
||||
if (localPublicIp==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("publicIp cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localPublicIp);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"publicIp"));
|
||||
|
||||
if (localPublicIp != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPublicIp));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("publicIp cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AllocateAddressResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AllocateAddressResponseType object =
|
||||
new AllocateAddressResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AllocateAddressResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AllocateAddressResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","publicIp").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setPublicIp(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,384 @@
|
|||
|
||||
/**
|
||||
* AllocateAddressType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AllocateAddressType bean class
|
||||
*/
|
||||
|
||||
public class AllocateAddressType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AllocateAddressType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AllocateAddressType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AllocateAddressType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AllocateAddressType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AllocateAddressType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AllocateAddressType object =
|
||||
new AllocateAddressType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AllocateAddressType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AllocateAddressType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AssociateAddress.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateAddress bean class
|
||||
*/
|
||||
|
||||
public class AssociateAddress
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AssociateAddress",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AssociateAddress
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AssociateAddressType localAssociateAddress ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AssociateAddressType
|
||||
*/
|
||||
public com.amazon.ec2.AssociateAddressType getAssociateAddress(){
|
||||
return localAssociateAddress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AssociateAddress
|
||||
*/
|
||||
public void setAssociateAddress(com.amazon.ec2.AssociateAddressType param){
|
||||
|
||||
this.localAssociateAddress=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateAddress.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAssociateAddress==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAssociateAddress.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAssociateAddress.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateAddress parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateAddress object =
|
||||
new AssociateAddress();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AssociateAddress").equals(reader.getName())){
|
||||
|
||||
object.setAssociateAddress(com.amazon.ec2.AssociateAddressType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AssociateAddressResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateAddressResponse bean class
|
||||
*/
|
||||
|
||||
public class AssociateAddressResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AssociateAddressResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AssociateAddressResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AssociateAddressResponseType localAssociateAddressResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AssociateAddressResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AssociateAddressResponseType getAssociateAddressResponse(){
|
||||
return localAssociateAddressResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AssociateAddressResponse
|
||||
*/
|
||||
public void setAssociateAddressResponse(com.amazon.ec2.AssociateAddressResponseType param){
|
||||
|
||||
this.localAssociateAddressResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateAddressResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAssociateAddressResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAssociateAddressResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAssociateAddressResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateAddressResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateAddressResponse object =
|
||||
new AssociateAddressResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AssociateAddressResponse").equals(reader.getName())){
|
||||
|
||||
object.setAssociateAddressResponse(com.amazon.ec2.AssociateAddressResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,567 @@
|
|||
|
||||
/**
|
||||
* AssociateAddressResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateAddressResponseType bean class
|
||||
*/
|
||||
|
||||
public class AssociateAddressResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AssociateAddressResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for _return
|
||||
*/
|
||||
|
||||
|
||||
protected boolean local_return ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean get_return(){
|
||||
return local_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param _return
|
||||
*/
|
||||
public void set_return(boolean param){
|
||||
|
||||
this.local_return=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateAddressResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AssociateAddressResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AssociateAddressResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"return", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"return");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("return");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("return cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"return"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateAddressResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateAddressResponseType object =
|
||||
new AssociateAddressResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AssociateAddressResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AssociateAddressResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","return").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.set_return(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
|
||||
/**
|
||||
* AssociateAddressType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateAddressType bean class
|
||||
*/
|
||||
|
||||
public class AssociateAddressType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AssociateAddressType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for PublicIp
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localPublicIp ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getPublicIp(){
|
||||
return localPublicIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param PublicIp
|
||||
*/
|
||||
public void setPublicIp(java.lang.String param){
|
||||
|
||||
this.localPublicIp=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for InstanceId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localInstanceId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getInstanceId(){
|
||||
return localInstanceId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param InstanceId
|
||||
*/
|
||||
public void setInstanceId(java.lang.String param){
|
||||
|
||||
this.localInstanceId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateAddressType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AssociateAddressType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AssociateAddressType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"publicIp", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"publicIp");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("publicIp");
|
||||
}
|
||||
|
||||
|
||||
if (localPublicIp==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("publicIp cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localPublicIp);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"instanceId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"instanceId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("instanceId");
|
||||
}
|
||||
|
||||
|
||||
if (localInstanceId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localInstanceId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"publicIp"));
|
||||
|
||||
if (localPublicIp != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPublicIp));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("publicIp cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"instanceId"));
|
||||
|
||||
if (localInstanceId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localInstanceId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateAddressType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateAddressType object =
|
||||
new AssociateAddressType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AssociateAddressType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AssociateAddressType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","publicIp").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setPublicIp(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","instanceId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setInstanceId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AssociateDhcpOptions.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateDhcpOptions bean class
|
||||
*/
|
||||
|
||||
public class AssociateDhcpOptions
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AssociateDhcpOptions",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AssociateDhcpOptions
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AssociateDhcpOptionsType localAssociateDhcpOptions ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AssociateDhcpOptionsType
|
||||
*/
|
||||
public com.amazon.ec2.AssociateDhcpOptionsType getAssociateDhcpOptions(){
|
||||
return localAssociateDhcpOptions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AssociateDhcpOptions
|
||||
*/
|
||||
public void setAssociateDhcpOptions(com.amazon.ec2.AssociateDhcpOptionsType param){
|
||||
|
||||
this.localAssociateDhcpOptions=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateDhcpOptions.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAssociateDhcpOptions==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAssociateDhcpOptions.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAssociateDhcpOptions.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateDhcpOptions parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateDhcpOptions object =
|
||||
new AssociateDhcpOptions();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AssociateDhcpOptions").equals(reader.getName())){
|
||||
|
||||
object.setAssociateDhcpOptions(com.amazon.ec2.AssociateDhcpOptionsType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AssociateDhcpOptionsResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateDhcpOptionsResponse bean class
|
||||
*/
|
||||
|
||||
public class AssociateDhcpOptionsResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AssociateDhcpOptionsResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AssociateDhcpOptionsResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AssociateDhcpOptionsResponseType localAssociateDhcpOptionsResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AssociateDhcpOptionsResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AssociateDhcpOptionsResponseType getAssociateDhcpOptionsResponse(){
|
||||
return localAssociateDhcpOptionsResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AssociateDhcpOptionsResponse
|
||||
*/
|
||||
public void setAssociateDhcpOptionsResponse(com.amazon.ec2.AssociateDhcpOptionsResponseType param){
|
||||
|
||||
this.localAssociateDhcpOptionsResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateDhcpOptionsResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAssociateDhcpOptionsResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAssociateDhcpOptionsResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAssociateDhcpOptionsResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateDhcpOptionsResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateDhcpOptionsResponse object =
|
||||
new AssociateDhcpOptionsResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AssociateDhcpOptionsResponse").equals(reader.getName())){
|
||||
|
||||
object.setAssociateDhcpOptionsResponse(com.amazon.ec2.AssociateDhcpOptionsResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,567 @@
|
|||
|
||||
/**
|
||||
* AssociateDhcpOptionsResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateDhcpOptionsResponseType bean class
|
||||
*/
|
||||
|
||||
public class AssociateDhcpOptionsResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AssociateDhcpOptionsResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for _return
|
||||
*/
|
||||
|
||||
|
||||
protected boolean local_return ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean get_return(){
|
||||
return local_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param _return
|
||||
*/
|
||||
public void set_return(boolean param){
|
||||
|
||||
this.local_return=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateDhcpOptionsResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AssociateDhcpOptionsResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AssociateDhcpOptionsResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"return", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"return");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("return");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("return cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"return"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateDhcpOptionsResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateDhcpOptionsResponseType object =
|
||||
new AssociateDhcpOptionsResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AssociateDhcpOptionsResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AssociateDhcpOptionsResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","return").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.set_return(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
|
||||
/**
|
||||
* AssociateDhcpOptionsType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AssociateDhcpOptionsType bean class
|
||||
*/
|
||||
|
||||
public class AssociateDhcpOptionsType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AssociateDhcpOptionsType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for DhcpOptionsId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localDhcpOptionsId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getDhcpOptionsId(){
|
||||
return localDhcpOptionsId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param DhcpOptionsId
|
||||
*/
|
||||
public void setDhcpOptionsId(java.lang.String param){
|
||||
|
||||
this.localDhcpOptionsId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for VpcId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVpcId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVpcId(){
|
||||
return localVpcId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VpcId
|
||||
*/
|
||||
public void setVpcId(java.lang.String param){
|
||||
|
||||
this.localVpcId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AssociateDhcpOptionsType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AssociateDhcpOptionsType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AssociateDhcpOptionsType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"dhcpOptionsId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"dhcpOptionsId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("dhcpOptionsId");
|
||||
}
|
||||
|
||||
|
||||
if (localDhcpOptionsId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("dhcpOptionsId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localDhcpOptionsId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"vpcId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"vpcId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("vpcId");
|
||||
}
|
||||
|
||||
|
||||
if (localVpcId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVpcId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"dhcpOptionsId"));
|
||||
|
||||
if (localDhcpOptionsId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDhcpOptionsId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("dhcpOptionsId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"vpcId"));
|
||||
|
||||
if (localVpcId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVpcId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AssociateDhcpOptionsType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AssociateDhcpOptionsType object =
|
||||
new AssociateDhcpOptionsType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AssociateDhcpOptionsType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AssociateDhcpOptionsType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","dhcpOptionsId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setDhcpOptionsId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","vpcId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVpcId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AttachVolume.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVolume bean class
|
||||
*/
|
||||
|
||||
public class AttachVolume
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AttachVolume",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachVolume
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachVolumeType localAttachVolume ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachVolumeType
|
||||
*/
|
||||
public com.amazon.ec2.AttachVolumeType getAttachVolume(){
|
||||
return localAttachVolume;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachVolume
|
||||
*/
|
||||
public void setAttachVolume(com.amazon.ec2.AttachVolumeType param){
|
||||
|
||||
this.localAttachVolume=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVolume.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAttachVolume==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAttachVolume.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAttachVolume.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVolume parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVolume object =
|
||||
new AttachVolume();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AttachVolume").equals(reader.getName())){
|
||||
|
||||
object.setAttachVolume(com.amazon.ec2.AttachVolumeType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AttachVolumeResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVolumeResponse bean class
|
||||
*/
|
||||
|
||||
public class AttachVolumeResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AttachVolumeResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachVolumeResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachVolumeResponseType localAttachVolumeResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachVolumeResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AttachVolumeResponseType getAttachVolumeResponse(){
|
||||
return localAttachVolumeResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachVolumeResponse
|
||||
*/
|
||||
public void setAttachVolumeResponse(com.amazon.ec2.AttachVolumeResponseType param){
|
||||
|
||||
this.localAttachVolumeResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVolumeResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAttachVolumeResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAttachVolumeResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAttachVolumeResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVolumeResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVolumeResponse object =
|
||||
new AttachVolumeResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AttachVolumeResponse").equals(reader.getName())){
|
||||
|
||||
object.setAttachVolumeResponse(com.amazon.ec2.AttachVolumeResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,943 @@
|
|||
|
||||
/**
|
||||
* AttachVolumeResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVolumeResponseType bean class
|
||||
*/
|
||||
|
||||
public class AttachVolumeResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachVolumeResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for VolumeId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVolumeId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVolumeId(){
|
||||
return localVolumeId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VolumeId
|
||||
*/
|
||||
public void setVolumeId(java.lang.String param){
|
||||
|
||||
this.localVolumeId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for InstanceId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localInstanceId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getInstanceId(){
|
||||
return localInstanceId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param InstanceId
|
||||
*/
|
||||
public void setInstanceId(java.lang.String param){
|
||||
|
||||
this.localInstanceId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Device
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localDevice ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getDevice(){
|
||||
return localDevice;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Device
|
||||
*/
|
||||
public void setDevice(java.lang.String param){
|
||||
|
||||
this.localDevice=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Status
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localStatus ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getStatus(){
|
||||
return localStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Status
|
||||
*/
|
||||
public void setStatus(java.lang.String param){
|
||||
|
||||
this.localStatus=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachTime
|
||||
*/
|
||||
|
||||
|
||||
protected java.util.Calendar localAttachTime ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.util.Calendar
|
||||
*/
|
||||
public java.util.Calendar getAttachTime(){
|
||||
return localAttachTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachTime
|
||||
*/
|
||||
public void setAttachTime(java.util.Calendar param){
|
||||
|
||||
this.localAttachTime=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVolumeResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachVolumeResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachVolumeResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"volumeId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"volumeId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("volumeId");
|
||||
}
|
||||
|
||||
|
||||
if (localVolumeId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVolumeId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"instanceId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"instanceId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("instanceId");
|
||||
}
|
||||
|
||||
|
||||
if (localInstanceId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localInstanceId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"device", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"device");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("device");
|
||||
}
|
||||
|
||||
|
||||
if (localDevice==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localDevice);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"status", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"status");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("status");
|
||||
}
|
||||
|
||||
|
||||
if (localStatus==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("status cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localStatus);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"attachTime", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"attachTime");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("attachTime");
|
||||
}
|
||||
|
||||
|
||||
if (localAttachTime==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("attachTime cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttachTime));
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"volumeId"));
|
||||
|
||||
if (localVolumeId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVolumeId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"instanceId"));
|
||||
|
||||
if (localInstanceId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localInstanceId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"device"));
|
||||
|
||||
if (localDevice != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDevice));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"status"));
|
||||
|
||||
if (localStatus != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localStatus));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("status cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"attachTime"));
|
||||
|
||||
if (localAttachTime != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttachTime));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("attachTime cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVolumeResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVolumeResponseType object =
|
||||
new AttachVolumeResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachVolumeResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachVolumeResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","volumeId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVolumeId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","instanceId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setInstanceId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","device").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setDevice(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","status").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setStatus(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","attachTime").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setAttachTime(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,667 @@
|
|||
|
||||
/**
|
||||
* AttachVolumeType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVolumeType bean class
|
||||
*/
|
||||
|
||||
public class AttachVolumeType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachVolumeType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for VolumeId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVolumeId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVolumeId(){
|
||||
return localVolumeId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VolumeId
|
||||
*/
|
||||
public void setVolumeId(java.lang.String param){
|
||||
|
||||
this.localVolumeId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for InstanceId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localInstanceId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getInstanceId(){
|
||||
return localInstanceId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param InstanceId
|
||||
*/
|
||||
public void setInstanceId(java.lang.String param){
|
||||
|
||||
this.localInstanceId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Device
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localDevice ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getDevice(){
|
||||
return localDevice;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Device
|
||||
*/
|
||||
public void setDevice(java.lang.String param){
|
||||
|
||||
this.localDevice=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVolumeType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachVolumeType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachVolumeType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"volumeId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"volumeId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("volumeId");
|
||||
}
|
||||
|
||||
|
||||
if (localVolumeId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVolumeId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"instanceId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"instanceId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("instanceId");
|
||||
}
|
||||
|
||||
|
||||
if (localInstanceId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localInstanceId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"device", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"device");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("device");
|
||||
}
|
||||
|
||||
|
||||
if (localDevice==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localDevice);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"volumeId"));
|
||||
|
||||
if (localVolumeId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVolumeId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"instanceId"));
|
||||
|
||||
if (localInstanceId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localInstanceId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"device"));
|
||||
|
||||
if (localDevice != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDevice));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVolumeType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVolumeType object =
|
||||
new AttachVolumeType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachVolumeType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachVolumeType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","volumeId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVolumeId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","instanceId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setInstanceId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","device").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setDevice(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AttachVpnGateway.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVpnGateway bean class
|
||||
*/
|
||||
|
||||
public class AttachVpnGateway
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AttachVpnGateway",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachVpnGateway
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachVpnGatewayType localAttachVpnGateway ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachVpnGatewayType
|
||||
*/
|
||||
public com.amazon.ec2.AttachVpnGatewayType getAttachVpnGateway(){
|
||||
return localAttachVpnGateway;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachVpnGateway
|
||||
*/
|
||||
public void setAttachVpnGateway(com.amazon.ec2.AttachVpnGatewayType param){
|
||||
|
||||
this.localAttachVpnGateway=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVpnGateway.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAttachVpnGateway==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAttachVpnGateway.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAttachVpnGateway.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVpnGateway parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVpnGateway object =
|
||||
new AttachVpnGateway();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AttachVpnGateway").equals(reader.getName())){
|
||||
|
||||
object.setAttachVpnGateway(com.amazon.ec2.AttachVpnGatewayType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AttachVpnGatewayResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVpnGatewayResponse bean class
|
||||
*/
|
||||
|
||||
public class AttachVpnGatewayResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AttachVpnGatewayResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachVpnGatewayResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachVpnGatewayResponseType localAttachVpnGatewayResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachVpnGatewayResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AttachVpnGatewayResponseType getAttachVpnGatewayResponse(){
|
||||
return localAttachVpnGatewayResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachVpnGatewayResponse
|
||||
*/
|
||||
public void setAttachVpnGatewayResponse(com.amazon.ec2.AttachVpnGatewayResponseType param){
|
||||
|
||||
this.localAttachVpnGatewayResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVpnGatewayResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAttachVpnGatewayResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAttachVpnGatewayResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAttachVpnGatewayResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVpnGatewayResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVpnGatewayResponse object =
|
||||
new AttachVpnGatewayResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AttachVpnGatewayResponse").equals(reader.getName())){
|
||||
|
||||
object.setAttachVpnGatewayResponse(com.amazon.ec2.AttachVpnGatewayResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,544 @@
|
|||
|
||||
/**
|
||||
* AttachVpnGatewayResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVpnGatewayResponseType bean class
|
||||
*/
|
||||
|
||||
public class AttachVpnGatewayResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachVpnGatewayResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Attachment
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachmentType localAttachment ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachmentType
|
||||
*/
|
||||
public com.amazon.ec2.AttachmentType getAttachment(){
|
||||
return localAttachment;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Attachment
|
||||
*/
|
||||
public void setAttachment(com.amazon.ec2.AttachmentType param){
|
||||
|
||||
this.localAttachment=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVpnGatewayResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachVpnGatewayResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachVpnGatewayResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
if (localAttachment==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("attachment cannot be null!!");
|
||||
}
|
||||
localAttachment.serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","attachment"),
|
||||
factory,xmlWriter);
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"attachment"));
|
||||
|
||||
|
||||
if (localAttachment==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("attachment cannot be null!!");
|
||||
}
|
||||
elementList.add(localAttachment);
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVpnGatewayResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVpnGatewayResponseType object =
|
||||
new AttachVpnGatewayResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachVpnGatewayResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachVpnGatewayResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","attachment").equals(reader.getName())){
|
||||
|
||||
object.setAttachment(com.amazon.ec2.AttachmentType.Factory.parse(reader));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
|
||||
/**
|
||||
* AttachVpnGatewayType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachVpnGatewayType bean class
|
||||
*/
|
||||
|
||||
public class AttachVpnGatewayType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachVpnGatewayType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for VpnGatewayId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVpnGatewayId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVpnGatewayId(){
|
||||
return localVpnGatewayId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VpnGatewayId
|
||||
*/
|
||||
public void setVpnGatewayId(java.lang.String param){
|
||||
|
||||
this.localVpnGatewayId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for VpcId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVpcId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVpcId(){
|
||||
return localVpcId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VpcId
|
||||
*/
|
||||
public void setVpcId(java.lang.String param){
|
||||
|
||||
this.localVpcId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachVpnGatewayType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachVpnGatewayType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachVpnGatewayType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"vpnGatewayId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"vpnGatewayId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("vpnGatewayId");
|
||||
}
|
||||
|
||||
|
||||
if (localVpnGatewayId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("vpnGatewayId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVpnGatewayId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"vpcId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"vpcId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("vpcId");
|
||||
}
|
||||
|
||||
|
||||
if (localVpcId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVpcId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"vpnGatewayId"));
|
||||
|
||||
if (localVpnGatewayId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVpnGatewayId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("vpnGatewayId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"vpcId"));
|
||||
|
||||
if (localVpcId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVpcId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachVpnGatewayType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachVpnGatewayType object =
|
||||
new AttachVpnGatewayType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachVpnGatewayType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachVpnGatewayType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","vpnGatewayId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVpnGatewayId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","vpcId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVpcId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,935 @@
|
|||
|
||||
/**
|
||||
* AttachmentSetItemResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachmentSetItemResponseType bean class
|
||||
*/
|
||||
|
||||
public class AttachmentSetItemResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachmentSetItemResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for VolumeId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVolumeId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVolumeId(){
|
||||
return localVolumeId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VolumeId
|
||||
*/
|
||||
public void setVolumeId(java.lang.String param){
|
||||
|
||||
this.localVolumeId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for InstanceId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localInstanceId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getInstanceId(){
|
||||
return localInstanceId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param InstanceId
|
||||
*/
|
||||
public void setInstanceId(java.lang.String param){
|
||||
|
||||
this.localInstanceId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Device
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localDevice ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getDevice(){
|
||||
return localDevice;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Device
|
||||
*/
|
||||
public void setDevice(java.lang.String param){
|
||||
|
||||
this.localDevice=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for Status
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localStatus ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getStatus(){
|
||||
return localStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Status
|
||||
*/
|
||||
public void setStatus(java.lang.String param){
|
||||
|
||||
this.localStatus=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for AttachTime
|
||||
*/
|
||||
|
||||
|
||||
protected java.util.Calendar localAttachTime ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.util.Calendar
|
||||
*/
|
||||
public java.util.Calendar getAttachTime(){
|
||||
return localAttachTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AttachTime
|
||||
*/
|
||||
public void setAttachTime(java.util.Calendar param){
|
||||
|
||||
this.localAttachTime=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for DeleteOnTermination
|
||||
*/
|
||||
|
||||
|
||||
protected boolean localDeleteOnTermination ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean getDeleteOnTermination(){
|
||||
return localDeleteOnTermination;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param DeleteOnTermination
|
||||
*/
|
||||
public void setDeleteOnTermination(boolean param){
|
||||
|
||||
this.localDeleteOnTermination=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachmentSetItemResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachmentSetItemResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachmentSetItemResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"volumeId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"volumeId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("volumeId");
|
||||
}
|
||||
|
||||
|
||||
if (localVolumeId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVolumeId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"instanceId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"instanceId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("instanceId");
|
||||
}
|
||||
|
||||
|
||||
if (localInstanceId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localInstanceId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"device", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"device");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("device");
|
||||
}
|
||||
|
||||
|
||||
if (localDevice==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localDevice);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"status", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"status");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("status");
|
||||
}
|
||||
|
||||
|
||||
if (localStatus==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("status cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localStatus);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"attachTime", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"attachTime");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("attachTime");
|
||||
}
|
||||
|
||||
|
||||
if (localAttachTime==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("attachTime cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttachTime));
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"deleteOnTermination", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"deleteOnTermination");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("deleteOnTermination");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("deleteOnTermination cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDeleteOnTermination));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"volumeId"));
|
||||
|
||||
if (localVolumeId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVolumeId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("volumeId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"instanceId"));
|
||||
|
||||
if (localInstanceId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localInstanceId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("instanceId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"device"));
|
||||
|
||||
if (localDevice != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDevice));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("device cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"status"));
|
||||
|
||||
if (localStatus != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localStatus));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("status cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"attachTime"));
|
||||
|
||||
if (localAttachTime != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttachTime));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("attachTime cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"deleteOnTermination"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDeleteOnTermination));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachmentSetItemResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachmentSetItemResponseType object =
|
||||
new AttachmentSetItemResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachmentSetItemResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachmentSetItemResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","volumeId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVolumeId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","instanceId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setInstanceId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","device").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setDevice(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","status").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setStatus(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","attachTime").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setAttachTime(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","deleteOnTermination").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setDeleteOnTermination(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
|
||||
/**
|
||||
* AttachmentSetResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachmentSetResponseType bean class
|
||||
*/
|
||||
|
||||
public class AttachmentSetResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachmentSetResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Item
|
||||
* This was an Array!
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachmentSetItemResponseType[] localItem ;
|
||||
|
||||
/* This tracker boolean wil be used to detect whether the user called the set method
|
||||
* for this attribute. It will be used to determine whether to include this field
|
||||
* in the serialized XML
|
||||
*/
|
||||
protected boolean localItemTracker = false ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachmentSetItemResponseType[]
|
||||
*/
|
||||
public com.amazon.ec2.AttachmentSetItemResponseType[] getItem(){
|
||||
return localItem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* validate the array for Item
|
||||
*/
|
||||
protected void validateItem(com.amazon.ec2.AttachmentSetItemResponseType[] param){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Item
|
||||
*/
|
||||
public void setItem(com.amazon.ec2.AttachmentSetItemResponseType[] param){
|
||||
|
||||
validateItem(param);
|
||||
|
||||
|
||||
if (param != null){
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
} else {
|
||||
localItemTracker = false;
|
||||
|
||||
}
|
||||
|
||||
this.localItem=param;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated add method for the array for convenience
|
||||
* @param param com.amazon.ec2.AttachmentSetItemResponseType
|
||||
*/
|
||||
public void addItem(com.amazon.ec2.AttachmentSetItemResponseType param){
|
||||
if (localItem == null){
|
||||
localItem = new com.amazon.ec2.AttachmentSetItemResponseType[]{};
|
||||
}
|
||||
|
||||
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
|
||||
|
||||
java.util.List list =
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);
|
||||
list.add(param);
|
||||
this.localItem =
|
||||
(com.amazon.ec2.AttachmentSetItemResponseType[])list.toArray(
|
||||
new com.amazon.ec2.AttachmentSetItemResponseType[list.size()]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachmentSetResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachmentSetResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachmentSetResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (localItemTracker){
|
||||
if (localItem!=null){
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
if (localItem[i] != null){
|
||||
localItem[i].serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item"),
|
||||
factory,xmlWriter);
|
||||
} else {
|
||||
|
||||
// we don't have to do any thing since minOccures is zero
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
if (localItemTracker){
|
||||
if (localItem!=null) {
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
|
||||
if (localItem[i] != null){
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"item"));
|
||||
elementList.add(localItem[i]);
|
||||
} else {
|
||||
|
||||
// nothing to do
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachmentSetResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachmentSetResponseType object =
|
||||
new AttachmentSetResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachmentSetResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachmentSetResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
java.util.ArrayList list1 = new java.util.ArrayList();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
|
||||
|
||||
|
||||
// Process the array and step past its final element's end.
|
||||
list1.add(com.amazon.ec2.AttachmentSetItemResponseType.Factory.parse(reader));
|
||||
|
||||
//loop until we find a start element that is not part of this array
|
||||
boolean loopDone1 = false;
|
||||
while(!loopDone1){
|
||||
// We should be at the end element, but make sure
|
||||
while (!reader.isEndElement())
|
||||
reader.next();
|
||||
// Step out of this element
|
||||
reader.next();
|
||||
// Step to next element event.
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
if (reader.isEndElement()){
|
||||
//two continuous end elements means we are exiting the xml structure
|
||||
loopDone1 = true;
|
||||
} else {
|
||||
if (new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
list1.add(com.amazon.ec2.AttachmentSetItemResponseType.Factory.parse(reader));
|
||||
|
||||
}else{
|
||||
loopDone1 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// call the converter utility to convert and set the array
|
||||
|
||||
object.setItem((com.amazon.ec2.AttachmentSetItemResponseType[])
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
|
||||
com.amazon.ec2.AttachmentSetItemResponseType.class,
|
||||
list1));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
|
||||
/**
|
||||
* AttachmentSetType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachmentSetType bean class
|
||||
*/
|
||||
|
||||
public class AttachmentSetType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachmentSetType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Item
|
||||
* This was an Array!
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AttachmentType[] localItem ;
|
||||
|
||||
/* This tracker boolean wil be used to detect whether the user called the set method
|
||||
* for this attribute. It will be used to determine whether to include this field
|
||||
* in the serialized XML
|
||||
*/
|
||||
protected boolean localItemTracker = false ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AttachmentType[]
|
||||
*/
|
||||
public com.amazon.ec2.AttachmentType[] getItem(){
|
||||
return localItem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* validate the array for Item
|
||||
*/
|
||||
protected void validateItem(com.amazon.ec2.AttachmentType[] param){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Item
|
||||
*/
|
||||
public void setItem(com.amazon.ec2.AttachmentType[] param){
|
||||
|
||||
validateItem(param);
|
||||
|
||||
|
||||
if (param != null){
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
} else {
|
||||
localItemTracker = false;
|
||||
|
||||
}
|
||||
|
||||
this.localItem=param;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated add method for the array for convenience
|
||||
* @param param com.amazon.ec2.AttachmentType
|
||||
*/
|
||||
public void addItem(com.amazon.ec2.AttachmentType param){
|
||||
if (localItem == null){
|
||||
localItem = new com.amazon.ec2.AttachmentType[]{};
|
||||
}
|
||||
|
||||
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
|
||||
|
||||
java.util.List list =
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);
|
||||
list.add(param);
|
||||
this.localItem =
|
||||
(com.amazon.ec2.AttachmentType[])list.toArray(
|
||||
new com.amazon.ec2.AttachmentType[list.size()]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachmentSetType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachmentSetType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachmentSetType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (localItemTracker){
|
||||
if (localItem!=null){
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
if (localItem[i] != null){
|
||||
localItem[i].serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item"),
|
||||
factory,xmlWriter);
|
||||
} else {
|
||||
|
||||
// we don't have to do any thing since minOccures is zero
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
if (localItemTracker){
|
||||
if (localItem!=null) {
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
|
||||
if (localItem[i] != null){
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"item"));
|
||||
elementList.add(localItem[i]);
|
||||
} else {
|
||||
|
||||
// nothing to do
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachmentSetType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachmentSetType object =
|
||||
new AttachmentSetType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachmentSetType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachmentSetType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
java.util.ArrayList list1 = new java.util.ArrayList();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
|
||||
|
||||
|
||||
// Process the array and step past its final element's end.
|
||||
list1.add(com.amazon.ec2.AttachmentType.Factory.parse(reader));
|
||||
|
||||
//loop until we find a start element that is not part of this array
|
||||
boolean loopDone1 = false;
|
||||
while(!loopDone1){
|
||||
// We should be at the end element, but make sure
|
||||
while (!reader.isEndElement())
|
||||
reader.next();
|
||||
// Step out of this element
|
||||
reader.next();
|
||||
// Step to next element event.
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
if (reader.isEndElement()){
|
||||
//two continuous end elements means we are exiting the xml structure
|
||||
loopDone1 = true;
|
||||
} else {
|
||||
if (new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
list1.add(com.amazon.ec2.AttachmentType.Factory.parse(reader));
|
||||
|
||||
}else{
|
||||
loopDone1 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// call the converter utility to convert and set the array
|
||||
|
||||
object.setItem((com.amazon.ec2.AttachmentType[])
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
|
||||
com.amazon.ec2.AttachmentType.class,
|
||||
list1));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
|
||||
/**
|
||||
* AttachmentType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttachmentType bean class
|
||||
*/
|
||||
|
||||
public class AttachmentType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttachmentType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for VpcId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localVpcId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getVpcId(){
|
||||
return localVpcId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param VpcId
|
||||
*/
|
||||
public void setVpcId(java.lang.String param){
|
||||
|
||||
this.localVpcId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for State
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localState ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getState(){
|
||||
return localState;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param State
|
||||
*/
|
||||
public void setState(java.lang.String param){
|
||||
|
||||
this.localState=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttachmentType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttachmentType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttachmentType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"vpcId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"vpcId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("vpcId");
|
||||
}
|
||||
|
||||
|
||||
if (localVpcId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localVpcId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"state", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"state");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("state");
|
||||
}
|
||||
|
||||
|
||||
if (localState==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("state cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localState);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"vpcId"));
|
||||
|
||||
if (localVpcId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVpcId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("vpcId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"state"));
|
||||
|
||||
if (localState != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localState));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("state cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttachmentType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttachmentType object =
|
||||
new AttachmentType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttachmentType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttachmentType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","vpcId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setVpcId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","state").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setState(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,475 @@
|
|||
|
||||
/**
|
||||
* AttributeBooleanValueType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttributeBooleanValueType bean class
|
||||
*/
|
||||
|
||||
public class AttributeBooleanValueType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttributeBooleanValueType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Value
|
||||
*/
|
||||
|
||||
|
||||
protected boolean localValue ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean getValue(){
|
||||
return localValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Value
|
||||
*/
|
||||
public void setValue(boolean param){
|
||||
|
||||
this.localValue=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttributeBooleanValueType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttributeBooleanValueType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttributeBooleanValueType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"value", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"value");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("value");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("value cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localValue));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"value"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localValue));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttributeBooleanValueType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttributeBooleanValueType object =
|
||||
new AttributeBooleanValueType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttributeBooleanValueType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttributeBooleanValueType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","value").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setValue(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,483 @@
|
|||
|
||||
/**
|
||||
* AttributeValueType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AttributeValueType bean class
|
||||
*/
|
||||
|
||||
public class AttributeValueType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AttributeValueType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Value
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localValue ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getValue(){
|
||||
return localValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Value
|
||||
*/
|
||||
public void setValue(java.lang.String param){
|
||||
|
||||
this.localValue=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AttributeValueType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AttributeValueType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AttributeValueType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"value", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"value");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("value");
|
||||
}
|
||||
|
||||
|
||||
if (localValue==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("value cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localValue);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"value"));
|
||||
|
||||
if (localValue != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localValue));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("value cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AttributeValueType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AttributeValueType object =
|
||||
new AttributeValueType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AttributeValueType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AttributeValueType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","value").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setValue(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngress.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngress bean class
|
||||
*/
|
||||
|
||||
public class AuthorizeSecurityGroupIngress
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AuthorizeSecurityGroupIngress",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AuthorizeSecurityGroupIngress
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AuthorizeSecurityGroupIngressType localAuthorizeSecurityGroupIngress ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AuthorizeSecurityGroupIngressType
|
||||
*/
|
||||
public com.amazon.ec2.AuthorizeSecurityGroupIngressType getAuthorizeSecurityGroupIngress(){
|
||||
return localAuthorizeSecurityGroupIngress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AuthorizeSecurityGroupIngress
|
||||
*/
|
||||
public void setAuthorizeSecurityGroupIngress(com.amazon.ec2.AuthorizeSecurityGroupIngressType param){
|
||||
|
||||
this.localAuthorizeSecurityGroupIngress=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AuthorizeSecurityGroupIngress.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAuthorizeSecurityGroupIngress==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAuthorizeSecurityGroupIngress.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAuthorizeSecurityGroupIngress.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AuthorizeSecurityGroupIngress parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AuthorizeSecurityGroupIngress object =
|
||||
new AuthorizeSecurityGroupIngress();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AuthorizeSecurityGroupIngress").equals(reader.getName())){
|
||||
|
||||
object.setAuthorizeSecurityGroupIngress(com.amazon.ec2.AuthorizeSecurityGroupIngressType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressResponse.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressResponse bean class
|
||||
*/
|
||||
|
||||
public class AuthorizeSecurityGroupIngressResponse
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
|
||||
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
|
||||
"http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"AuthorizeSecurityGroupIngressResponse",
|
||||
"ns1");
|
||||
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for AuthorizeSecurityGroupIngressResponse
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AuthorizeSecurityGroupIngressResponseType localAuthorizeSecurityGroupIngressResponse ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AuthorizeSecurityGroupIngressResponseType
|
||||
*/
|
||||
public com.amazon.ec2.AuthorizeSecurityGroupIngressResponseType getAuthorizeSecurityGroupIngressResponse(){
|
||||
return localAuthorizeSecurityGroupIngressResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param AuthorizeSecurityGroupIngressResponse
|
||||
*/
|
||||
public void setAuthorizeSecurityGroupIngressResponse(com.amazon.ec2.AuthorizeSecurityGroupIngressResponseType param){
|
||||
|
||||
this.localAuthorizeSecurityGroupIngressResponse=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AuthorizeSecurityGroupIngressResponse.this.serialize(MY_QNAME,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
MY_QNAME,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
|
||||
if (localAuthorizeSecurityGroupIngressResponse==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("Property cannot be null!");
|
||||
}
|
||||
localAuthorizeSecurityGroupIngressResponse.serialize(MY_QNAME,factory,xmlWriter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
//We can safely assume an element has only one type associated with it
|
||||
return localAuthorizeSecurityGroupIngressResponse.getPullParser(MY_QNAME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AuthorizeSecurityGroupIngressResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AuthorizeSecurityGroupIngressResponse object =
|
||||
new AuthorizeSecurityGroupIngressResponse();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
while(!reader.isEndElement()) {
|
||||
if (reader.isStartElement() ){
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","AuthorizeSecurityGroupIngressResponse").equals(reader.getName())){
|
||||
|
||||
object.setAuthorizeSecurityGroupIngressResponse(com.amazon.ec2.AuthorizeSecurityGroupIngressResponseType.Factory.parse(reader));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
} else {
|
||||
reader.next();
|
||||
}
|
||||
} // end of while loop
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,567 @@
|
|||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressResponseType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressResponseType bean class
|
||||
*/
|
||||
|
||||
public class AuthorizeSecurityGroupIngressResponseType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AuthorizeSecurityGroupIngressResponseType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for RequestId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRequestId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRequestId(){
|
||||
return localRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RequestId
|
||||
*/
|
||||
public void setRequestId(java.lang.String param){
|
||||
|
||||
this.localRequestId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for _return
|
||||
*/
|
||||
|
||||
|
||||
protected boolean local_return ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean get_return(){
|
||||
return local_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param _return
|
||||
*/
|
||||
public void set_return(boolean param){
|
||||
|
||||
this.local_return=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AuthorizeSecurityGroupIngressResponseType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AuthorizeSecurityGroupIngressResponseType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AuthorizeSecurityGroupIngressResponseType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"requestId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"requestId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("requestId");
|
||||
}
|
||||
|
||||
|
||||
if (localRequestId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRequestId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"return", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"return");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("return");
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("return cannot be null!!");
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"requestId"));
|
||||
|
||||
if (localRequestId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("requestId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"return"));
|
||||
|
||||
elementList.add(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AuthorizeSecurityGroupIngressResponseType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AuthorizeSecurityGroupIngressResponseType object =
|
||||
new AuthorizeSecurityGroupIngressResponseType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AuthorizeSecurityGroupIngressResponseType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AuthorizeSecurityGroupIngressResponseType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","requestId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRequestId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","return").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.set_return(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,636 @@
|
|||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AuthorizeSecurityGroupIngressType bean class
|
||||
*/
|
||||
|
||||
public class AuthorizeSecurityGroupIngressType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AuthorizeSecurityGroupIngressType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for UserId
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localUserId ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getUserId(){
|
||||
return localUserId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param UserId
|
||||
*/
|
||||
public void setUserId(java.lang.String param){
|
||||
|
||||
this.localUserId=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for GroupName
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localGroupName ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getGroupName(){
|
||||
return localGroupName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param GroupName
|
||||
*/
|
||||
public void setGroupName(java.lang.String param){
|
||||
|
||||
this.localGroupName=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for IpPermissions
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.IpPermissionSetType localIpPermissions ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.IpPermissionSetType
|
||||
*/
|
||||
public com.amazon.ec2.IpPermissionSetType getIpPermissions(){
|
||||
return localIpPermissions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param IpPermissions
|
||||
*/
|
||||
public void setIpPermissions(com.amazon.ec2.IpPermissionSetType param){
|
||||
|
||||
this.localIpPermissions=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AuthorizeSecurityGroupIngressType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AuthorizeSecurityGroupIngressType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AuthorizeSecurityGroupIngressType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"userId", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"userId");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("userId");
|
||||
}
|
||||
|
||||
|
||||
if (localUserId==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("userId cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localUserId);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"groupName", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"groupName");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("groupName");
|
||||
}
|
||||
|
||||
|
||||
if (localGroupName==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("groupName cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localGroupName);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
if (localIpPermissions==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("ipPermissions cannot be null!!");
|
||||
}
|
||||
localIpPermissions.serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","ipPermissions"),
|
||||
factory,xmlWriter);
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"userId"));
|
||||
|
||||
if (localUserId != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUserId));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("userId cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"groupName"));
|
||||
|
||||
if (localGroupName != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGroupName));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("groupName cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"ipPermissions"));
|
||||
|
||||
|
||||
if (localIpPermissions==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("ipPermissions cannot be null!!");
|
||||
}
|
||||
elementList.add(localIpPermissions);
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AuthorizeSecurityGroupIngressType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AuthorizeSecurityGroupIngressType object =
|
||||
new AuthorizeSecurityGroupIngressType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AuthorizeSecurityGroupIngressType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AuthorizeSecurityGroupIngressType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","userId").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setUserId(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","groupName").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setGroupName(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","ipPermissions").equals(reader.getName())){
|
||||
|
||||
object.setIpPermissions(com.amazon.ec2.IpPermissionSetType.Factory.parse(reader));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,728 @@
|
|||
|
||||
/**
|
||||
* AvailabilityZoneItemType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AvailabilityZoneItemType bean class
|
||||
*/
|
||||
|
||||
public class AvailabilityZoneItemType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AvailabilityZoneItemType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for ZoneName
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localZoneName ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getZoneName(){
|
||||
return localZoneName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param ZoneName
|
||||
*/
|
||||
public void setZoneName(java.lang.String param){
|
||||
|
||||
this.localZoneName=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for ZoneState
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localZoneState ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getZoneState(){
|
||||
return localZoneState;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param ZoneState
|
||||
*/
|
||||
public void setZoneState(java.lang.String param){
|
||||
|
||||
this.localZoneState=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for RegionName
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localRegionName ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getRegionName(){
|
||||
return localRegionName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param RegionName
|
||||
*/
|
||||
public void setRegionName(java.lang.String param){
|
||||
|
||||
this.localRegionName=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* field for MessageSet
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AvailabilityZoneMessageSetType localMessageSet ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AvailabilityZoneMessageSetType
|
||||
*/
|
||||
public com.amazon.ec2.AvailabilityZoneMessageSetType getMessageSet(){
|
||||
return localMessageSet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param MessageSet
|
||||
*/
|
||||
public void setMessageSet(com.amazon.ec2.AvailabilityZoneMessageSetType param){
|
||||
|
||||
this.localMessageSet=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AvailabilityZoneItemType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AvailabilityZoneItemType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AvailabilityZoneItemType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"zoneName", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"zoneName");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("zoneName");
|
||||
}
|
||||
|
||||
|
||||
if (localZoneName==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("zoneName cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localZoneName);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"zoneState", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"zoneState");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("zoneState");
|
||||
}
|
||||
|
||||
|
||||
if (localZoneState==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("zoneState cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localZoneState);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"regionName", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"regionName");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("regionName");
|
||||
}
|
||||
|
||||
|
||||
if (localRegionName==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("regionName cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localRegionName);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
if (localMessageSet==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("messageSet cannot be null!!");
|
||||
}
|
||||
localMessageSet.serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","messageSet"),
|
||||
factory,xmlWriter);
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"zoneName"));
|
||||
|
||||
if (localZoneName != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localZoneName));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("zoneName cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"zoneState"));
|
||||
|
||||
if (localZoneState != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localZoneState));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("zoneState cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"regionName"));
|
||||
|
||||
if (localRegionName != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRegionName));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("regionName cannot be null!!");
|
||||
}
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"messageSet"));
|
||||
|
||||
|
||||
if (localMessageSet==null){
|
||||
throw new org.apache.axis2.databinding.ADBException("messageSet cannot be null!!");
|
||||
}
|
||||
elementList.add(localMessageSet);
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AvailabilityZoneItemType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AvailabilityZoneItemType object =
|
||||
new AvailabilityZoneItemType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AvailabilityZoneItemType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AvailabilityZoneItemType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","zoneName").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setZoneName(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","zoneState").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setZoneState(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","regionName").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setRegionName(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","messageSet").equals(reader.getName())){
|
||||
|
||||
object.setMessageSet(com.amazon.ec2.AvailabilityZoneMessageSetType.Factory.parse(reader));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
|
||||
/**
|
||||
* AvailabilityZoneMessageSetType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AvailabilityZoneMessageSetType bean class
|
||||
*/
|
||||
|
||||
public class AvailabilityZoneMessageSetType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AvailabilityZoneMessageSetType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Item
|
||||
* This was an Array!
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AvailabilityZoneMessageType[] localItem ;
|
||||
|
||||
/* This tracker boolean wil be used to detect whether the user called the set method
|
||||
* for this attribute. It will be used to determine whether to include this field
|
||||
* in the serialized XML
|
||||
*/
|
||||
protected boolean localItemTracker = false ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AvailabilityZoneMessageType[]
|
||||
*/
|
||||
public com.amazon.ec2.AvailabilityZoneMessageType[] getItem(){
|
||||
return localItem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* validate the array for Item
|
||||
*/
|
||||
protected void validateItem(com.amazon.ec2.AvailabilityZoneMessageType[] param){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Item
|
||||
*/
|
||||
public void setItem(com.amazon.ec2.AvailabilityZoneMessageType[] param){
|
||||
|
||||
validateItem(param);
|
||||
|
||||
|
||||
if (param != null){
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
} else {
|
||||
localItemTracker = false;
|
||||
|
||||
}
|
||||
|
||||
this.localItem=param;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated add method for the array for convenience
|
||||
* @param param com.amazon.ec2.AvailabilityZoneMessageType
|
||||
*/
|
||||
public void addItem(com.amazon.ec2.AvailabilityZoneMessageType param){
|
||||
if (localItem == null){
|
||||
localItem = new com.amazon.ec2.AvailabilityZoneMessageType[]{};
|
||||
}
|
||||
|
||||
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
|
||||
|
||||
java.util.List list =
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);
|
||||
list.add(param);
|
||||
this.localItem =
|
||||
(com.amazon.ec2.AvailabilityZoneMessageType[])list.toArray(
|
||||
new com.amazon.ec2.AvailabilityZoneMessageType[list.size()]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AvailabilityZoneMessageSetType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AvailabilityZoneMessageSetType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AvailabilityZoneMessageSetType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (localItemTracker){
|
||||
if (localItem!=null){
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
if (localItem[i] != null){
|
||||
localItem[i].serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item"),
|
||||
factory,xmlWriter);
|
||||
} else {
|
||||
|
||||
// we don't have to do any thing since minOccures is zero
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
if (localItemTracker){
|
||||
if (localItem!=null) {
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
|
||||
if (localItem[i] != null){
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"item"));
|
||||
elementList.add(localItem[i]);
|
||||
} else {
|
||||
|
||||
// nothing to do
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AvailabilityZoneMessageSetType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AvailabilityZoneMessageSetType object =
|
||||
new AvailabilityZoneMessageSetType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AvailabilityZoneMessageSetType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AvailabilityZoneMessageSetType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
java.util.ArrayList list1 = new java.util.ArrayList();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
|
||||
|
||||
|
||||
// Process the array and step past its final element's end.
|
||||
list1.add(com.amazon.ec2.AvailabilityZoneMessageType.Factory.parse(reader));
|
||||
|
||||
//loop until we find a start element that is not part of this array
|
||||
boolean loopDone1 = false;
|
||||
while(!loopDone1){
|
||||
// We should be at the end element, but make sure
|
||||
while (!reader.isEndElement())
|
||||
reader.next();
|
||||
// Step out of this element
|
||||
reader.next();
|
||||
// Step to next element event.
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
if (reader.isEndElement()){
|
||||
//two continuous end elements means we are exiting the xml structure
|
||||
loopDone1 = true;
|
||||
} else {
|
||||
if (new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
list1.add(com.amazon.ec2.AvailabilityZoneMessageType.Factory.parse(reader));
|
||||
|
||||
}else{
|
||||
loopDone1 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// call the converter utility to convert and set the array
|
||||
|
||||
object.setItem((com.amazon.ec2.AvailabilityZoneMessageType[])
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
|
||||
com.amazon.ec2.AvailabilityZoneMessageType.class,
|
||||
list1));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,483 @@
|
|||
|
||||
/**
|
||||
* AvailabilityZoneMessageType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AvailabilityZoneMessageType bean class
|
||||
*/
|
||||
|
||||
public class AvailabilityZoneMessageType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AvailabilityZoneMessageType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Message
|
||||
*/
|
||||
|
||||
|
||||
protected java.lang.String localMessage ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public java.lang.String getMessage(){
|
||||
return localMessage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Message
|
||||
*/
|
||||
public void setMessage(java.lang.String param){
|
||||
|
||||
this.localMessage=param;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AvailabilityZoneMessageType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AvailabilityZoneMessageType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AvailabilityZoneMessageType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace = "http://ec2.amazonaws.com/doc/2010-11-15/";
|
||||
if (! namespace.equals("")) {
|
||||
prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
xmlWriter.writeStartElement(prefix,"message", namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement(namespace,"message");
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeStartElement("message");
|
||||
}
|
||||
|
||||
|
||||
if (localMessage==null){
|
||||
// write the nil attribute
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("message cannot be null!!");
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
xmlWriter.writeCharacters(localMessage);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"message"));
|
||||
|
||||
if (localMessage != null){
|
||||
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMessage));
|
||||
} else {
|
||||
throw new org.apache.axis2.databinding.ADBException("message cannot be null!!");
|
||||
}
|
||||
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AvailabilityZoneMessageType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AvailabilityZoneMessageType object =
|
||||
new AvailabilityZoneMessageType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AvailabilityZoneMessageType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AvailabilityZoneMessageType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","message").equals(reader.getName())){
|
||||
|
||||
java.lang.String content = reader.getElementText();
|
||||
|
||||
object.setMessage(
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
|
||||
|
||||
reader.next();
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else{
|
||||
// A start element we are not expecting indicates an invalid parameter was passed
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
|
||||
/**
|
||||
* AvailabilityZoneSetType.java
|
||||
*
|
||||
* This file was auto-generated from WSDL
|
||||
* by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:34 EDT)
|
||||
*/
|
||||
|
||||
package com.amazon.ec2;
|
||||
|
||||
|
||||
/**
|
||||
* AvailabilityZoneSetType bean class
|
||||
*/
|
||||
|
||||
public class AvailabilityZoneSetType
|
||||
implements org.apache.axis2.databinding.ADBBean{
|
||||
/* This type was generated from the piece of schema that had
|
||||
name = AvailabilityZoneSetType
|
||||
Namespace URI = http://ec2.amazonaws.com/doc/2010-11-15/
|
||||
Namespace Prefix = ns1
|
||||
*/
|
||||
|
||||
|
||||
private static java.lang.String generatePrefix(java.lang.String namespace) {
|
||||
if(namespace.equals("http://ec2.amazonaws.com/doc/2010-11-15/")){
|
||||
return "ns1";
|
||||
}
|
||||
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* field for Item
|
||||
* This was an Array!
|
||||
*/
|
||||
|
||||
|
||||
protected com.amazon.ec2.AvailabilityZoneItemType[] localItem ;
|
||||
|
||||
/* This tracker boolean wil be used to detect whether the user called the set method
|
||||
* for this attribute. It will be used to determine whether to include this field
|
||||
* in the serialized XML
|
||||
*/
|
||||
protected boolean localItemTracker = false ;
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated getter method
|
||||
* @return com.amazon.ec2.AvailabilityZoneItemType[]
|
||||
*/
|
||||
public com.amazon.ec2.AvailabilityZoneItemType[] getItem(){
|
||||
return localItem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* validate the array for Item
|
||||
*/
|
||||
protected void validateItem(com.amazon.ec2.AvailabilityZoneItemType[] param){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated setter method
|
||||
* @param param Item
|
||||
*/
|
||||
public void setItem(com.amazon.ec2.AvailabilityZoneItemType[] param){
|
||||
|
||||
validateItem(param);
|
||||
|
||||
|
||||
if (param != null){
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
} else {
|
||||
localItemTracker = false;
|
||||
|
||||
}
|
||||
|
||||
this.localItem=param;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Auto generated add method for the array for convenience
|
||||
* @param param com.amazon.ec2.AvailabilityZoneItemType
|
||||
*/
|
||||
public void addItem(com.amazon.ec2.AvailabilityZoneItemType param){
|
||||
if (localItem == null){
|
||||
localItem = new com.amazon.ec2.AvailabilityZoneItemType[]{};
|
||||
}
|
||||
|
||||
|
||||
//update the setting tracker
|
||||
localItemTracker = true;
|
||||
|
||||
|
||||
java.util.List list =
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);
|
||||
list.add(param);
|
||||
this.localItem =
|
||||
(com.amazon.ec2.AvailabilityZoneItemType[])list.toArray(
|
||||
new com.amazon.ec2.AvailabilityZoneItemType[list.size()]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isReaderMTOMAware
|
||||
* @return true if the reader supports MTOM
|
||||
*/
|
||||
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
|
||||
boolean isReaderMTOMAware = false;
|
||||
|
||||
try{
|
||||
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
|
||||
}catch(java.lang.IllegalArgumentException e){
|
||||
isReaderMTOMAware = false;
|
||||
}
|
||||
return isReaderMTOMAware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQName
|
||||
* @param factory
|
||||
* @return org.apache.axiom.om.OMElement
|
||||
*/
|
||||
public org.apache.axiom.om.OMElement getOMElement (
|
||||
final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
org.apache.axiom.om.OMDataSource dataSource =
|
||||
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
|
||||
|
||||
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
AvailabilityZoneSetType.this.serialize(parentQName,factory,xmlWriter);
|
||||
}
|
||||
};
|
||||
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
|
||||
parentQName,factory,dataSource);
|
||||
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
serialize(parentQName,factory,xmlWriter,false);
|
||||
}
|
||||
|
||||
public void serialize(final javax.xml.namespace.QName parentQName,
|
||||
final org.apache.axiom.om.OMFactory factory,
|
||||
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
|
||||
boolean serializeType)
|
||||
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
|
||||
java.lang.String prefix = null;
|
||||
java.lang.String namespace = null;
|
||||
|
||||
|
||||
prefix = parentQName.getPrefix();
|
||||
namespace = parentQName.getNamespaceURI();
|
||||
|
||||
if ((namespace != null) && (namespace.trim().length() > 0)) {
|
||||
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
|
||||
if (writerPrefix != null) {
|
||||
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
|
||||
} else {
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
}
|
||||
|
||||
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
} else {
|
||||
xmlWriter.writeStartElement(parentQName.getLocalPart());
|
||||
}
|
||||
|
||||
if (serializeType){
|
||||
|
||||
|
||||
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2010-11-15/");
|
||||
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
namespacePrefix+":AvailabilityZoneSetType",
|
||||
xmlWriter);
|
||||
} else {
|
||||
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
|
||||
"AvailabilityZoneSetType",
|
||||
xmlWriter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (localItemTracker){
|
||||
if (localItem!=null){
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
if (localItem[i] != null){
|
||||
localItem[i].serialize(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item"),
|
||||
factory,xmlWriter);
|
||||
} else {
|
||||
|
||||
// we don't have to do any thing since minOccures is zero
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute with the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (xmlWriter.getPrefix(namespace) == null) {
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
|
||||
}
|
||||
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
|
||||
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
|
||||
if (namespace.equals(""))
|
||||
{
|
||||
xmlWriter.writeAttribute(attName,attValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace,attName,attValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Util method to write an attribute without the ns prefix
|
||||
*/
|
||||
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
|
||||
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
java.lang.String attributeNamespace = qname.getNamespaceURI();
|
||||
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
|
||||
if (attributePrefix == null) {
|
||||
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
|
||||
}
|
||||
java.lang.String attributeValue;
|
||||
if (attributePrefix.trim().length() > 0) {
|
||||
attributeValue = attributePrefix + ":" + qname.getLocalPart();
|
||||
} else {
|
||||
attributeValue = qname.getLocalPart();
|
||||
}
|
||||
|
||||
if (namespace.equals("")) {
|
||||
xmlWriter.writeAttribute(attName, attributeValue);
|
||||
} else {
|
||||
registerPrefix(xmlWriter, namespace);
|
||||
xmlWriter.writeAttribute(namespace, attName, attributeValue);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* method to handle Qnames
|
||||
*/
|
||||
|
||||
private void writeQName(javax.xml.namespace.QName qname,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String namespaceURI = qname.getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
} else {
|
||||
// i.e this is the default namespace
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
|
||||
} else {
|
||||
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeQNames(javax.xml.namespace.QName[] qnames,
|
||||
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
|
||||
|
||||
if (qnames != null) {
|
||||
// we have to store this data until last moment since it is not possible to write any
|
||||
// namespace data after writing the charactor data
|
||||
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
|
||||
java.lang.String namespaceURI = null;
|
||||
java.lang.String prefix = null;
|
||||
|
||||
for (int i = 0; i < qnames.length; i++) {
|
||||
if (i > 0) {
|
||||
stringToWrite.append(" ");
|
||||
}
|
||||
namespaceURI = qnames[i].getNamespaceURI();
|
||||
if (namespaceURI != null) {
|
||||
prefix = xmlWriter.getPrefix(namespaceURI);
|
||||
if ((prefix == null) || (prefix.length() == 0)) {
|
||||
prefix = generatePrefix(namespaceURI);
|
||||
xmlWriter.writeNamespace(prefix, namespaceURI);
|
||||
xmlWriter.setPrefix(prefix,namespaceURI);
|
||||
}
|
||||
|
||||
if (prefix.trim().length() > 0){
|
||||
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
} else {
|
||||
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
|
||||
}
|
||||
}
|
||||
xmlWriter.writeCharacters(stringToWrite.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a namespace prefix
|
||||
*/
|
||||
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
|
||||
java.lang.String prefix = xmlWriter.getPrefix(namespace);
|
||||
|
||||
if (prefix == null) {
|
||||
prefix = generatePrefix(namespace);
|
||||
|
||||
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
|
||||
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
|
||||
}
|
||||
|
||||
xmlWriter.writeNamespace(prefix, namespace);
|
||||
xmlWriter.setPrefix(prefix, namespace);
|
||||
}
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* databinding method to get an XML representation of this object
|
||||
*
|
||||
*/
|
||||
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
|
||||
throws org.apache.axis2.databinding.ADBException{
|
||||
|
||||
|
||||
|
||||
java.util.ArrayList elementList = new java.util.ArrayList();
|
||||
java.util.ArrayList attribList = new java.util.ArrayList();
|
||||
|
||||
if (localItemTracker){
|
||||
if (localItem!=null) {
|
||||
for (int i = 0;i < localItem.length;i++){
|
||||
|
||||
if (localItem[i] != null){
|
||||
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/",
|
||||
"item"));
|
||||
elementList.add(localItem[i]);
|
||||
} else {
|
||||
|
||||
// nothing to do
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
throw new org.apache.axis2.databinding.ADBException("item cannot be null!!");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Factory class that keeps the parse method
|
||||
*/
|
||||
public static class Factory{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* static method to create the object
|
||||
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
|
||||
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
|
||||
* Postcondition: If this object is an element, the reader is positioned at its end element
|
||||
* If this object is a complex type, the reader is positioned at the end element of its outer element
|
||||
*/
|
||||
public static AvailabilityZoneSetType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
|
||||
AvailabilityZoneSetType object =
|
||||
new AvailabilityZoneSetType();
|
||||
|
||||
int event;
|
||||
java.lang.String nillableValue = null;
|
||||
java.lang.String prefix ="";
|
||||
java.lang.String namespaceuri ="";
|
||||
try {
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
|
||||
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
|
||||
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
|
||||
"type");
|
||||
if (fullTypeName!=null){
|
||||
java.lang.String nsPrefix = null;
|
||||
if (fullTypeName.indexOf(":") > -1){
|
||||
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
|
||||
}
|
||||
nsPrefix = nsPrefix==null?"":nsPrefix;
|
||||
|
||||
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
|
||||
|
||||
if (!"AvailabilityZoneSetType".equals(type)){
|
||||
//find namespace for the prefix
|
||||
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
|
||||
return (AvailabilityZoneSetType)com.amazon.ec2.ExtensionMapper.getTypeObject(
|
||||
nsUri,type,reader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Note all attributes that were handled. Used to differ normal attributes
|
||||
// from anyAttributes.
|
||||
java.util.Vector handledAttributes = new java.util.Vector();
|
||||
|
||||
|
||||
|
||||
|
||||
reader.next();
|
||||
|
||||
java.util.ArrayList list1 = new java.util.ArrayList();
|
||||
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
|
||||
|
||||
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
|
||||
|
||||
|
||||
// Process the array and step past its final element's end.
|
||||
list1.add(com.amazon.ec2.AvailabilityZoneItemType.Factory.parse(reader));
|
||||
|
||||
//loop until we find a start element that is not part of this array
|
||||
boolean loopDone1 = false;
|
||||
while(!loopDone1){
|
||||
// We should be at the end element, but make sure
|
||||
while (!reader.isEndElement())
|
||||
reader.next();
|
||||
// Step out of this element
|
||||
reader.next();
|
||||
// Step to next element event.
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
if (reader.isEndElement()){
|
||||
//two continuous end elements means we are exiting the xml structure
|
||||
loopDone1 = true;
|
||||
} else {
|
||||
if (new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2010-11-15/","item").equals(reader.getName())){
|
||||
list1.add(com.amazon.ec2.AvailabilityZoneItemType.Factory.parse(reader));
|
||||
|
||||
}else{
|
||||
loopDone1 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// call the converter utility to convert and set the array
|
||||
|
||||
object.setItem((com.amazon.ec2.AvailabilityZoneItemType[])
|
||||
org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
|
||||
com.amazon.ec2.AvailabilityZoneItemType.class,
|
||||
list1));
|
||||
|
||||
} // End of if for expected property start element
|
||||
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
while (!reader.isStartElement() && !reader.isEndElement())
|
||||
reader.next();
|
||||
|
||||
if (reader.isStartElement())
|
||||
// A start element we are not expecting indicates a trailing invalid property
|
||||
throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (javax.xml.stream.XMLStreamException e) {
|
||||
throw new java.lang.Exception(e);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}//end of factory class
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue