Author: heiko.braun(a)jboss.com
Date: 2006-11-09 09:05:46 -0500 (Thu, 09 Nov 2006)
New Revision: 1417
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountRequest.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountResponse.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmt.java
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/OrderMgmtService.wsdl
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/ProfileMgmtService.wsdl
Log:
JBW samples
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java 2006-11-09
13:33:03 UTC (rev 1416)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -49,7 +49,7 @@
public void setLastName(String lastName) {
this.lastName = lastName;
}
-
+
public String getCreditCardDetails() {
return creditCardDetails;
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -23,6 +23,10 @@
import org.jboss.test.ws.jaxws.samples.retail.cc.CCVerificationService;
import org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification;
+import org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmtService;
+import org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt;
+import org.jboss.test.ws.jaxws.samples.retail.profile.DiscountRequest;
+import org.jboss.test.ws.jaxws.samples.retail.profile.DiscountResponse;
import org.jboss.logging.Logger;
import javax.annotation.PostConstruct;
@@ -30,39 +34,57 @@
import javax.jws.WebService;
import javax.xml.ws.WebServiceRef;
+/**
+ * An example order management component
+ * that offers access though RMI and SOAP
+ */
@Stateless
@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.OrderMgmt")
public class OrderMgmtBean implements OrderMgmt {
private static final Logger log = Logger.getLogger(OrderMgmtBean.class);
- @WebServiceRef
- private CCVerificationService verificationService;
-
+ @WebServiceRef private CCVerificationService verificationService;
private CCVerification verificationPort;
- @PostConstruct
- public void initialize(){
+ @WebServiceRef private ProfileMgmtService profileService;
+ private ProfileMgmt profilePort;
+
+ @PostConstruct public void initialize(){
verificationPort = verificationService.getCCVerificationPort();
+ profilePort = profileService.getProfileMgmtPort();
}
+ /**
+ * Prepare a customer order.
+ * This will verify the billing details (i.e. creditcard)
+ * and check if the customer qualifies for a discount
+ * (applies to high value customers only)
+ *
+ * @param order
+ * @return OrderStaus
+ */
public OrderStatus prepareOrder(Order order) {
log.info("Preparing order " + order);
- return checkOrderDetails(order);
- }
+ // verify billing details
+ String creditCard = order.getCustomer().getCreditCardDetails();
+ boolean isValidCard = verificationPort.verify(creditCard);
+ log.info(creditCard + " valid? " + isValidCard);
- private OrderStatus checkOrderDetails(Order order)
- {
- // verify creditcard
- String creditCardDetails = order.getCustomer().getCreditCardDetails();
- boolean validCC = verificationPort.verify(creditCardDetails);
+ // high value customer discount
+ DiscountRequest discountRequest = new DiscountRequest(order.getCustomer());
+ DiscountResponse discount = profilePort.getCustomerDiscount(discountRequest);
+ boolean hasDiscount = discount.getDiscount() > 0.00;
+ log.info("High value customer ? " + hasDiscount);
- log.info(creditCardDetails + " valid? " + validCC);
-
// transition to prepared state
order.setState(Order.OrderState.PREPARED);
- return new OrderStatus("PREPARED", order.getOrderNum());
+
+ // done
+ return new OrderStatus("Prepared", order.getOrderNum());
}
+
+
}
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -44,8 +44,8 @@
private static Order ORDER;
private static Customer CUSTOMER;
- static {
-
+ static
+ {
CUSTOMER = new Customer();
CUSTOMER.setFirstName("Chuck");
CUSTOMER.setLastName("Norris");
@@ -81,7 +81,7 @@
assertNotNull(orderMgmtEJB);
OrderStatus result = orderMgmtEJB.prepareOrder(ORDER);
- assertEquals("PREPARED", result.getStatus());
+ assertEquals("Prepared", result.getStatus());
}
public void testWebService() throws Exception
@@ -89,7 +89,7 @@
assertWSDLAccess();
OrderStatus result = orderMgmtWS.prepareOrder(ORDER);
- assertEquals("PREPARED", result.getStatus());
+ assertEquals("Prepared", result.getStatus());
}
private void assertWSDLAccess() throws MalformedURLException
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountRequest.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountRequest.java 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountRequest.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -7,6 +7,30 @@
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for discountRequest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="discountRequest">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customer"
type="{http://org.jboss.ws/samples/retail}customer"
minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "discountRequest", propOrder = {
+ "customer"
+ })
public class DiscountRequest {
protected Customer customer;
@@ -18,10 +42,26 @@
this.customer = customer;
}
+ /**
+ * Gets the value of the customer property.
+ *
+ * @return
+ * possible object is
+ * {@link Customer }
+ *
+ */
public Customer getCustomer() {
return customer;
}
+ /**
+ * Sets the value of the customer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Customer }
+ *
+ */
public void setCustomer(Customer value) {
this.customer = value;
}
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountResponse.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountResponse.java 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/DiscountResponse.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -3,7 +3,36 @@
import org.jboss.test.ws.jaxws.samples.retail.Customer;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for discountResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="discountResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customer"
type="{http://org.jboss.ws/samples/retail}customer"
minOccurs="0"/>
+ * <element name="discount"
type="{http://www.w3.org/2001/XMLSchema}double"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "discountResponse", propOrder = {
+ "customer",
+ "discount"
+ })
public class DiscountResponse {
protected Customer customer;
@@ -17,18 +46,42 @@
this.discount = discount;
}
+ /**
+ * Gets the value of the customer property.
+ *
+ * @return
+ * possible object is
+ * {@link Customer }
+ *
+ */
public Customer getCustomer() {
return customer;
}
+ /**
+ * Sets the value of the customer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Customer }
+ *
+ */
public void setCustomer(Customer value) {
this.customer = value;
}
+ /**
+ * Gets the value of the discount property.
+ *
+ */
public double getDiscount() {
return discount;
}
+ /**
+ * Sets the value of the discount property.
+ *
+ */
public void setDiscount(double value) {
this.discount = value;
}
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmt.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmt.java 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmt.java 2006-11-09
14:05:46 UTC (rev 1417)
@@ -6,12 +6,13 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+
@Remote
-@WebService(name = "ProfileMgmt", targetNamespace =
"http://org.jboss.ws/samples/retail/profile")
+@WebService(name = "ProfileMgmt", targetNamespace =
"http://org.jboss.ws/samples/retail/profile", serviceName =
"ProfileMgmtService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface ProfileMgmt {
@WebMethod
- public DiscountResponse getCustomerDiscount( DiscountRequest request);
+ public DiscountResponse getCustomerDiscount(DiscountRequest request);
}
Modified:
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl
===================================================================
---
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl 2006-11-09
14:05:46 UTC (rev 1417)
@@ -1,47 +1,47 @@
<definitions name="CCVerificationService"
targetNamespace="http://org.jboss.ws/samples/retail/cc"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://org.jboss.ws/samples/retail/cc"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <xs:schema targetNamespace="http://org.jboss.ws/samples/retail/cc"
version="1.0" xmlns:tns="http://org.jboss.ws/samples/retail/cc"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="verify" nillable="true"
type="tns:verificationRequest"/>
- <xs:element name="verifyResponse" nillable="true"
type="tns:verificationResponse"/>
- <xs:complexType name="verificationRequest">
- <xs:sequence>
- <xs:element minOccurs="0" name="creditCardNumber"
type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="verificationResponse">
- <xs:sequence>
- <xs:element name="verified" type="xs:boolean"/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- </types>
- <message name="CCVerification_verify">
- <part element="tns:verify" name="verify"/>
- </message>
- <message name="CCVerification_verifyResponse">
- <part element="tns:verifyResponse" name="verifyResponse"/>
- </message>
- <portType name="CCVerification">
- <operation name="verify" parameterOrder="verify">
- <input message="tns:CCVerification_verify"/>
- <output message="tns:CCVerification_verifyResponse"/>
- </operation>
- </portType>
- <binding name="CCVerificationBinding"
type="tns:CCVerification">
- <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="verify">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="CCVerificationService">
- <port binding="tns:CCVerificationBinding"
name="CCVerificationPort">
- <soap:address
location="http://D1XC662J:8080/jaxws-samples-retail/CCVerificationBean"/>
- </port>
- </service>
+ <types>
+ <xs:schema targetNamespace="http://org.jboss.ws/samples/retail/cc"
version="1.0" xmlns:tns="http://org.jboss.ws/samples/retail/cc"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="verify" nillable="true"
type="tns:verificationRequest"/>
+ <xs:element name="verifyResponse" nillable="true"
type="tns:verificationResponse"/>
+ <xs:complexType name="verificationRequest">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="creditCardNumber"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="verificationResponse">
+ <xs:sequence>
+ <xs:element name="verified" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="CCVerification_verify">
+ <part element="tns:verify" name="verify"/>
+ </message>
+ <message name="CCVerification_verifyResponse">
+ <part element="tns:verifyResponse"
name="verifyResponse"/>
+ </message>
+ <portType name="CCVerification">
+ <operation name="verify" parameterOrder="verify">
+ <input message="tns:CCVerification_verify"/>
+ <output message="tns:CCVerification_verifyResponse"/>
+ </operation>
+ </portType>
+ <binding name="CCVerificationBinding"
type="tns:CCVerification">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verify">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="CCVerificationService">
+ <port binding="tns:CCVerificationBinding"
name="CCVerificationPort">
+ <soap:address
location="http://D1XC662J:8080/jaxws-samples-retail/CCVerificationBean"/>
+ </port>
+ </service>
</definitions>
\ No newline at end of file
Modified:
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/OrderMgmtService.wsdl
===================================================================
---
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/OrderMgmtService.wsdl 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/OrderMgmtService.wsdl 2006-11-09
14:05:46 UTC (rev 1417)
@@ -1,65 +1,65 @@
<definitions name="OrderMgmtService"
targetNamespace="http://org.jboss.ws/samples/retail"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://org.jboss.ws/samples/retail"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <xs:schema targetNamespace="http://org.jboss.ws/samples/retail"
version="1.0" xmlns:tns="http://org.jboss.ws/samples/retail"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="prepareOrder" nillable="true"
type="tns:order"/>
- <xs:element name="prepareOrderResponse" nillable="true"
type="tns:orderStatus"/>
- <xs:complexType name="order">
- <xs:sequence>
- <xs:element minOccurs="0" name="customer"
type="tns:customer"/>
- <xs:element name="orderNum" type="xs:long"/>
- <xs:element minOccurs="0" name="state"
type="tns:orderState"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="customer">
- <xs:sequence>
- <xs:element minOccurs="0" name="creditCardDetails"
type="xs:string"/>
- <xs:element minOccurs="0" name="firstName"
type="xs:string"/>
- <xs:element minOccurs="0" name="lastName"
type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="orderStatus">
- <xs:sequence>
- <xs:element name="orderNum" type="xs:long"/>
- <xs:element minOccurs="0" name="status"
type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:simpleType name="orderState">
- <xs:restriction base="xs:string">
- <xs:enumeration value="PROCESSED"/>
- <xs:enumeration value="VERIFIED"/>
- <xs:enumeration value="PREPARED"/>
- <xs:enumeration value="TRANSIENT"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:schema>
- </types>
- <message name="OrderMgmt_prepareOrderResponse">
- <part element="tns:prepareOrderResponse"
name="prepareOrderResponse"/>
- </message>
- <message name="OrderMgmt_prepareOrder">
- <part element="tns:prepareOrder" name="prepareOrder"/>
- </message>
- <portType name="OrderMgmt">
- <operation name="prepareOrder"
parameterOrder="prepareOrder">
- <input message="tns:OrderMgmt_prepareOrder"/>
- <output message="tns:OrderMgmt_prepareOrderResponse"/>
- </operation>
- </portType>
- <binding name="OrderMgmtBinding" type="tns:OrderMgmt">
- <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="prepareOrder">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="OrderMgmtService">
- <port binding="tns:OrderMgmtBinding" name="OrderMgmtPort">
- <soap:address
location="http://D1XC662J:8080/jaxws-samples-retail/OrderMgmtBean"/>
- </port>
- </service>
+ <types>
+ <xs:schema targetNamespace="http://org.jboss.ws/samples/retail"
version="1.0" xmlns:tns="http://org.jboss.ws/samples/retail"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="prepareOrder" nillable="true"
type="tns:order"/>
+ <xs:element name="prepareOrderResponse" nillable="true"
type="tns:orderStatus"/>
+ <xs:complexType name="order">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="customer"
type="tns:customer"/>
+ <xs:element name="orderNum" type="xs:long"/>
+ <xs:element minOccurs="0" name="state"
type="tns:orderState"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="customer">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="creditCardDetails"
type="xs:string"/>
+ <xs:element minOccurs="0" name="firstName"
type="xs:string"/>
+ <xs:element minOccurs="0" name="lastName"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="orderStatus">
+ <xs:sequence>
+ <xs:element name="orderNum" type="xs:long"/>
+ <xs:element minOccurs="0" name="status"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="orderState">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PROCESSED"/>
+ <xs:enumeration value="VERIFIED"/>
+ <xs:enumeration value="PREPARED"/>
+ <xs:enumeration value="TRANSIENT"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:schema>
+ </types>
+ <message name="OrderMgmt_prepareOrderResponse">
+ <part element="tns:prepareOrderResponse"
name="prepareOrderResponse"/>
+ </message>
+ <message name="OrderMgmt_prepareOrder">
+ <part element="tns:prepareOrder" name="prepareOrder"/>
+ </message>
+ <portType name="OrderMgmt">
+ <operation name="prepareOrder"
parameterOrder="prepareOrder">
+ <input message="tns:OrderMgmt_prepareOrder"/>
+ <output message="tns:OrderMgmt_prepareOrderResponse"/>
+ </operation>
+ </portType>
+ <binding name="OrderMgmtBinding" type="tns:OrderMgmt">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="prepareOrder">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="OrderMgmtService">
+ <port binding="tns:OrderMgmtBinding"
name="OrderMgmtPort">
+ <soap:address
location="http://D1XC662J:8080/jaxws-samples-retail/OrderMgmtBean"/>
+ </port>
+ </service>
</definitions>
\ No newline at end of file
Modified:
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/ProfileMgmtService.wsdl
===================================================================
---
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/ProfileMgmtService.wsdl 2006-11-09
13:33:03 UTC (rev 1416)
+++
trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/ProfileMgmtService.wsdl 2006-11-09
14:05:46 UTC (rev 1417)
@@ -1,64 +1,67 @@
<definitions name='ProfileMgmtService'
targetNamespace='http://org.jboss.ws/samples/retail/profile'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:ns1='http://org.jboss.ws/samples/retail'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.ws/samples/retail/profile'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <xs:schema targetNamespace='http://org.jboss.ws/samples/retail/profile'
version='1.0' xmlns:ns1='http://org.jboss.ws/samples/retail'
xmlns:tns='http://org.jboss.ws/samples/retail/profile'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:import namespace='http://org.jboss.ws/samples/retail'/>
- <xs:element name='getCustomerDiscount' nillable='true'
type='tns:discountRequest'/>
- <xs:element name='getCustomerDiscountResponse' nillable='true'
type='tns:discountResponse'/>
- <xs:complexType name='discountRequest'>
- <xs:sequence>
- <xs:element minOccurs='0' name='customer'
type='ns1:customer'/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name='discountResponse'>
- <xs:sequence>
- <xs:element minOccurs='0' name='customer'
type='ns1:customer'/>
- <xs:element name='discount' type='xs:double'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
+ <types>
- <xs:schema targetNamespace='http://org.jboss.ws/samples/retail'
version='1.0'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:complexType name='customer'>
- <xs:sequence>
- <xs:element minOccurs='0' name='creditCardDetails'
type='xs:string'/>
- <xs:element minOccurs='0' name='firstName'
type='xs:string'/>
- <xs:element minOccurs='0' name='lastName'
type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
+ <xs:schema targetNamespace='http://org.jboss.ws/samples/retail'
version='1.0'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name='customer'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='creditCardDetails'
type='xs:string'/>
+ <xs:element minOccurs='0' name='firstName'
type='xs:string'/>
+ <xs:element minOccurs='0' name='lastName'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
- </types>
- <message name='ProfileMgmt_getCustomerDiscount'>
- <part element='tns:getCustomerDiscount'
name='getCustomerDiscount'/>
- </message>
- <message name='ProfileMgmt_getCustomerDiscountResponse'>
- <part element='tns:getCustomerDiscountResponse'
name='getCustomerDiscountResponse'/>
- </message>
- <portType name='ProfileMgmt'>
- <operation name='getCustomerDiscount'
parameterOrder='getCustomerDiscount'>
+ <xs:schema targetNamespace='http://org.jboss.ws/samples/retail/profile'
version='1.0' xmlns:ns1='http://org.jboss.ws/samples/retail'
xmlns:tns='http://org.jboss.ws/samples/retail/profile'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:import namespace='http://org.jboss.ws/samples/retail'/>
+ <xs:element name='getCustomerDiscount' nillable='true'
type='tns:discountRequest'/>
+ <xs:element name='getCustomerDiscountResponse'
nillable='true' type='tns:discountResponse'/>
+ <xs:complexType name='discountRequest'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='customer'
type='ns1:customer'/>
- <input message='tns:ProfileMgmt_getCustomerDiscount'/>
- <output message='tns:ProfileMgmt_getCustomerDiscountResponse'/>
- </operation>
- </portType>
- <binding name='ProfileMgmtBinding' type='tns:ProfileMgmt'>
- <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='getCustomerDiscount'>
- <soap:operation soapAction=''/>
- <input>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='discountResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='customer'
type='ns1:customer'/>
+ <xs:element name='discount' type='xs:double'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
- <soap:body use='literal'/>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='ProfileMgmtService'>
- <port binding='tns:ProfileMgmtBinding' name='ProfileMgmtPort'>
+ </types>
- <soap:address
location='http://D1XC662J:8080/jaxws-samples-retail/ProfileMgmtBean'/>
- </port>
- </service>
+ <message name='ProfileMgmt_getCustomerDiscount'>
+ <part element='tns:getCustomerDiscount'
name='getCustomerDiscount'/>
+ </message>
+ <message name='ProfileMgmt_getCustomerDiscountResponse'>
+ <part element='tns:getCustomerDiscountResponse'
name='getCustomerDiscountResponse'/>
+ </message>
+ <portType name='ProfileMgmt'>
+ <operation name='getCustomerDiscount'
parameterOrder='getCustomerDiscount'>
+
+ <input message='tns:ProfileMgmt_getCustomerDiscount'/>
+ <output message='tns:ProfileMgmt_getCustomerDiscountResponse'/>
+ </operation>
+ </portType>
+ <binding name='ProfileMgmtBinding' type='tns:ProfileMgmt'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getCustomerDiscount'>
+ <soap:operation soapAction=''/>
+ <input>
+
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ProfileMgmtService'>
+ <port binding='tns:ProfileMgmtBinding'
name='ProfileMgmtPort'>
+
+ <soap:address
location='http://D1XC662J:8080/jaxws-samples-retail/ProfileMgmtBean'/>
+ </port>
+ </service>
</definitions>
\ No newline at end of file