You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2006/11/09 20:37:12 UTC

svn commit: r473043 - in /incubator/tuscany/sandbox/rfeng/samples.M2: creditws-axis2/ creditws-axis2/build/ creditws-axis2/build/lib/ creditws-axis2/resources/ creditws-axis2/src/ creditws-axis2/src/credit/ creditws-axis2/test/ creditws-axis2/wsdl/ mor...

Author: rfeng
Date: Thu Nov  9 11:37:11 2006
New Revision: 473043

URL: http://svn.apache.org/viewvc?view=rev&rev=473043
Log:
Add an external credit check ws

Added:
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.classpath
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.project
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/lib/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/lib/CreditCheckService.aar   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/CreditCheckService.wsdl
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java   (with props)
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/test/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/
    incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/credit.wsdl
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default1.scdl
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default2.scdl
Modified:
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/doc/mortgage_diagrams.doc
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/wsdl/credit.wsdl
    incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/test/java/mortgage/MortgageClientTestCase.java

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.classpath
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.classpath?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.classpath (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.classpath Thu Nov  9 11:37:11 2006
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/activation-1.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/annogen-0.1.0.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axiom-api-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axiom-dom-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axiom-impl-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-adb-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-adb-codegen-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-codegen-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-java2wsdl-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-jibx-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-kernel-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-saaj-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-soapmonitor-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-spring-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-tools-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/axis2-xmlbeans-1.1-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/backport-util-concurrent-2.2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/commons-codec-1.3.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/commons-fileupload-1.1.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/commons-httpclient-3.0.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/commons-io-1.2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/commons-logging-1.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/geronimo-spec-jms-1.1-rc4.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/jakarta-httpcore-4.0-alpha2.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/jaxen-1.1-beta-10.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/jibx-bind-1.1.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/jibx-run-1.1.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/mail-1.4.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/neethi-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/servletapi-2.3.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/stax-api-1.0.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/woden-1.0.0M6.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/wsdl4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/wstx-asl-3.0.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/xalan-2.7.0.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/xbean-2.2.0.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/xercesImpl-2.8.1.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/xml-apis-1.3.03.jar"/>
+	<classpathentry kind="lib" path="C:/Apache/axis2-1.1-RC2/lib/XmlSchema-SNAPSHOT.jar"/>
+	<classpathentry kind="output" path="classes"/>
+</classpath>

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.project
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.project?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.project (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/.project Thu Nov  9 11:37:11 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>sample-creditws-axis2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml Thu Nov  9 11:37:11 2006
@@ -0,0 +1,109 @@
+<project basedir="." default="jar.server">
+	<!--Auto generated ant build file-->
+	<property environment="env" />
+	<property name="axis2.home" value="${env.AXIS2_HOME}" />
+	<property name="project.base.dir" value="." />
+	<property name="maven.class.path" value="" />
+	<property name="name" value="CreditCheckService" />
+	<property name="src" value="${project.base.dir}/src" />
+	<property name="test" value="${project.base.dir}/test" />
+	<property name="build" value="${project.base.dir}/build" />
+	<property name="classes" value="${build}/classes" />
+	<property name="lib" value="${build}/lib" />
+	<property name="resources" value="${project.base.dir}/resources" />
+	<property value="" name="jars.ok" />
+	<path id="axis2.class.path">
+		<pathelement path="${java.class.path}" />
+		<pathelement path="${maven.class.path}" />
+		<fileset dir="${axis2.home}">
+			<include name="lib/*.jar" />
+		</fileset>
+	</path>
+	<target name="init">
+		<mkdir dir="${build}" />
+		<mkdir dir="${classes}" />
+		<mkdir dir="${lib}" />
+		<mkdir dir="${test}" />
+	</target>
+	<target depends="init" name="pre.compile.test">
+		<!--Test the classpath for the availability of necesary classes-->
+		<available classpathref="axis2.class.path" property="stax.available" classname="javax.xml.stream.XMLStreamReader" />
+		<available classpathref="axis2.class.path" property="axis2.available" classname="org.apache.axis2.engine.AxisEngine" />
+		<condition property="jars.ok">
+			<and>
+				<isset property="stax.available" />
+				<isset property="axis2.available" />
+			</and>
+		</condition>
+		<!--Print out the availabilities-->
+		<echo message="Stax Availability= ${stax.available}" />
+		<echo message="Axis2 Availability= ${axis2.available}" />
+	</target>
+	<target depends="pre.compile.test" name="compile.src" if="jars.ok">
+		<javac debug="on" memoryMaximumSize="256m" memoryInitialSize="256m" fork="true" destdir="${classes}" srcdir="${src}">
+			<classpath refid="axis2.class.path" />
+		</javac>
+	</target>
+	<target depends="compile.src" name="compile.test" if="jars.ok">
+		<javac debug="on" memoryMaximumSize="256m" memoryInitialSize="256m" fork="true" destdir="${classes}">
+			<src path="${test}" />
+			<classpath refid="axis2.class.path" />
+		</javac>
+	</target>
+	<target depends="pre.compile.test" name="echo.classpath.problem" unless="jars.ok">
+		<echo message="The class path is not set right!                                Please make sure the following classes are in the classpath                                1. XmlBeans                                2. Stax                                3. Axis2                 " />
+	</target>
+	<target depends="jar.server, jar.client" name="jar.all" />
+	<target depends="compile.src,echo.classpath.problem" name="jar.server" if="jars.ok">
+		<copy toDir="${classes}/META-INF" failonerror="false">
+			<fileset dir="${resources}">
+				<include name="*.xml" />
+				<include name="*.wsdl" />
+				<include name="*.xsd" />
+			</fileset>
+		</copy>
+		<jar destfile="${lib}/${name}.aar">
+			<fileset excludes="**/Test.class" dir="${classes}" />
+		</jar>
+	</target>
+	<target if="jars.ok" name="jar.client" depends="compile.test">
+		<jar destfile="${lib}/${name}-test-client.jar">
+			<fileset dir="${classes}">
+				<exclude name="**/META-INF/*.*" />
+				<exclude name="**/lib/*.*" />
+				<exclude name="**/*MessageReceiver.class" />
+				<exclude name="**/*Skeleton.class" />
+			</fileset>
+		</jar>
+	</target>
+	<target if="jars.ok" name="make.repo" depends="jar.server">
+		<mkdir dir="${build}/repo/" />
+		<mkdir dir="${build}/repo/services" />
+		<copy file="${build}/lib/${name}.aar" toDir="${build}/repo/services/" />
+	</target>
+	<target if="jars.ok" name="start.server" depends="make.repo">
+		<java fork="true" classname="org.apache.axis2.transport.http.SimpleHTTPServer">
+			<arg value="${build}/repo" />
+			<classpath refid="axis2.class.path" />
+		</java>
+	</target>
+	<target depends="compile.test" name="run.test" if="jars.ok">
+		<path id="test.class.path">
+			<pathelement location="${lib}/${name}-test-client.jar" />
+			<path refid="axis2.class.path" />
+		</path>
+		<mkdir dir="${build}/test-reports/" />
+		<junit haltonfailure="yes" printsummary="yes">
+			<classpath refid="test.class.path" />
+			<formatter type="plain" />
+			<batchtest fork="yes" toDir="${build}/test-reports/">
+				<fileset dir="${test}">
+					<include name="**/*Test*.java" />
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
+	<target name="clean">
+		<delete dir="${build}" />
+	</target>
+</project>

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/lib/CreditCheckService.aar
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/lib/CreditCheckService.aar?view=auto&rev=473043
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/build/lib/CreditCheckService.aar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/CreditCheckService.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/CreditCheckService.wsdl?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/CreditCheckService.wsdl (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/CreditCheckService.wsdl Thu Nov  9 11:37:11 2006
@@ -0,0 +1,71 @@
+<wsdl:definitions xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:tns="http://credit" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://credit">
+    <wsdl:types>
+        <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified"
+            elementFormDefault="qualified" targetNamespace="http://credit">
+            <xsd:element name="getCreditScore">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="ssn" type="string" />
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="getCreditScoreResponse">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="score" type="int" />
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:schema>
+    </wsdl:types>
+    <wsdl:message name="getCreditScoreRequest">
+        <wsdl:part name="part1" element="tns:getCreditScore" />
+    </wsdl:message>
+    <wsdl:message name="getCreditScoreResponse">
+        <wsdl:part name="part1" element="tns:getCreditScoreResponse" />
+    </wsdl:message>
+    <wsdl:portType name="CreditCheckServicePortType">
+        <wsdl:operation name="getCreditScore">
+            <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="tns:getCreditScoreRequest"
+                wsaw:Action="http://credit/CreditCheck/getCreditScoreRequest" />
+            <wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="tns:getCreditScoreResponse"
+                wsaw:Action="http://credit/CreditCheck/getCreditScoreResponse" />
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CreditCheckServiceSOAP11Binding" type="tns:CreditCheckServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="getCreditScore">
+            <soap:operation soapAction="http://credit/CreditCheck/getCreditScoreRequest" style="document" />
+            <wsdl:input>
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="CreditCheckServiceSOAP12Binding" type="tns:CreditCheckServicePortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="getCreditScore">
+            <soap12:operation soapAction="http://credit/CreditCheck/getCreditScoreRequest" style="document" />
+            <wsdl:input>
+                <soap12:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CreditCheckService">
+        <wsdl:port name="CreditCheckServiceSOAP11port_http" binding="tns:CreditCheckServiceSOAP11Binding">
+            <soap:address location="http://localhost:8080/credit/services/CreditCheckWebService" />
+        </wsdl:port>
+        <wsdl:port name="CreditCheckServiceSOAP12port_http" binding="tns:CreditCheckServiceSOAP12Binding">
+            <soap12:address location="http://localhost:8080/credit/services/CreditCheckWebService" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml Thu Nov  9 11:37:11 2006
@@ -0,0 +1,14 @@
+<!-- This file was auto-generated from WSDL -->
+<!-- by the Apache Axis2 version: #axisVersion# #today# -->
+<serviceGroup>
+<service name="CreditCheckService">
+<messageReceivers>
+<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="credit.CreditCheckServiceMessageReceiverInOut"/>
+</messageReceivers>
+<parameter locked="false" name="ServiceClass">credit.CreditCheckServiceSkeleton</parameter>
+<operation name="getCreditScore" mep="http://www.w3.org/2004/08/wsdl/in-out">
+<actionMapping>http://credit/CreditCheck/getCreditScoreRequest</actionMapping>
+<outputActionMapping>http://credit/CreditCheck/getCreditScoreResponse</outputActionMapping>
+</operation>
+</service>
+</serviceGroup>

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/resources/services.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java Thu Nov  9 11:37:11 2006
@@ -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

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceMessageReceiverInOut.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java Thu Nov  9 11:37:11 2006
@@ -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;
+
+    }
+
+}

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/CreditCheckServiceSkeleton.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java Thu Nov  9 11:37:11 2006
@@ -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);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/ExtensionMapper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java Thu Nov  9 11:37:11 2006
@@ -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
+
+}

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScore.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java Thu Nov  9 11:37:11 2006
@@ -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
+
+}

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/src/credit/GetCreditScoreResponse.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/credit.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/credit.wsdl?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/credit.wsdl (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/creditws-axis2/wsdl/credit.wsdl Thu Nov  9 11:37:11 2006
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<wsdl:definitions targetNamespace="http://credit" xmlns:tns="http://credit" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="credit">
+
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://credit" xmlns:tns="http://credit"
+            xmlns="http://www.w3.org/2001/XMLSchema">
+
+            <element name="getCreditScore">
+                <complexType>
+                    <sequence>
+                        <element name="ssn" type="xsd:string" />
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="getCreditScoreResponse">
+                <complexType>
+                    <sequence>
+                        <element name="score" type="xsd:int" />
+                    </sequence>
+                </complexType>
+            </element>
+
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getCreditScoreRequest">
+        <wsdl:part element="tns:getCreditScore" name="inputMsg" />
+    </wsdl:message>
+
+    <wsdl:message name="getCreditScoreResponse">
+        <wsdl:part element="tns:getCreditScoreResponse" name="outputMsg" />
+    </wsdl:message>
+
+
+    <wsdl:portType name="CreditCheck">
+        <wsdl:operation name="getCreditScore">
+            <wsdl:input message="tns:getCreditScoreRequest" name="getCreditScoreRequest" />
+            <wsdl:output message="tns:getCreditScoreResponse" name="getCreditScoreResponse" />
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="CreditCheckSoapBinding" type="tns:CreditCheck">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="getCreditScore">
+            <wsdlsoap:operation soapAction="" />
+            <wsdl:input name="getCreditScoreRequest">
+                <wsdlsoap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="getCreditScoreResponse">
+                <wsdlsoap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="CreditCheckService">
+        <wsdl:port binding="tns:CreditCheckSoapBinding" name="CreditCheckSoapPort">
+            <wsdlsoap:address location="http://localhost:8080/credit/services/CreditCheckWebService" />
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Modified: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default.scdl?view=diff&rev=473043&r1=473042&r2=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default.scdl (original)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default.scdl Thu Nov  9 11:37:11 2006
@@ -22,30 +22,16 @@
     <component name="LoanApprovalComponent">
         <implementation.java class="mortgage.LoanApprovalImpl" />
         <property name="minimumCreditScore">600</property>
-        <!-- 
-        <reference name="creditCheck">CreditCheckService</reference>
-        <reference name="mortgageCalculator">MortgageCalculatorComponent</reference>
-         -->
         <reference name="creditCheck">CreditCheckComponent</reference>
         <reference name="interestRateQuote">InterestRateQuoteComponent</reference>
         <reference name="riskAssessment">RiskAssessmentComponent</reference>
-        <reference name="mortgageCalculator">MortgageCalculatorJSComponent</reference>
+        <reference name="mortgageCalculator">MortgageCalculatorComponent</reference>
     </component>
 
     <component name="CreditCheckComponent">
         <implementation.java class="mortgage.CreditCheckImpl" />
     </component>
 
-    <reference name="CreditCheckService">
-        <interface.java interface="mortgage.CreditCheck" />
-        <!-- 
-            <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
-            interface="http://credit#wsdl.interface(CreditCheck)" wsdli:wsdlLocation="http://credit wsdl/credit.wsdl" />
-        -->
-        <binding.ws endpoint="http://credit#wsdl.endpoint(CreditCheckService/CreditCheckSoapPort)"
-            location="wsdl/credit.wsdl" />
-    </reference>
-
     <component name="InterestRateQuoteComponent">
         <implementation.java class="mortgage.InterestRateQuoteImpl" />
     </component>
@@ -56,11 +42,6 @@
 
     <component name="MortgageCalculatorComponent">
         <implementation.java class="mortgage.MortgageCalculatorImpl" />
-    </component>
-
-    <component name="MortgageCalculatorJSComponent"
-        xmlns:js="http://incubator.apache.org/tuscany/xmlns/container/js/1.0-incubator-M2">
-        <js:implementation.js script="MortgageCalculator.js" />
     </component>
 
 </composite>

Added: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default1.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default1.scdl?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default1.scdl (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default1.scdl Thu Nov  9 11:37:11 2006
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="MortgageComposite">
+
+    <component name="LoanApprovalComponent">
+        <implementation.java class="mortgage.LoanApprovalImpl" />
+        <property name="minimumCreditScore">600</property>
+        <reference name="creditCheck">CreditCheckReference</reference>
+        <reference name="interestRateQuote">InterestRateQuoteComponent</reference>
+        <reference name="riskAssessment">RiskAssessmentComponent</reference>
+        <reference name="mortgageCalculator">MortgageCalculatorJSComponent</reference>
+    </component>
+
+    <reference name="CreditCheckReference">
+        <interface.java interface="mortgage.CreditCheck" />
+        <binding.ws endpoint="http://credit#wsdl.endpoint(CreditCheckService/CreditCheckSoapPort)"
+            location="wsdl/credit.wsdl" />
+    </reference>
+
+    <component name="InterestRateQuoteComponent">
+        <implementation.java class="mortgage.InterestRateQuoteImpl" />
+    </component>
+
+    <component name="RiskAssessmentComponent">
+        <implementation.java class="mortgage.RiskAssessmentImpl" />
+    </component>
+
+    <component name="MortgageCalculatorJSComponent"
+        xmlns:js="http://incubator.apache.org/tuscany/xmlns/container/js/1.0-incubator-M2">
+        <js:implementation.js script="MortgageCalculator.js" />
+    </component>
+
+</composite>

Added: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default2.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default2.scdl?view=auto&rev=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default2.scdl (added)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/META-INF/sca/default2.scdl Thu Nov  9 11:37:11 2006
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="MortgageComposite">
+
+    <component name="LoanApprovalComponent">
+        <implementation.java class="mortgage.LoanApprovalImpl" />
+        <property name="minimumCreditScore">600</property>
+        <reference name="creditCheck">CreditCheckReference1</reference>
+        <reference name="interestRateQuote">InterestRateQuoteComponent</reference>
+        <reference name="riskAssessment">RiskAssessmentComponent</reference>
+        <reference name="mortgageCalculator">MortgageCalculatorJSComponent</reference>
+    </component>
+
+    <reference name="CreditCheckReference1">
+        <interface.java interface="mortgage.CreditCheck" />
+        <binding.ws endpoint="http://credit#wsdl.endpoint(CreditCheckService/CreditCheckSoapPort1)"
+            location="wsdl/credit.wsdl" />
+    </reference>
+    
+    <component name="InterestRateQuoteComponent">
+        <implementation.java class="mortgage.InterestRateQuoteImpl" />
+    </component>
+
+    <component name="RiskAssessmentComponent">
+        <implementation.java class="mortgage.RiskAssessmentImpl" />
+    </component>
+
+    <component name="MortgageCalculatorJSComponent"
+        xmlns:js="http://incubator.apache.org/tuscany/xmlns/container/js/1.0-incubator-M2">
+        <js:implementation.js script="MortgageCalculator.js" />
+    </component>
+
+</composite>

Modified: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/doc/mortgage_diagrams.doc
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/doc/mortgage_diagrams.doc?view=diff&rev=473043&r1=473042&r2=473043
==============================================================================
Binary files - no diff available.

Modified: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/wsdl/credit.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/wsdl/credit.wsdl?view=diff&rev=473043&r1=473042&r2=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/wsdl/credit.wsdl (original)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/main/resources/wsdl/credit.wsdl Thu Nov  9 11:37:11 2006
@@ -76,6 +76,9 @@
         <wsdl:port binding="tns:CreditCheckSoapBinding" name="CreditCheckSoapPort">
             <wsdlsoap:address location="http://localhost:8080/credit/services/CreditCheckWebService" />
         </wsdl:port>
+        <wsdl:port binding="tns:CreditCheckSoapBinding" name="CreditCheckSoapPort1">
+            <wsdlsoap:address location="http://localhost:8080/axis2/services/CreditCheckService" />
+        </wsdl:port>        
     </wsdl:service>
 
 </wsdl:definitions>

Modified: incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/test/java/mortgage/MortgageClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/test/java/mortgage/MortgageClientTestCase.java?view=diff&rev=473043&r1=473042&r2=473043
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/test/java/mortgage/MortgageClientTestCase.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples.M2/mortgage/src/test/java/mortgage/MortgageClientTestCase.java Thu Nov  9 11:37:11 2006
@@ -33,7 +33,12 @@
     private LoanApproval loanApproval;
 
     protected void setUp() throws Exception {
+        // version 1: One composite with local components
         setApplicationSCDL(LoanApproval.class, "META-INF/sca/default.scdl");
+        // version 2: two composites, one for mortgage and the other for credit
+        // setApplicationSCDL(LoanApproval.class, "META-INF/sca/default1.scdl");
+        // version 3: one composite and an external web service for credit
+        // setApplicationSCDL(LoanApproval.class, "META-INF/sca/default2.scdl");
         ClassLoader classLoader = getClass().getClassLoader();
         addExtension("binding.axis2", classLoader.getResource("META-INF/sca/binding.axis2.scdl"));
         addExtension("container.js", classLoader.getResource("META-INF/sca/js.system.scdl"));



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org