Author: heiko.braun(a)jboss.com
Date: 2006-11-09 07:07:09 -0500 (Thu, 09 Nov 2006)
New Revision: 1410
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Order.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderItem.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmt.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/OrderStatus.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/cc/
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationService.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/ObjectFactory.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationRequest.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationResponse.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/package-info.java
Log:
JBW samples
Added: 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-08
06:22:20 UTC (rev 1409)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import java.io.Serializable;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since Nov 7, 2006
+ */
+public class Customer implements Serializable {
+ private String firstName;
+ private String lastName;
+ private String creditCardDetails;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getCreditCardDetails() {
+ return creditCardDetails;
+ }
+
+ public void setCreditCardDetails(String creditCardDetails) {
+ this.creditCardDetails = creditCardDetails;
+ }
+}
+
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Customer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Order.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Order.java 2006-11-08
06:22:20 UTC (rev 1409)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Order.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.Serializable;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since Nov 7, 2006
+ */
+public class Order implements Serializable {
+
+ public enum OrderState {TRANSIENT, PREPARED, VERIFIED, PROCESSED}
+
+ private OrderState state;
+ private long orderNum;
+ private Customer customer;
+ private List<OrderItem> items;
+
+ public Order(Customer customer) {
+ this.customer = customer;
+ }
+
+ public Order() {
+ this.state = OrderState.TRANSIENT;
+ }
+
+ public long getOrderNum() {
+ return orderNum;
+ }
+
+ public void setOrderNum(long orderNum) {
+ this.orderNum = orderNum;
+ }
+
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public List<OrderItem> getItems() {
+ if(null==items)
+ items = new ArrayList<OrderItem>();
+ return items;
+ }
+
+ public OrderState getState() {
+ return state;
+ }
+
+ public void setState(OrderState state) {
+ this.state = state;
+ }
+
+ public String toString() {
+ return "Order {num="+orderNum+"}";
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/Order.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderItem.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderItem.java 2006-11-08
06:22:20 UTC (rev 1409)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderItem.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import java.io.Serializable;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since Nov 7, 2006
+ */
+public class OrderItem implements Serializable {
+ private String name;
+ private double price;
+
+ public OrderItem() {
+ }
+
+ public OrderItem(String name, double price) {
+ this.name = name;
+ this.price = price;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderItem.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmt.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmt.java 2006-11-08
06:22:20 UTC (rev 1409)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmt.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.ejb.Remote;
+
+@Remote
+@WebService(name = "OrderMgmt", targetNamespace =
"http://org.jboss.ws/samples/retail", serviceName =
"OrderMgmtService")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface OrderMgmt {
+
+ @WebMethod
+ public OrderStatus prepareOrder(Order order);
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: 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-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import org.jboss.test.ws.jaxws.samples.retail.cc.CCVerificationService;
+import org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification;
+import org.jboss.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+
+@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;
+
+ private CCVerification verificationPort;
+
+ @PostConstruct
+ public void initialize(){
+ verificationPort = verificationService.getCCVerificationPort();
+ }
+
+ public OrderStatus prepareOrder(Order order) {
+
+ log.info("Preparing order " + order);
+
+ return checkOrderDetails(order);
+ }
+
+ private OrderStatus checkOrderDetails(Order order)
+ {
+ // verify creditcard
+ String creditCardDetails = order.getCustomer().getCreditCardDetails();
+ boolean validCC = verificationPort.verify(creditCardDetails);
+
+ log.info(creditCardDetails + " valid? " + validCC);
+
+ // transition to prepared state
+ order.setState(Order.OrderState.PREPARED);
+ return new OrderStatus("PREPARED", order.getOrderNum());
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderStatus.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderStatus.java 2006-11-08
06:22:20 UTC (rev 1409)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderStatus.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import java.io.Serializable;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since Nov 8, 2006
+ */
+public class OrderStatus implements Serializable {
+ private String status;
+ private long orderNum;
+
+ public OrderStatus() {
+ }
+
+ public OrderStatus(String status, long orderNum) {
+ this.status = status;
+ this.orderNum = orderNum;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public long getOrderNum() {
+ return orderNum;
+ }
+
+ public void setOrderNum(long orderNum) {
+ this.orderNum = orderNum;
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderStatus.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
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-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,102 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail;
+
+import junit.framework.Test;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since Nov 8, 2006
+ */
+public class RetailSampleTestCase extends JBossWSTest {
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-retail/OrderMgmtBean";
+
+ private static Order ORDER;
+ private static Customer CUSTOMER;
+
+ static {
+
+ CUSTOMER = new Customer();
+ CUSTOMER.setFirstName("Chuck");
+ CUSTOMER.setLastName("Norris");
+ CUSTOMER.setCreditCardDetails("1000-4567-3456-XXXX");
+
+ ORDER = new Order(CUSTOMER);
+ ORDER.setOrderNum(12345);
+ ORDER.getItems().add( new OrderItem("Introduction to Web Services",
39.99) );
+ }
+
+ private OrderMgmt orderMgmtWS;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(RetailSampleTestCase.class,
"jaxws-samples-retail.jar, jaxws-samples-retail-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+
+ QName serviceName = new QName("http://org.jboss.ws/samples/retail",
"OrderMgmtService");
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS+"?wsdl");
+
+ javax.xml.ws.Service service = javax.xml.ws.Service.create(wsdlURL, serviceName);
+ orderMgmtWS = (OrderMgmt)service.getPort(OrderMgmt.class);
+
+ }
+
+ public void testRemoteAccess() throws Exception
+ {
+ InitialContext iniCtx = getInitialContext();
+ OrderMgmt orderMgmtEJB =
(OrderMgmt)iniCtx.lookup("/OrderMgmtBean/remote");
+ assertNotNull(orderMgmtEJB);
+
+ OrderStatus result = orderMgmtEJB.prepareOrder(ORDER);
+ assertEquals("PREPARED", result.getStatus());
+ }
+
+ public void testWebService() throws Exception
+ {
+ assertWSDLAccess();
+
+ OrderStatus result = orderMgmtWS.prepareOrder(ORDER);
+ assertEquals("PREPARED", result.getStatus());
+ }
+
+ private void assertWSDLAccess() throws MalformedURLException
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ assertNotNull(wsdlDefinitions);
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.1-10/21/2006 12:56 AM(vivek)-EA2
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "CCVerification", targetNamespace =
"http://org.jboss.ws/samples/retail/cc")
+public interface CCVerification {
+
+
+ /**
+ *
+ * @param creditCardNumber
+ * @return
+ * returns boolean
+ */
+ @WebMethod
+ @WebResult(name = "verified", targetNamespace = "")
+ @RequestWrapper(localName = "verify", targetNamespace =
"http://org.jboss.ws/samples/retail/cc", className =
"org.jboss.test.ws.jaxws.samples.retail.cc.VerificationRequest")
+ @ResponseWrapper(localName = "verifyResponse", targetNamespace =
"http://org.jboss.ws/samples/retail/cc", className =
"org.jboss.test.ws.jaxws.samples.retail.cc.VerificationResponse")
+ public boolean verify(
+ @WebParam(name = "creditCardNumber", targetNamespace = "")
+ String creditCardNumber);
+
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import org.jboss.logging.Logger;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+@Stateless
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification")
+public class CCVerificationBean implements CCVerification {
+
+ private static final Logger log = Logger.getLogger(CCVerificationBean.class);
+
+ public boolean verify(String creditcard) {
+
+ log.info("Verifying credit card: " + creditcard);
+
+ return true;
+ }
+
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationService.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationService.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationService.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,51 @@
+
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.1-10/21/2006 12:56 AM(vivek)-EA2
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "CCVerificationService", targetNamespace =
"http://org.jboss.ws/samples/retail/cc", wsdlLocation =
"resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl")
+public class CCVerificationService
+ extends Service
+{
+
+ private final static URL CCVERIFICATIONSERVICE_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new
URL("file:/C:/dev/prj/jbossws/trunk/src/test/resources/jaxws/samples/retail/META-INF/wsdl/CCVerificationService.wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ CCVERIFICATIONSERVICE_WSDL_LOCATION = url;
+ }
+
+ public CCVerificationService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public CCVerificationService() {
+ super(CCVERIFICATIONSERVICE_WSDL_LOCATION, new
QName("http://org.jboss.ws/samples/retail/cc",
"CCVerificationService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns CCVerification
+ */
+ @WebEndpoint(name = "CCVerificationPort")
+ public CCVerification getCCVerificationPort() {
+ return (CCVerification)super.getPort(new
QName("http://org.jboss.ws/samples/retail/cc", "CCVerificationPort"),
CCVerification.class);
+ }
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/ObjectFactory.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/ObjectFactory.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/ObjectFactory.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,71 @@
+
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.samples.retail.cc package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _VerifyResponse_QNAME = new
QName("http://org.jboss.ws/samples/retail/cc", "verifyResponse");
+ private final static QName _Verify_QNAME = new
QName("http://org.jboss.ws/samples/retail/cc", "verify");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.samples.retail.cc
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link VerificationRequest }
+ *
+ */
+ public VerificationRequest createVerificationRequest() {
+ return new VerificationRequest();
+ }
+
+ /**
+ * Create an instance of {@link VerificationResponse }
+ *
+ */
+ public VerificationResponse createVerificationResponse() {
+ return new VerificationResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link VerificationResponse
}{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://org.jboss.ws/samples/retail/cc", name =
"verifyResponse")
+ public JAXBElement<VerificationResponse>
createVerifyResponse(VerificationResponse value) {
+ return new JAXBElement<VerificationResponse>(_VerifyResponse_QNAME,
VerificationResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link VerificationRequest
}{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://org.jboss.ws/samples/retail/cc", name =
"verify")
+ public JAXBElement<VerificationRequest> createVerify(VerificationRequest value)
{
+ return new JAXBElement<VerificationRequest>(_Verify_QNAME,
VerificationRequest.class, null, value);
+ }
+
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationRequest.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationRequest.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationRequest.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,60 @@
+
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for verificationRequest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="verificationRequest">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="creditCardNumber"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "verificationRequest", propOrder = {
+ "creditCardNumber"
+})
+public class VerificationRequest {
+
+ protected String creditCardNumber;
+
+ /**
+ * Gets the value of the creditCardNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCreditCardNumber() {
+ return creditCardNumber;
+ }
+
+ /**
+ * Sets the value of the creditCardNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCreditCardNumber(String value) {
+ this.creditCardNumber = value;
+ }
+
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationResponse.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationResponse.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationResponse.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,52 @@
+
+package org.jboss.test.ws.jaxws.samples.retail.cc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for verificationResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="verificationResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="verified"
type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "verificationResponse", propOrder = {
+ "verified"
+})
+public class VerificationResponse {
+
+ protected boolean verified;
+
+ /**
+ * Gets the value of the verified property.
+ *
+ */
+ public boolean isVerified() {
+ return verified;
+ }
+
+ /**
+ * Sets the value of the verified property.
+ *
+ */
+ public void setVerified(boolean value) {
+ this.verified = value;
+ }
+
+}
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/VerificationResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/package-info.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/package-info.java 2006-11-08
06:22:20 UTC (rev 1409)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/package-info.java 2006-11-09
12:07:09 UTC (rev 1410)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://org.jboss.ws/samples/retail/cc")
+package org.jboss.test.ws.jaxws.samples.retail.cc;
Property changes on:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF