summaryrefslogtreecommitdiffstats
path: root/sandbox/rfeng/samples.M2/creditws-axis2/src/credit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java144
-rw-r--r--sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java29
-rw-r--r--sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java24
-rw-r--r--sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java301
-rw-r--r--sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java290
5 files changed, 788 insertions, 0 deletions
diff --git a/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java
new file mode 100644
index 0000000000..498351f85d
--- /dev/null
+++ b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java
@@ -0,0 +1,144 @@
+
+/**
+ * CreditCheckServiceMessageReceiverInOut.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: 1.1-RC2 Nov 02, 2006 (02:37:50 LKT)
+ */
+package credit;
+
+/**
+ * CreditCheckServiceMessageReceiverInOut message receiver
+ */
+
+public class CreditCheckServiceMessageReceiverInOut extends
+ org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver {
+
+ public void invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext,
+ org.apache.axis2.context.MessageContext newMsgContext)
+ throws org.apache.axis2.AxisFault {
+
+ try {
+
+ // get the implementation class for the Web Service
+ Object obj = getTheImplementationObject(msgContext);
+
+ CreditCheckServiceSkeleton skel = (CreditCheckServiceSkeleton)obj;
+ // Out Envelop
+ org.apache.axiom.soap.SOAPEnvelope envelope = null;
+ // Find the axisOperation that has been set by the Dispatch phase.
+ org.apache.axis2.description.AxisOperation op =
+ msgContext.getOperationContext().getAxisOperation();
+ if (op == null) {
+ throw new org.apache.axis2.AxisFault(
+ "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider");
+ }
+
+ java.lang.String methodName;
+ if (op.getName() != null & (methodName = op.getName().getLocalPart()) != null) {
+
+ if ("getCreditScore".equals(methodName)) {
+
+ credit.GetCreditScoreResponse param11 = null;
+
+ // doc style
+ credit.GetCreditScore wrappedParam =
+ (credit.GetCreditScore)fromOM(msgContext.getEnvelope().getBody().getFirstElement(),
+ credit.GetCreditScore.class,
+ getEnvelopeNamespaces(msgContext.getEnvelope()));
+
+ param11 = skel.getCreditScore(wrappedParam);
+
+ envelope = toEnvelope(getSOAPFactory(msgContext), param11, false);
+
+ }
+
+ newMsgContext.setEnvelope(envelope);
+ }
+ } catch (Exception e) {
+ throw org.apache.axis2.AxisFault.makeFault(e);
+ }
+ }
+
+ //
+ private org.apache.axiom.om.OMElement toOM(credit.GetCreditScore param, boolean optimizeContent) {
+
+ return param.getOMElement(credit.GetCreditScore.MY_QNAME, org.apache.axiom.om.OMAbstractFactory
+ .getOMFactory());
+
+ }
+
+ private org.apache.axiom.om.OMElement toOM(credit.GetCreditScoreResponse param, boolean optimizeContent) {
+
+ return param.getOMElement(credit.GetCreditScoreResponse.MY_QNAME,
+ org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+ }
+
+ private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory,
+ credit.GetCreditScoreResponse param,
+ boolean optimizeContent) {
+ org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
+
+ emptyEnvelope.getBody().addChild(param.getOMElement(credit.GetCreditScoreResponse.MY_QNAME, factory));
+
+ return emptyEnvelope;
+ }
+
+ /**
+ * get the default envelope
+ */
+ private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory) {
+ return factory.getDefaultEnvelope();
+ }
+
+ private java.lang.Object fromOM(org.apache.axiom.om.OMElement param,
+ java.lang.Class type,
+ java.util.Map extraNamespaces) {
+
+ try {
+
+ if (credit.GetCreditScore.class.equals(type)) {
+
+ return credit.GetCreditScore.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+
+ }
+
+ if (credit.GetCreditScoreResponse.class.equals(type)) {
+
+ return credit.GetCreditScoreResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return null;
+ }
+
+ /**
+ * A utility method that copies the namepaces from the SOAPEnvelope
+ */
+ private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env) {
+ java.util.Map returnMap = new java.util.HashMap();
+ java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
+ while (namespaceIterator.hasNext()) {
+ org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace)namespaceIterator.next();
+ returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
+ }
+ return returnMap;
+ }
+
+ private org.apache.axis2.AxisFault createAxisFault(java.lang.Exception e) {
+ org.apache.axis2.AxisFault f;
+ Throwable cause = e.getCause();
+ if (cause != null) {
+ f = new org.apache.axis2.AxisFault(e.getMessage(), cause);
+ } else {
+ f = new org.apache.axis2.AxisFault(e.getMessage());
+ }
+
+ return f;
+ }
+
+}// end of class
diff --git a/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java
new file mode 100644
index 0000000000..d114baab4e
--- /dev/null
+++ b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java
@@ -0,0 +1,29 @@
+/**
+ * CreditCheckServiceSkeleton.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: 1.0 May 05, 2006 (12:31:13 IST)
+ */
+package credit;
+
+/**
+ * CreditCheckServiceSkeleton java skeleton for the axisService
+ */
+public class CreditCheckServiceSkeleton {
+
+ /**
+ * Auto generated method signature
+ *
+ * @param request
+ */
+ public credit.GetCreditScoreResponse getCreditScore(credit.GetCreditScore request) {
+ System.out.println("Checking credit for " + request.getSsn());
+ GetCreditScoreResponse response = new GetCreditScoreResponse();
+ int score = (int)(650 + (Math.random() - 0.5) * 100);
+ response.setScore(score);
+ System.out.println("Credit score is " + score);
+ return response;
+
+ }
+
+}
diff --git a/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java
new file mode 100644
index 0000000000..744fb4c98c
--- /dev/null
+++ b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java
@@ -0,0 +1,24 @@
+/**
+ * ExtensionMapper.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: #axisVersion# #today#
+ */
+
+package credit;
+
+/**
+ * ExtensionMapper class
+ */
+
+public class ExtensionMapper {
+
+ public static java.lang.Object getTypeObject(java.lang.String namespaceURI,
+ java.lang.String typeName,
+ javax.xml.stream.XMLStreamReader reader)
+ throws java.lang.Exception {
+
+ throw new java.lang.RuntimeException("Unsupported type " + namespaceURI + " " + typeName);
+ }
+
+}
diff --git a/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java
new file mode 100644
index 0000000000..59130c00d7
--- /dev/null
+++ b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java
@@ -0,0 +1,301 @@
+/**
+ * GetCreditScore.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: #axisVersion# #today#
+ */
+
+package credit;
+
+/**
+ * GetCreditScore bean class
+ */
+
+public class GetCreditScore implements org.apache.axis2.databinding.ADBBean {
+
+ public static final javax.xml.namespace.QName MY_QNAME =
+ new javax.xml.namespace.QName("http://credit", "getCreditScore", "ns1");
+
+ /**
+ * field for Ssn
+ */
+
+ protected java.lang.String localSsn;
+
+ /**
+ * Auto generated getter method
+ *
+ * @return java.lang.String
+ */
+ public java.lang.String getSsn() {
+ return localSsn;
+ }
+
+ /**
+ * Auto generated setter method
+ *
+ * @param param Ssn
+ */
+ public void setSsn(java.lang.String param) {
+
+ this.localSsn = param;
+
+ }
+
+ /**
+ * @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) {
+
+ org.apache.axiom.om.OMDataSource dataSource =
+ new org.apache.axis2.databinding.ADBDataSource(this, parentQName) {
+
+ public void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
+ throws javax.xml.stream.XMLStreamException {
+
+ java.lang.String prefix = parentQName.getPrefix();
+ java.lang.String namespace = parentQName.getNamespaceURI();
+
+ if (namespace != null) {
+ java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+ if (writerPrefix != null) {
+ xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+ } else {
+ if (prefix == null) {
+ prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+ }
+
+ xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+ }
+ } else {
+ xmlWriter.writeStartElement(parentQName.getLocalPart());
+ }
+
+ namespace = "http://credit";
+ if (!namespace.equals("")) {
+ prefix = xmlWriter.getPrefix(namespace);
+
+ if (prefix == null) {
+ prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+ xmlWriter.writeStartElement(prefix, "ssn", namespace);
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+
+ } else {
+ xmlWriter.writeStartElement(namespace, "ssn");
+ }
+
+ } else {
+ xmlWriter.writeStartElement("ssn");
+ }
+
+ if (localSsn == null) {
+ // write the nil attribute
+
+ throw new RuntimeException("ssn cannot be null!!");
+
+ } else {
+
+ xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil
+ .convertToString(localSsn));
+
+ }
+
+ 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);
+ }
+ }
+
+ /**
+ * 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 = createPrefix();
+
+ while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+ prefix = createPrefix();
+ }
+
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+ }
+
+ return prefix;
+ }
+
+ /**
+ * Create a prefix
+ */
+ private java.lang.String createPrefix() {
+ return "ns" + (int)Math.random();
+ }
+ };
+
+ return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME, factory, dataSource);
+
+ }
+
+ /**
+ * databinding method to get an XML representation of this object
+ */
+ public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) {
+
+ java.util.ArrayList elementList = new java.util.ArrayList();
+ java.util.ArrayList attribList = new java.util.ArrayList();
+
+ elementList.add(new javax.xml.namespace.QName("http://credit", "ssn"));
+
+ if (localSsn != null) {
+ elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSsn));
+ } else {
+ throw new RuntimeException("ssn 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 GetCreditScore parse(javax.xml.stream.XMLStreamReader reader)
+ throws java.lang.Exception {
+ GetCreditScore object = new GetCreditScore();
+ int event;
+ 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 = fullTypeName.substring(0, fullTypeName.indexOf(":"));
+ nsPrefix = nsPrefix == null ? "" : nsPrefix;
+
+ java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);
+ if (!"getCreditScore".equals(type)) {
+ // find namespace for the prefix
+ java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+ return (GetCreditScore)credit.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();
+
+ 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;
+ }
+
+ reader.next();
+
+ while (!reader.isStartElement() && !reader.isEndElement())
+ reader.next();
+
+ if (reader.isStartElement() && new javax.xml.namespace.QName("http://credit", "ssn")
+ .equals(reader.getName())) {
+
+ java.lang.String content = reader.getElementText();
+
+ object.setSsn(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 java.lang.RuntimeException("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 java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+
+ } catch (javax.xml.stream.XMLStreamException e) {
+ throw new java.lang.Exception(e);
+ }
+
+ return object;
+ }
+
+ }// end of factory class
+
+}
diff --git a/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java
new file mode 100644
index 0000000000..5d5981b177
--- /dev/null
+++ b/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java
@@ -0,0 +1,290 @@
+/**
+ * GetCreditScoreResponse.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: #axisVersion# #today#
+ */
+
+package credit;
+
+/**
+ * GetCreditScoreResponse bean class
+ */
+
+public class GetCreditScoreResponse implements org.apache.axis2.databinding.ADBBean {
+
+ public static final javax.xml.namespace.QName MY_QNAME =
+ new javax.xml.namespace.QName("http://credit", "getCreditScoreResponse", "ns1");
+
+ /**
+ * field for Score
+ */
+
+ protected int localScore;
+
+ /**
+ * Auto generated getter method
+ *
+ * @return int
+ */
+ public int getScore() {
+ return localScore;
+ }
+
+ /**
+ * Auto generated setter method
+ *
+ * @param param Score
+ */
+ public void setScore(int param) {
+
+ this.localScore = param;
+
+ }
+
+ /**
+ * @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) {
+
+ org.apache.axiom.om.OMDataSource dataSource =
+ new org.apache.axis2.databinding.ADBDataSource(this, parentQName) {
+
+ public void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
+ throws javax.xml.stream.XMLStreamException {
+
+ java.lang.String prefix = parentQName.getPrefix();
+ java.lang.String namespace = parentQName.getNamespaceURI();
+
+ if (namespace != null) {
+ java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+ if (writerPrefix != null) {
+ xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+ } else {
+ if (prefix == null) {
+ prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+ }
+
+ xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+ }
+ } else {
+ xmlWriter.writeStartElement(parentQName.getLocalPart());
+ }
+
+ namespace = "http://credit";
+ if (!namespace.equals("")) {
+ prefix = xmlWriter.getPrefix(namespace);
+
+ if (prefix == null) {
+ prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+ xmlWriter.writeStartElement(prefix, "score", namespace);
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+
+ } else {
+ xmlWriter.writeStartElement(namespace, "score");
+ }
+
+ } else {
+ xmlWriter.writeStartElement("score");
+ }
+
+ xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil
+ .convertToString(localScore));
+
+ 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);
+ }
+ }
+
+ /**
+ * 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 = createPrefix();
+
+ while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+ prefix = createPrefix();
+ }
+
+ xmlWriter.writeNamespace(prefix, namespace);
+ xmlWriter.setPrefix(prefix, namespace);
+ }
+
+ return prefix;
+ }
+
+ /**
+ * Create a prefix
+ */
+ private java.lang.String createPrefix() {
+ return "ns" + (int)Math.random();
+ }
+ };
+
+ return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME, factory, dataSource);
+
+ }
+
+ /**
+ * databinding method to get an XML representation of this object
+ */
+ public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) {
+
+ java.util.ArrayList elementList = new java.util.ArrayList();
+ java.util.ArrayList attribList = new java.util.ArrayList();
+
+ elementList.add(new javax.xml.namespace.QName("http://credit", "score"));
+
+ elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localScore));
+
+ 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 GetCreditScoreResponse parse(javax.xml.stream.XMLStreamReader reader)
+ throws java.lang.Exception {
+ GetCreditScoreResponse object = new GetCreditScoreResponse();
+ int event;
+ 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 = fullTypeName.substring(0, fullTypeName.indexOf(":"));
+ nsPrefix = nsPrefix == null ? "" : nsPrefix;
+
+ java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);
+ if (!"getCreditScoreResponse".equals(type)) {
+ // find namespace for the prefix
+ java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+ return (GetCreditScoreResponse)credit.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();
+
+ 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;
+ }
+
+ reader.next();
+
+ while (!reader.isStartElement() && !reader.isEndElement())
+ reader.next();
+
+ if (reader.isStartElement() && new javax.xml.namespace.QName("http://credit", "score")
+ .equals(reader.getName())) {
+
+ java.lang.String content = reader.getElementText();
+
+ object.setScore(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 java.lang.RuntimeException("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 java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+
+ } catch (javax.xml.stream.XMLStreamException e) {
+ throw new java.lang.Exception(e);
+ }
+
+ return object;
+ }
+
+ }// end of factory class
+
+}