Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.3
-
None
Description
As per jaxws spec , the wsdl:extension that have the required=true should be checked :
" When the javax.xml.ws.RespectB-
indingFeature is enabled, a JAX-WS implementation MUST inspect the wsdl:binding at runtime to
determine result and parameter bindings as well as any wsdl:extensions that have the required=true
attribute. All required wsdl:extensions MUST be supported and honored by a JAX-WS implementation
unless a specific wsdl:extension has be explicitly disabled via a WebServiceFeature."
[alessio@localhost trunk]$ mvn -Ptestsuite,jboss424,hudson -Dtest=JBWS2449TestCase test
...
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.test.ws.jaxws.jbws2449.JBWS2449TestCase
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.585 sec <<< FAILURE!
Results :
Failed tests:
testWithRespectBinding(org.jboss.test.ws.jaxws.jbws2449.JBWS2449TestCase)
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
The testcase basically deploy an EJB3 webservice endpoint with its own user specified wsdl contract. Here is an extract from the wsdl, there's a foo:bar required extensibility element:
<binding name='EndpointBinding' type='tns:Endpoint'>
<soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
<foo:bar wsdl:required="true"/>
<operation name='echo'>
<soap:operation soapAction=''/>
<input>
<soap:body use='literal'/>
</input>
<output>
<soap:body use='literal'/>
</output>
</operation>
</binding>
<service name='EndpointService'>
<port binding='tns:EndpointBinding' name='EndpointPort'>
<soap:address location='http://127.0.0.1:8080/jaxws-jbws2449'/>
</port>
</service>
The testcase gets the port specifing a RequestBindingFeature(true) so that it expects an error because of the foo:bar unknown ext element.
public void testWithRespectBinding() throws Exception
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws2449", "EndpointService");
try
catch (Exception e)
{ //NOOP }}