Source Code Cross Referenced for RetailerServiceTestCase.java in  » J2EE » enhydra » org » apache » axis » wsi » scm » retailer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » enhydra » org.apache.axis.wsi.scm.retailer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /**
02:         * RetailerServiceTestCase.java
03:         *
04:         * This file was auto-generated from WSDL
05:         * by the Apache Axis 1.2alpha Jan 15, 2004 (11:28:11 EST) WSDL2Java emitter.
06:         */package org.apache.axis.wsi.scm.retailer;
07:
08:        public class RetailerServiceTestCase extends junit.framework.TestCase {
09:            public RetailerServiceTestCase(java.lang.String name) {
10:                super (name);
11:            }
12:
13:            /* FIXME: RUNTIME WSDL broken.
14:            public void testRetailerPortWSDL() throws Exception {
15:                javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
16:                java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.retailer.RetailerServiceLocator().getRetailerPortAddress() + "?WSDL");
17:                javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.retailer.RetailerServiceLocator().getServiceName());
18:                assertTrue(service != null);
19:            }
20:             */
21:
22:            public void test1RetailerPortGetCatalog() throws Exception {
23:                org.apache.axis.wsi.scm.retailer.RetailerSoapBindingStub binding;
24:                try {
25:                    binding = (org.apache.axis.wsi.scm.retailer.RetailerSoapBindingStub) new org.apache.axis.wsi.scm.retailer.RetailerServiceLocator()
26:                            .getRetailerPort();
27:                } catch (javax.xml.rpc.ServiceException jre) {
28:                    if (jre.getLinkedCause() != null)
29:                        jre.getLinkedCause().printStackTrace();
30:                    throw new junit.framework.AssertionFailedError(
31:                            "JAX-RPC ServiceException caught: " + jre);
32:                }
33:                assertNotNull("binding is null", binding);
34:
35:                // Time out after a minute
36:                binding.setTimeout(60000);
37:
38:                // Test operation
39:                org.apache.axis.wsi.scm.retailer.catalog.CatalogType catalog = null;
40:                catalog = binding.getCatalog();
41:                // TBD - validate results
42:
43:                assertNotNull("catalog is null", catalog);
44:
45:                org.apache.axis.wsi.scm.retailer.catalog.CatalogItem[] items = catalog
46:                        .getItem();
47:
48:                assertTrue(items.length > 0);
49:
50:                for (int i = 0; i < items.length; i++) {
51:                    System.out.println("------------------");
52:                    System.out.println(items[i].getName());
53:                    System.out.println(items[i].getBrand());
54:                }
55:            }
56:
57:            public void test2RetailerPortSubmitOrder() throws Exception {
58:                org.apache.axis.wsi.scm.retailer.RetailerSoapBindingStub binding;
59:                try {
60:                    binding = (org.apache.axis.wsi.scm.retailer.RetailerSoapBindingStub) new org.apache.axis.wsi.scm.retailer.RetailerServiceLocator()
61:                            .getRetailerPort();
62:                } catch (javax.xml.rpc.ServiceException jre) {
63:                    if (jre.getLinkedCause() != null)
64:                        jre.getLinkedCause().printStackTrace();
65:                    throw new junit.framework.AssertionFailedError(
66:                            "JAX-RPC ServiceException caught: " + jre);
67:                }
68:                assertNotNull("binding is null", binding);
69:
70:                // Time out after a minute
71:                binding.setTimeout(60000);
72:
73:                // Test operation
74:                try {
75:                    org.apache.axis.wsi.scm.retailer.order.PartsOrderResponseType value = null;
76:                    value = binding
77:                            .submitOrder(
78:                                    new org.apache.axis.wsi.scm.retailer.order.PartsOrderType(),
79:                                    new org.apache.axis.wsi.scm.retailer.order.CustomerDetailsType(),
80:                                    new org.apache.axis.wsi.scm.configuration.ConfigurationType());
81:                } catch (org.apache.axis.wsi.scm.retailer.order.InvalidProductCodeType e1) {
82:                    throw new junit.framework.AssertionFailedError(
83:                            "InvalidProductCode Exception caught: " + e1);
84:                } catch (org.apache.axis.wsi.scm.retailer.BadOrderFault e2) {
85:                    throw new junit.framework.AssertionFailedError(
86:                            "BadOrder Exception caught: " + e2);
87:                } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e3) {
88:                    throw new junit.framework.AssertionFailedError(
89:                            "ConfigurationFault Exception caught: " + e3);
90:                }
91:                // TBD - validate results
92:            }
93:
94:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.