Listing 1:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://CreditApprovalSCAModule">
  <xsd:complexType name="CreditApplication">
    <xsd:sequence>
      <xsd:element minOccurs="0" name="customerId" type="xsd:string"/>
      <xsd:element minOccurs="0" name="firstName" type="xsd:string"/>
      <xsd:element minOccurs="0" name="lastName" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

Listing 2:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:bons1="http://CreditApprovalSCAModule"
xmlns:tns="http://CreditApprovalSCAModule/CreditApproval"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="CreditApproval"
targetNamespace="http://CreditApprovalSCAModule/CreditApproval">
  <wsdl:types>
    <xsd:schema targetNamespace="http://CreditApprovalSCAModule/CreditApproval" 
	xmlns:bons1="http://CreditApprovalSCAModule" 
	xmlns:tns="http://CreditApprovalSCAModule/CreditApproval" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://CreditApprovalSCAModule" 
	  schemaLocation="xsd-includes/http.CreditApprovalSCAModule.xsd"/>
      <xsd:element name="calculateCreditRating">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="CreditApplication" nillable="true" 
			type="bons1:CreditApplication"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="calculateCreditRatingResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="CreditRating" nillable="true" 
			type="bons1:CreditRating"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
    <wsdl:message name="calculateCreditRatingRequestMsg">
    <wsdl:part element="tns:calculateCreditRating" 
	name="calculateCreditRatingParameters"/>
  </wsdl:message>
    <wsdl:message name="calculateCreditRatingResponseMsg">
    <wsdl:part element="tns:calculateCreditRatingResponse"
	name="calculateCreditRatingResult"/>
  </wsdl:message>
    <wsdl:portType name="CreditApproval">
    <wsdl:operation name="calculateCreditRating">
      <wsdl:input message="tns:calculateCreditRatingRequestMsg" 
	  name="calculateCreditRatingRequest"/>
      <wsdl:output message="tns:calculateCreditRatingResponseMsg" 
	  name="calculateCreditRatingResponse"/>
    </wsdl:operation>
  </wsdl:portType>
</wsdl:definitions>

Listing 3:

public DataObject calculateCreditRating(DataObject creditApplication) {
//	Create and return a credit rating object.
	System.out.println("********* credit approval service invoked ******");
	ServiceManager serviceManager = new ServiceManager();

	BOFactory bof = (BOFactory)serviceManager.locateService
	("com/ibm/websphere/bo/BOFactory");
	System.out.println("********* BOFactory created ******");
	DataObject creditRating = bof.create("http://CreditApproval", "CreditRating");

	System.out.println("********* credit rating object created ******");
	creditRating.setString("customerId", creditApplication.getString("customerId"));

	creditRating.setInt("creditScore", 750);
	creditRating.setDouble("creditLimit", 10000d);
	System.out.println("********* returning credit rating object ******");

	return creditRating;

}