Author: alessio.soldano(a)jboss.com
Date: 2010-09-22 13:58:54 -0400 (Wed, 22 Sep 2010)
New Revision: 13008
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3131/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3131/JBWS3131TestCase.java
framework/trunk/testsuite/test/resources/jaxws/jbws3131/
framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico2.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico21.wsdl
Log:
[JBWS-3131] Adding testcase
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3131/JBWS3131TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3131/JBWS3131TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3131/JBWS3131TestCase.java 2010-09-22
17:58:54 UTC (rev 13008)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbws3131;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+public class JBWS3131TestCase extends JBossWSTest
+{
+ private URL WSDLUrl;
+ private URL changedWSDLUrl;
+ private Service service;
+ private Service serviceChanged;
+
+ public void setUp() throws IOException
+ {
+ WSDLUrl = getResourceURL("jaxws/jbws3131/NfeStatusServico2.wsdl");
+ changedWSDLUrl =
getResourceURL("jaxws/jbws3131/NfeStatusServico21.wsdl");
+
+ QName serviceName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2");
+ service = Service.create(WSDLUrl, serviceName);
+
+ serviceName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2");
+ serviceChanged = Service.create(changedWSDLUrl, serviceName);
+ }
+
+ public void testSOAP11OnOriginalWSDL() throws IOException
+ {
+ QName portName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2Soap");
+ Dispatch<Source> dispatch = service.createDispatch(portName, Source.class,
Mode.MESSAGE);
+ String bindingID = dispatch.getBinding().getBindingID();
+
assertEquals("http://schemas.xmlsoap.org/wsdl/soap/http", bindingID);
+ }
+
+ public void testSOAP12OnOriginalWSDL() throws IOException
+ {
+ QName portName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2Soap12");
+ Dispatch<Source> dispatch = service.createDispatch(portName, Source.class,
Mode.MESSAGE);
+ String bindingID = dispatch.getBinding().getBindingID();
+
assertEquals("http://www.w3.org/2003/05/soap/bindings/HTTP/",
bindingID);
+ }
+
+ public void testSOAP11OnChangedWSDL() throws IOException
+ {
+ QName portName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2Soap1");
+ Dispatch<Source> dispatch = serviceChanged.createDispatch(portName,
Source.class, Mode.MESSAGE);
+ String bindingID = dispatch.getBinding().getBindingID();
+
assertEquals("http://schemas.xmlsoap.org/wsdl/soap/http", bindingID);
+ }
+
+ public void testSOAP12OnChangedWSDL() throws IOException
+ {
+ QName portName = new
QName("http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2",
"NfeStatusServico2Soap12");
+ Dispatch<Source> dispatch = serviceChanged.createDispatch(portName,
Source.class, Mode.MESSAGE);
+ String bindingID = dispatch.getBinding().getBindingID();
+
assertEquals("http://www.w3.org/2003/05/soap/bindings/HTTP/",
bindingID);
+ }
+}
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico2.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico2.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico2.wsdl 2010-09-22
17:58:54 UTC (rev 13008)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified"
targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2">
+ <s:element name="nfeDadosMsg">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="nfeStatusServicoNF2Result">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="nfeCabecMsg" type="tns:nfeCabecMsg" />
+ <s:complexType name="nfeCabecMsg">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
name="versaoDados" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
name="cUF" type="s:string" />
+ </s:sequence>
+ <s:anyAttribute />
+ </s:complexType>
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="nfeStatusServicoNF2SoapIn">
+ <wsdl:part name="nfeDadosMsg" element="tns:nfeDadosMsg" />
+ </wsdl:message>
+ <wsdl:message name="nfeStatusServicoNF2SoapOut">
+ <wsdl:part name="nfeStatusServicoNF2Result"
element="tns:nfeStatusServicoNF2Result" />
+ </wsdl:message>
+ <wsdl:message name="nfeStatusServicoNF2nfeCabecMsg">
+ <wsdl:part name="nfeCabecMsg" element="tns:nfeCabecMsg" />
+ </wsdl:message>
+ <wsdl:portType name="NfeStatusServico2Soap">
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Serviço destinado à consulta do
status do serviço prestado pela Sefaz Virtual do Ambiente
Nacional</wsdl:documentation>
+ <wsdl:input message="tns:nfeStatusServicoNF2SoapIn" />
+ <wsdl:output message="tns:nfeStatusServicoNF2SoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="NfeStatusServico2Soap"
type="tns:NfeStatusServico2Soap">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <soap:operation
soapAction="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2/nfeStatusServicoNF2"
style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ <soap:header message="tns:nfeStatusServicoNF2nfeCabecMsg"
part="nfeCabecMsg" use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="NfeStatusServico2Soap12"
type="tns:NfeStatusServico2Soap">
+ <soap12:binding
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <soap12:operation
soapAction="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2/nfeStatusServicoNF2"
style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:nfeStatusServicoNF2nfeCabecMsg"
part="nfeCabecMsg" use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="NfeStatusServico2">
+ <wsdl:port name="NfeStatusServico2Soap"
binding="tns:NfeStatusServico2Soap">
+ <soap:address
location="https://hom.nfe.fazenda.gov.br/SCAN/NfeStatusServico2/NfeStatusServico2.asmx"
/>
+ </wsdl:port>
+ <wsdl:port name="NfeStatusServico2Soap12"
binding="tns:NfeStatusServico2Soap12">
+ <soap12:address
location="https://hom.nfe.fazenda.gov.br/SCAN/NfeStatusServico2/NfeStatusServico2.asmx"
/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico21.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico21.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3131/NfeStatusServico21.wsdl 2010-09-22
17:58:54 UTC (rev 13008)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified"
targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2">
+ <s:element name="nfeDadosMsg">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="nfeStatusServicoNF2Result">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="nfeCabecMsg" type="tns:nfeCabecMsg" />
+ <s:complexType name="nfeCabecMsg">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
name="versaoDados" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
name="cUF" type="s:string" />
+ </s:sequence>
+ <s:anyAttribute />
+ </s:complexType>
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="nfeStatusServicoNF2SoapIn">
+ <wsdl:part name="nfeDadosMsg" element="tns:nfeDadosMsg" />
+ </wsdl:message>
+ <wsdl:message name="nfeStatusServicoNF2SoapOut">
+ <wsdl:part name="nfeStatusServicoNF2Result"
element="tns:nfeStatusServicoNF2Result" />
+ </wsdl:message>
+ <wsdl:message name="nfeStatusServicoNF2nfeCabecMsg">
+ <wsdl:part name="nfeCabecMsg" element="tns:nfeCabecMsg" />
+ </wsdl:message>
+ <wsdl:portType name="NfeStatusServico2Soap">
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Serviço destinado à consulta do
status do serviço prestado pela Sefaz Virtual do Ambiente
Nacional</wsdl:documentation>
+ <wsdl:input message="tns:nfeStatusServicoNF2SoapIn" />
+ <wsdl:output message="tns:nfeStatusServicoNF2SoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="NfeStatusServico2Soap"
type="tns:NfeStatusServico2Soap">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <soap:operation
soapAction="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2/nfeStatusServicoNF2"
style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ <soap:header message="tns:nfeStatusServicoNF2nfeCabecMsg"
part="nfeCabecMsg" use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="NfeStatusServico2Soap12"
type="tns:NfeStatusServico2Soap">
+ <soap12:binding
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="nfeStatusServicoNF2">
+ <soap12:operation
soapAction="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2/nfeStatusServicoNF2"
style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:nfeStatusServicoNF2nfeCabecMsg"
part="nfeCabecMsg" use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="NfeStatusServico2">
+ <wsdl:port name="NfeStatusServico2Soap1"
binding="tns:NfeStatusServico2Soap">
+ <soap:address
location="https://hom.nfe.fazenda.gov.br/SCAN/NfeStatusServico2/NfeStatusServico2.asmx"
/>
+ </wsdl:port>
+ <wsdl:port name="NfeStatusServico2Soap12"
binding="tns:NfeStatusServico2Soap12">
+ <soap12:address
location="https://hom.nfe.fazenda.gov.br/SCAN/NfeStatusServico2/NfeStatusServico2.asmx"
/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file