You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/06/09 13:52:28 UTC
svn commit: r189748 -
/webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl
/webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java
Author: chathura
Date: Thu Jun 9 04:52:27 2005
New Revision: 189748
URL: http://svn.apache.org/viewcvs?rev=189748&view=rev
Log:
Test case for JIRA issue AXIS2-25
Added:
webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java
Modified:
webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl
Modified: webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl?rev=189748&r1=189747&r2=189748&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl (original)
+++ webservices/axis/trunk/java/modules/wsdl/test-resources/BookQuote.wsdl Thu Jun 9 04:52:27 2005
@@ -28,13 +28,7 @@
<soap:operation/>
<input>
<soap:body use="literal" namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote/BookQuote"/>
- </input>
- <output>
- <soap:body use="literal" namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote/BookQuote"/>
- </output>
- <fault name="InvalidIsbnFault">
- <soap:fault name="InvalidIsbnFault" use="literal"/>
- </fault>
+ </input>
</operation>
</binding>
<service name="BookQuoteService">
Added: webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java?rev=189748&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java (added)
+++ webservices/axis/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java Thu Jun 9 04:52:27 2005
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.wsdl;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.wsdl.builder.WOMBuilderFactory;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class BindingOperationTest extends AbstractTestCase {
+
+ public BindingOperationTest(String arg) {
+ super(arg);
+ }
+
+ /**
+ * The WSDL should be passed properly and the WOM should be built if
+ * everything is allright
+ * @throws Exception
+ */
+ public void testBindingOperation() throws Exception {
+ WSDLDescription womDescription;
+
+ InputStream in = new FileInputStream(
+ getTestResourceFile("BookQuote.wsdl"));
+ womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11)
+ .build(in);
+
+ assertNotNull(womDescription);
+ if(null !=womDescription){
+ String ns = "http://www.Monson-Haefel.com/jwsbook/BookQuote";
+ WSDLBinding binding = womDescription.getBinding(new QName(ns,"BookQuoteBinding"));
+ WSDLBindingOperation bindingOperation = binding.getBindingOperation(new QName(ns, "getBookPrice"));
+ assertNotNull(bindingOperation.getInput());
+ assertNull(bindingOperation.getOutput());
+ }
+
+ }
+}
\ No newline at end of file