Author: alex.guizar(a)jboss.com
Date: 2007-03-02 06:02:35 -0500 (Fri, 02 Mar 2007)
New Revision: 2498
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/JBWS1553TestCase.java
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-binding-1.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-service.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/account.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/frontend.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/ticket.wsdl
Log:
JBWS-1553 handling of transitive wsdl imports
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/JBWS1553TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/JBWS1553TestCase.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/JBWS1553TestCase.java 2007-03-02
11:02:35 UTC (rev 2498)
@@ -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.jaxrpc.jbws1553;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.metadata.wsdl.NCName;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.metadata.wsdl.WSDLService;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:alex.guizar@jboss.com">Alejandro
Guizar</a>
+ * @version $Revision$
+ */
+public class JBWS1553TestCase extends TestCase
+{
+ private WSDLDefinitions definitions;
+ private static WSDLDefinitionsFactory definitionsFactory =
WSDLDefinitionsFactory.newInstance();
+
+ protected void setUp() throws Exception
+ {
+ URL wsdlLocation = new
File("resources/jaxrpc/jbws1553/atm-service.wsdl").toURL();
+ definitions = definitionsFactory.parse(wsdlLocation);
+ }
+
+ public void testPortType()
+ {
+ WSDLService atmService = definitions.getService(new
NCName("AtmFrontEndService"));
+ WSDLEndpoint endpoint = atmService.getEndpoint(new
QName("urn:samples:atm", "FrontEndPort"));
+ WSDLInterface _interface = endpoint.getInterface();
+ assertEquals(new QName("urn:samples:frontend", "FrontEnd"),
_interface.getQName());
+ }
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1553/JBWS1553TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-binding-1.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-binding-1.wsdl
(rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-binding-1.wsdl 2007-03-02
11:02:35 UTC (rev 2498)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:frontend"
+ xmlns:tns="urn:samples:frontend"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import namespace="urn:samples:frontend"
location="interface/frontend.wsdl" />
+
+ <binding name="FrontEndBinding" type="tns:FrontEnd">
+
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <operation name="connect">
+ <soap:operation soapAction="urn:samples:frontend:connect" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ </operation>
+
+ <operation name="disconnect">
+ <soap:operation soapAction="urn:samples:frontend:disconnect" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ </operation>
+
+ <operation name="status">
+ <soap:operation soapAction="urn:samples:frontend:status" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ </operation>
+
+ <operation name="logOn">
+ <soap:operation soapAction="urn:samples:frontend:logOn" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ <fault name="unauthorizedAccess">
+ <soap:fault name="unauthorizedAccess" use="literal" />
+ </fault>
+ </operation>
+
+ <operation name="logOff">
+ <soap:operation soapAction="urn:samples:frontend:logOff" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ </operation>
+
+ <operation name="getBalance">
+ <soap:operation soapAction="urn:samples:frontend:getBalance" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ </operation>
+
+ <operation name="deposit">
+ <soap:operation soapAction="urn:samples:frontend:deposit" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ </operation>
+
+ <operation name="withdraw">
+ <soap:operation soapAction="urn:samples:frontend:withdraw" />
+ <input>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="urn:samples:frontend"
/>
+ </output>
+ <fault name="insufficientFunds">
+ <soap:fault name="insufficientFunds" use="literal" />
+ </fault>
+ </operation>
+
+ </binding>
+
+</definitions>
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-binding-1.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-service.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-service.wsdl
(rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-service.wsdl 2007-03-02
11:02:35 UTC (rev 2498)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:atm"
xmlns:tns="urn:samples:atm"
+ xmlns:front="urn:samples:frontend"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import namespace="urn:samples:frontend"
location="atm-binding-1.wsdl" />
+
+ <service name="AtmFrontEndService">
+ <port name="FrontEndPort" binding="front:FrontEndBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URI" />
+ </port>
+ </service>
+
+</definitions>
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm-service.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm.wsdl
(rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm.wsdl 2007-03-02 11:02:35
UTC (rev 2498)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:atm"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:samples:atm"
+ xmlns:front="urn:samples:frontend" xmlns:tic="urn:samples:ticket"
+ xmlns:acc="urn:samples:account"
+
xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/&...
+
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <import namespace="urn:samples:frontend"
location="interface/frontend.wsdl" />
+ <import namespace="urn:samples:ticket"
location="interface/ticket.wsdl" />
+ <import namespace="urn:samples:account"
location="interface/account.wsdl" />
+
+ <!-- customer name property -->
+ <bpel:property name="customerId" type="xsd:string" />
+
+ <!-- location of costumerId inside messages -->
+ <bpel:propertyAlias propertyName="tns:customerId"
+ messageType="front:logOnRequest" part="customerName" />
+ <bpel:propertyAlias propertyName="tns:customerId"
+ messageType="front:balanceChange" part="customerName" />
+ <bpel:propertyAlias propertyName="tns:customerId"
+ messageType="acc:customerMessage" part="customerName" />
+ <bpel:propertyAlias propertyName="tns:customerId"
+ messageType="acc:accountOperation" part="body"
query="/body/customerName" />
+
+ <!-- ticket number property -->
+ <bpel:property name="ticketId" type="xsd:int" />
+
+ <!-- location of ticketId inside messages -->
+ <bpel:propertyAlias propertyName="tns:ticketId"
+ messageType="tic:ticketMessage" part="ticketNo" />
+ <bpel:propertyAlias propertyName="tns:ticketId"
+ messageType="front:logOnRequest" part="ticketNo" />
+
+ <!-- relationship between the ATM and the process -->
+ <plt:partnerLinkType name="Atm-Front">
+ <plt:role name="FrontEnd">
+ <plt:portType name="front:FrontEnd" />
+ </plt:role>
+ </plt:partnerLinkType>
+
+ <!-- relationship between the process and the ticket issuer -->
+ <plt:partnerLinkType name="Front-Ticket">
+ <plt:role name="TicketIssuer">
+ <plt:portType name="tic:TicketIssuer" />
+ </plt:role>
+ </plt:partnerLinkType>
+
+ <!-- relationship between the process and the account system -->
+ <plt:partnerLinkType name="Front-Account">
+ <plt:role name="AccountSystem">
+ <plt:portType name="acc:AccountSystem" />
+ </plt:role>
+ </plt:partnerLinkType>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/atm.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/account.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/account.wsdl
(rev 0)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/account.wsdl 2007-03-02
11:02:35 UTC (rev 2498)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:account"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:samples:account"
+ xmlns:typ="urn:samples:account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
+
http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+
+ <schema targetNamespace="urn:samples:account"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <!-- account data transfer type -->
+ <complexType name="AccountOperation">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ </types>
+
+ <!-- customer name wrapper -->
+ <message name="customerMessage">
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <!-- access check response -->
+ <message name="accessMessage">
+ <part name="granted" type="xsd:boolean" />
+ </message>
+
+ <!-- account balance wrapper -->
+ <message name="balanceMessage">
+ <part name="balance" type="xsd:double" />
+ </message>
+
+ <!-- account operation request -->
+ <message name="accountOperation">
+ <part name="body" type="typ:AccountOperation" />
+ </message>
+
+ <!-- published account functions -->
+ <portType name="AccountSystem">
+
+ <!-- tell whether a customer has an active account -->
+ <operation name="checkAccess">
+ <input message="tns:customerMessage" />
+ <output message="tns:accessMessage" />
+ </operation>
+
+ <!-- retrieve the balance of an account -->
+ <operation name="queryBalance">
+ <input message="tns:customerMessage" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ <!-- increase/decrease the balance of an account -->
+ <operation name="updateBalance">
+ <input message="tns:accountOperation" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/account.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/frontend.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/frontend.wsdl
(rev 0)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/frontend.wsdl 2007-03-02
11:02:35 UTC (rev 2498)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:frontend"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:samples:frontend"
+ xmlns:typ="urn:samples:frontend" xmlns:tic="urn:samples:ticket"
+ xmlns:acc="urn:samples:account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
+
http://schemas.xmlsoap.org/wsdl/">
+
+ <import namespace="urn:samples:ticket" location="ticket.wsdl"
/>
+ <import namespace="urn:samples:account" location="account.wsdl"
/>
+
+ <types>
+
+ <schema targetNamespace="urn:samples:frontend"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="UnauthorizedAccess">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ <element name="unauthorizedAccess"
type="typ:UnauthorizedAccess" />
+
+ <complexType name="InsufficientFunds">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ <element name="insufficientFunds"
type="typ:InsufficientFunds" />
+
+ </schema>
+
+ </types>
+
+ <message name="connectRequest" />
+
+ <message name="logOnRequest">
+ <part name="ticketNo" type="xsd:int" />
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <message name="logOnResponse" />
+
+ <message name="statusResponse">
+ <part name="status" type="xsd:string" />
+ </message>
+
+ <message name="balanceChange">
+ <part name="customerName" type="xsd:string" />
+ <part name="amount" type="xsd:double" />
+ </message>
+
+ <message name="unauthorizedAccess">
+ <part name="detail" element="typ:unauthorizedAccess" />
+ </message>
+
+ <message name="insufficientFunds">
+ <part name="detail" element="typ:insufficientFunds" />
+ </message>
+
+ <message name="mymessage">
+ <part name="body" type="xsd:string" />
+ </message>
+
+ <!-- bank functions available to ATMs -->
+ <portType name="FrontEnd">
+
+ <!-- initiate bank connection -->
+ <operation name="connect">
+ <input message="tns:connectRequest" />
+ <output message="tic:ticketMessage" />
+ </operation>
+
+ <!-- terminate bank connection -->
+ <operation name="disconnect">
+ <input message="tic:ticketMessage" />
+ </operation>
+
+ <!-- retrieve bank connection status -->
+ <operation name="status">
+ <input message="tic:ticketMessage" />
+ <output message="tns:statusResponse" />
+ </operation>
+
+ <!-- initiate customer session -->
+ <operation name="logOn">
+ <input message="tns:logOnRequest" />
+ <output message="tns:logOnResponse" />
+ <fault name="unauthorizedAccess"
message="tns:unauthorizedAccess" />
+ </operation>
+
+ <!-- terminate customer session -->
+ <operation name="logOff">
+ <input message="acc:customerMessage" />
+ </operation>
+
+ <!-- retrieve account balance -->
+ <operation name="getBalance">
+ <input message="acc:customerMessage" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <!-- increase account balance -->
+ <operation name="deposit">
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <!-- decrease account balance -->
+ <operation name="withdraw">
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ <fault name="insufficientFunds"
message="tns:insufficientFunds" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/frontend.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/ticket.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/ticket.wsdl
(rev 0)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/ticket.wsdl 2007-03-02
11:02:35 UTC (rev 2498)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="urn:samples:ticket"
xmlns:tns="urn:samples:ticket"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
+
http://schemas.xmlsoap.org/wsdl/">
+
+ <!-- ticket creation request -->
+ <message name="ticketRequest" />
+
+ <!-- ticket number wrapper -->
+ <message name="ticketMessage">
+ <part name="ticketNo" type="xsd:int" />
+ </message>
+
+ <!-- interface to ticket issuer service -->
+ <portType name="TicketIssuer">
+
+ <!-- generate a ticket number, distinct from previous calls -->
+ <operation name="createTicket">
+ <input message="tns:ticketRequest" />
+ <output message="tns:ticketMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1553/interface/ticket.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF