Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 86797 Details for
Bug 198390
[hotbug][model] extensibility element resolution fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
New JUnit test
198390TestsPatch.txt (text/plain), 6.59 KB, created by
Valentin Baciu
on 2008-01-14 00:09:00 EST
(
hide
)
Description:
New JUnit test
Filename:
MIME Type:
Creator:
Valentin Baciu
Created:
2008-01-14 00:09:00 EST
Size:
6.59 KB
patch
obsolete
>Index: src/org/eclipse/wst/wsdl/tests/BugFixesTest.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/tests/org.eclipse.wst.wsdl.tests/src/org/eclipse/wst/wsdl/tests/BugFixesTest.java,v >retrieving revision 1.19 >diff -u -r1.19 BugFixesTest.java >--- src/org/eclipse/wst/wsdl/tests/BugFixesTest.java 20 Jul 2007 16:14:25 -0000 1.19 >+++ src/org/eclipse/wst/wsdl/tests/BugFixesTest.java 14 Jan 2008 05:05:51 -0000 >@@ -18,7 +18,10 @@ > import java.util.List; > > import javax.wsdl.OperationType; >+import javax.wsdl.Port; >+import javax.wsdl.WSDLException; > import javax.wsdl.extensions.ExtensibilityElement; >+import javax.wsdl.xml.WSDLReader; > import javax.xml.XMLConstants; > import javax.xml.namespace.QName; > >@@ -47,6 +50,7 @@ > import org.eclipse.wst.wsdl.Types; > import org.eclipse.wst.wsdl.WSDLFactory; > import org.eclipse.wst.wsdl.WSDLPackage; >+import org.eclipse.wst.wsdl.WSDLPlugin; > import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement; > import org.eclipse.wst.wsdl.binding.mime.MIMEContent; > import org.eclipse.wst.wsdl.binding.mime.MIMEFactory; >@@ -221,6 +225,14 @@ > } > }); > >+ suite.addTest(new BugFixesTest("SupportsLocalNSForExtensibilityElements") //$NON-NLS-1$ >+ { >+ protected void runTest() >+ { >+ testSupportsLocalNSForExtensibilityElements(); >+ } >+ }); >+ > return suite; > } > >@@ -1062,6 +1074,61 @@ > Assert.fail("Test failed due to an exception: " + e.getLocalizedMessage()); > } > } >+ >+ /** >+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=198390 >+ */ >+ public void testSupportsLocalNSForExtensibilityElements() >+ { >+ try >+ { >+ String uri = PLUGIN_ABSOLUTE_PATH + "samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl"; //$NON-NLS-1$ >+ javax.wsdl.factory.WSDLFactory factory = WSDLPlugin.INSTANCE.createWSDL4JFactory(); >+ WSDLReader wsdlReader = factory.newWSDLReader(); >+ javax.wsdl.Definition definition = wsdlReader.readWSDL(uri); >+ >+ String targetNamespace = "http://www.example.org/example/"; //$NON-NLS-1$ >+ >+ // Test a local SOAP namespace prefix declaration. >+ >+ QName bindingQName = new QName(targetNamespace, "exampleSOAP"); //$NON-NLS-1$ >+ javax.wsdl.Binding binding = definition.getBinding(bindingQName); >+ assertNotNull(binding); >+ List extensibilityElements = binding.getExtensibilityElements(); >+ assertEquals(1, extensibilityElements.size()); >+ ExtensibilityElement soapBinding = (ExtensibilityElement)extensibilityElements.get(0); >+ assertNotNull(soapBinding); >+ QName bindingElementType = soapBinding.getElementType(); >+ assertNotNull(bindingElementType); >+ String localPart = bindingElementType.getLocalPart(); >+ assertEquals(SOAPConstants.BINDING_ELEMENT_TAG, localPart); >+ String namespaceURI = bindingElementType.getNamespaceURI(); >+ assertEquals(SOAPConstants.SOAP_NAMESPACE_URI, namespaceURI); >+ assertTrue(soapBinding instanceof javax.wsdl.extensions.soap.SOAPBinding); >+ >+ // Test a default SOAP namespace declaration at the port level. >+ >+ QName serviceQName = new QName(targetNamespace, "example"); //$NON-NLS-1$ >+ javax.wsdl.Service service = definition.getService(serviceQName); >+ Port port = service.getPort("exampleSOAP"); >+ extensibilityElements = port.getExtensibilityElements(); >+ assertEquals(1, extensibilityElements.size()); >+ ExtensibilityElement soapAddress = (ExtensibilityElement)extensibilityElements.get(0); >+ assertNotNull(soapAddress); >+ QName portElementType = soapAddress.getElementType(); >+ assertNotNull(portElementType); >+ localPart = portElementType.getLocalPart(); >+ assertEquals(SOAPConstants.ADDRESS_ELEMENT_TAG, localPart); >+ namespaceURI = portElementType.getNamespaceURI(); >+ assertEquals(SOAPConstants.SOAP_NAMESPACE_URI, namespaceURI); >+ assertTrue(soapAddress instanceof javax.wsdl.extensions.soap.SOAPAddress); >+ } >+ catch (WSDLException e) >+ { >+ e.printStackTrace(); >+ fail(); >+ } >+ } > > private Element getNextElement(Element anElement) > { >Index: samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl >=================================================================== >RCS file: samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl >diff -N samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,57 @@ >+<?xml version="1.0" encoding="UTF-8" standalone="no"?> >+<wsdl:definitions xmlns:tns="http://www.example.org/example/" >+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="example" >+ targetNamespace="http://www.example.org/example/"> >+ <wsdl:types> >+ <xsd:schema targetNamespace="http://www.example.org/example/"> >+ <xsd:element name="NewOperation"> >+ <xsd:complexType> >+ <xsd:sequence> >+ <xsd:element name="in" type="xsd:string" /> >+ </xsd:sequence> >+ </xsd:complexType> >+ </xsd:element> >+ <xsd:element name="NewOperationResponse"> >+ <xsd:complexType> >+ <xsd:sequence> >+ <xsd:element name="out" type="xsd:string" /> >+ </xsd:sequence> >+ </xsd:complexType> >+ </xsd:element> >+ </xsd:schema> >+ </wsdl:types> >+ <wsdl:message name="NewOperationRequest"> >+ <wsdl:part element="tns:NewOperation" name="parameters" /> >+ </wsdl:message> >+ <wsdl:message name="NewOperationResponse"> >+ <wsdl:part element="tns:NewOperationResponse" name="parameters" /> >+ </wsdl:message> >+ <wsdl:portType name="example"> >+ <wsdl:operation name="NewOperation"> >+ <wsdl:input message="tns:NewOperationRequest" /> >+ <wsdl:output message="tns:NewOperationResponse" /> >+ </wsdl:operation> >+ </wsdl:portType> >+ <wsdl:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >+ name="exampleSOAP" type="tns:example"> >+ <soap:binding style="document" >+ transport="http://schemas.xmlsoap.org/soap/http" /> >+ <wsdl:operation name="NewOperation"> >+ <soap:operation >+ soapAction="http://www.example.org/example/NewOperation" /> >+ <wsdl:input> >+ <soap:body use="literal" /> >+ </wsdl:input> >+ <wsdl:output> >+ <soap:body use="literal" /> >+ </wsdl:output> >+ </wsdl:operation> >+ </wsdl:binding> >+ <wsdl:service name="example"> >+ <wsdl:port xmlns="http://schemas.xmlsoap.org/wsdl/soap/" >+ binding="tns:exampleSOAP" name="exampleSOAP"> >+ <address location="http://www.example.org/" /> >+ </wsdl:port> >+ </wsdl:service> >+</wsdl:definitions>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198390
:
75547
|
75557
|
86796
| 86797