<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Continuing problem with XTS WS-T tests in AS trunk/CXF 2.2.9
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/adinn">Andrew Dinn</a> in <i>JBoss Web Services CXF</i> - <a href="http://community.jboss.org/message/548690#548690">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>The XTS tests are still seeing some failures on the latest AS trunk with cxf stack 3.3.1.SP1. I think they all appear to stem from a single issue which relates to dispatch of soap faults. It's&#160; not actually CXF's&#160; fault handling which is the problem. The XTS code uses its own JaxWS based service to dispatch faults -- I know that sounds weird but I'll explain that in a minute. Anyway, the problem is not actually to do with the dispatch, routing or receipt of the soap faults, it's to do with creating the relevant JaxWS service. This is a WSDL first service defined as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><span style="font-family: courier new,courier;">&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;!--<br/>&#160;&#160;&#160; a specification for a service which can be used to dispatch a SOAP 1.1 SoapFault<br/>&#160;&#160;&#160; to an arbitrary client<br/>--&gt;<br/>&lt;definitions<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:s="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:tns="</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:soapenv="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:soap="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/wsdl/soap/" target="_blank">http://schemas.xmlsoap.org/wsdl/soap/</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:wsaw="</span><a class="jive-link-external-small" href="http://www.w3.org/2006/02/addressing/wsdl" target="_blank">http://www.w3.org/2006/02/addressing/wsdl</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; targetNamespace="</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>"</span><br/><span>&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/wsdl/" target="_blank">http://schemas.xmlsoap.org/wsdl/</a><span>"&gt;</span><br/>&#160;&#160;&#160; &lt;types&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:schema&gt;<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:import namespace="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; schemaLocation="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope" target="_blank">http://schemas.xmlsoap.org/soap/envelope</a><span>"/&gt;</span><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/s:schema&gt;<br/>&#160;&#160;&#160; &lt;/types&gt;<br/>&#160;&#160;&#160; &lt;message name="SoapFault"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;part name="fault" element="soapenv:Fault" /&gt;<br/>&#160;&#160;&#160; &lt;/message&gt;
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; &lt;portType name="SoapFaultPortType"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;operation name="SoapFault"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;input name="SoapFault" message="tns:SoapFault" /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/operation&gt;<br/>&#160;&#160;&#160; &lt;/portType&gt;
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; &lt;binding name="SoapFault_SOAPBinding" type="tns:SoapFaultPortType"&gt;<br/><span>&#160;&#160;&#160;&#160;&#160; &lt;soap:binding style="document" transport="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/http" target="_blank">http://schemas.xmlsoap.org/soap/http</a><span>"/&gt;</span><br/>&#160;&#160;&#160;&#160;&#160; &lt;operation name="SoapFault"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;input message="tns:Soapfault"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:body use="literal"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/input&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;/operation&gt;<br/>&#160;&#160;&#160; &lt;/binding&gt;
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; &lt;service name="SoapFaultService"&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;port binding="tns:SoapFault_SOAPBinding" name="SoapFaultPortType"&gt;<br/>&#160;&#160;&#160; &lt;wsaw:UsingAddressing required="true"/&gt;<br/><span>&#160;&#160;&#160; &lt;soap:address location="</span><a class="jive-link-external-small" href="http://localhost:9000/interopat/SoapFaultService" target="_blank">http://localhost:9000/interopat/SoapFaultService</a><span>"/&gt;</span><br/>&#160;&#160;&#160;&#160;&#160; &lt;/port&gt;<br/>&#160;&#160;&#160; &lt;/service&gt;
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>
&lt;/definitions&gt;
<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I generated code from&#160; this WSDL using wsconsume (well, actually, I think I generated it using Glassfish's wsimport but essentially it is the same thing) as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><span style="font-family: courier new,courier;"><span>@WebServiceClient(name = "SoapFaultService", targetNamespace = "</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>", wsdlLocation = "wsdl/soapfault.wsdl")</span><br/>public class SoapFaultService extends Service<br/>{<br/>&#160;&#160;&#160; private final static URL SOAPFAULTSERVICE_WSDL_LOCATION;<br/>&#160;&#160;&#160; private final static Logger logger = Logger.getLogger(org.jboss.jbossts.xts.soapfault.SoapFaultService.class.getName());
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; static {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; URL url = null;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; URL baseUrl;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; baseUrl = org.jboss.jbossts.xts.soapfault.SoapFaultService.class.getResource(".");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url = new URL(baseUrl, "wsdl/soapfault.wsdl");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (MalformedURLException e) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.warning("Failed to create URL for the wsdl Location: 'wsdl/soapfault.wsdl', retrying as a local file");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.warning(e.getMessage());<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SOAPFAULTSERVICE_WSDL_LOCATION = url;<br/>&#160;&#160;&#160; }
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; public SoapFaultService(URL wsdlLocation, QName serviceName) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; super(wsdlLocation, serviceName);<br/>&#160;&#160;&#160; }
</span><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: courier new,courier;"> </span>&#160;</p><span style="font-family: courier new,courier;">
&#160;&#160;&#160; public SoapFaultService() {<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; super(SOAPFAULTSERVICE_WSDL_LOCATION, new QName("</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>", "SoapFaultService"));</span><br/>&#160;&#160;&#160; }<br/>&#160;&#160;&#160; /**<br/>&#160;&#160;&#160;&#160; * <br/>&#160;&#160;&#160;&#160; * @return<br/>&#160;&#160;&#160;&#160; *&#160;&#160;&#160;&#160; returns SoapFaultPortType<br/>&#160;&#160;&#160;&#160; */<br/>&#160;&#160;&#160; @WebEndpoint(name = "SoapFaultPortType")<br/>&#160;&#160;&#160; public SoapFaultPortType getSoapFaultPortType() {<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return super.getPort(new QName("</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>", "SoapFaultPortType"), SoapFaultPortType.class);</span><br/>&#160;&#160;&#160; }<br/>&#160;&#160;&#160; /**<br/>&#160;&#160;&#160;&#160; * <br/>&#160;&#160;&#160;&#160; * @param features<br/>&#160;&#160;&#160;&#160; *&#160;&#160;&#160;&#160; A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.&#160; Supported features not in the &lt;code&gt;features&lt;/code&gt; parameter will have their default values.<br/>&#160;&#160;&#160;&#160; * @return<br/>&#160;&#160;&#160;&#160; *&#160;&#160;&#160;&#160; returns SoapFaultPortType<br/>&#160;&#160;&#160;&#160; */<br/>&#160;&#160;&#160; @WebEndpoint(name = "SoapFaultPortType")<br/>&#160;&#160;&#160; public SoapFaultPortType getSoapFaultPortType(WebServiceFeature... features) {<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return super.getPort(new QName("</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>", "SoapFaultPortType"), SoapFaultPortType.class, features);</span><br/>&#160;&#160;&#160; }<br/>}<br/><br/><span>@WebService(name = "SoapFaultPortType", targetNamespace = "</span><a class="jive-link-external-small" href="http://jbossts.jboss.org/xts/soapfault" target="_blank">http://jbossts.jboss.org/xts/soapfault</a><span>")</span><br/>@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)<br/>@XmlSeeAlso({<br/>&#160;&#160;&#160; ObjectFactory.class<br/>})<br/>public interface SoapFaultPortType {<br/>&#160;&#160;&#160; /**<br/>&#160;&#160;&#160;&#160; * <br/>&#160;&#160;&#160;&#160; * @param fault<br/>&#160;&#160;&#160;&#160; */<br/>&#160;&#160;&#160; @WebMethod(operationName = "SoapFault")<br/>&#160;&#160;&#160; @Oneway<br/>&#160;&#160;&#160; public void soapFault(<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @WebParam(name = "Fault", targetNamespace = "</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>", partName = "fault")</span><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Fault fault);<br/>}</span><span style="font-family: courier new,courier;"> </span></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The problem is that when my tests try to create a SoapFaultPortType I get a parse error during processing of the WSDL. Unfortunately, the error is not reported as being in my WDSL. It ahppens wen processing the imported schema</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><pre jivemacro="quote">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:schema&gt;<br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:import namespace="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; schemaLocation="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope" target="_blank">http://schemas.xmlsoap.org/soap/envelope</a><span>"/&gt;</span><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/s:schema&gt;</pre>
</blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>I stepped through the code and found that it successfully loads the schema located at </span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope" target="_blank">http://schemas.xmlsoap.org/soap/envelope</a><span> but then runs into problems processing the contents. Here is the error message:</span></p><blockquote class="jive-quote"><span style="font-family: courier new,courier;">[Fatal Error] strict.dtd:81:5: The declaration for the entity "ContentType" must end with '&gt;'.<br/>[Fatal Error] envelope:2:2: The markup in the document following the root element must be well-formed.<br/>javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:152)<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)<br/>&#160;&#160;&#160; at javax.xml.ws.Service.&lt;init&gt;(Service.java:57)<br/>&#160;&#160;&#160; at org.jboss.jbossts.xts.soapfault.SoapFaultService.&lt;init&gt;(SoapFaultService.java:46)<br/>&#160;&#160;&#160; at com.arjuna.webservices11.wsaddr.client.SoapFaultClient.getSoapFaultService(SoapFaultClient.java:98)<br/>&#160;&#160;&#160; at com.arjuna.webservices11.wsaddr.client.SoapFaultClient.getSoapFaultPort(SoapFaultClient.java:130)<br/>&#160;&#160;&#160; at com.arjuna.webservices11.wsaddr.client.SoapFaultClient.sendSoapFault(SoapFaultClient.java:86)<br/>&#160;&#160;&#160; at com.arjuna.webservices11.wsat.client.CompletionInitiatorClient.sendSoapFault(CompletionInitiatorClient.java:123)<br/>&#160;&#160;&#160; at com.arjuna.wst11.tests.junit.CompletionCoordinatorTestCase.testSendError(CompletionCoordinatorTestCase.java:180)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)<br/>&#160;&#160;&#160; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)<br/>&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)<br/>&#160;&#160;&#160; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)<br/>&#160;&#160;&#160; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)<br/>&#160;&#160;&#160; at org.junit.runners.Suite.runChild(Suite.java:128)<br/>&#160;&#160;&#160; at org.junit.runners.Suite.runChild(Suite.java:24)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)<br/>&#160;&#160;&#160; at org.junit.runners.Suite.runChild(Suite.java:128)<br/>&#160;&#160;&#160; at org.junit.runners.Suite.runChild(Suite.java:24)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)<br/>&#160;&#160;&#160; at org.junit.runner.JUnitCore.run(JUnitCore.java:157)<br/>&#160;&#160;&#160; at org.junit.runner.JUnitCore.run(JUnitCore.java:136)<br/>&#160;&#160;&#160; at org.junit.runner.JUnitCore.run(JUnitCore.java:117)<br/>&#160;&#160;&#160; at com.arjuna.qa.junit.TestRunnerServlet$RunnerThread.run(TestRunnerServlet.java:523)<br/>Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.<br/>&#160;&#160;&#160; at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:93)<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:207)<br/>&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:150)<br/>&#160;&#160;&#160; ... 46 more<br/><span>Caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/types/s:schema): faultCode=PARSER_ERROR: Problem parsing '</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope'.:" target="_blank">http://schemas.xmlsoap.org/soap/envelope'.:</a><span> org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.</span><br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)<br/>&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)<br/>&#160;&#160;&#160; at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:230)<br/>&#160;&#160;&#160; at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:179)<br/>&#160;&#160;&#160; at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:91)<br/>&#160;&#160;&#160; ... 48 more<br/>Caused by: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.<br/>&#160;&#160;&#160; at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br/>&#160;&#160;&#160; at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)<br/>&#160;&#160;&#160; ... 58 more
</span></blockquote><pre jivemacro="quote"></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As you can see the problem occurs under ServiceImple.&lt;init&gt; below SoapFaultService.&lt;init&gt; when trying to create the SoapFaultService class&#160; generated by wsconsume. This is somewhat bizarre given where the schema comes from.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Ok, so you might want an explanationfor what this servcie is and why it needs to import the soap envelope schema. It's abit copnvoluted but here goes. XTS implements the WS-C and WS-T services defined by the WSTX standard. WS-C includes two generic services for creating and enlisting with transactions from various transaction transaction protocols. WS-T includes two families of transaction protocol specific services which allow transaction clients and transactional web services to progress towards completion completion. The service APIs are specified by WSDL and our rimplementation uses JaxWS to implement&#160; that WSDL.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The WS-T services (WS-AT atomic transaction and WS-BA business activity), are only mandated only to employ a OneWay MEP. Tthe SOAP used to deliver these messages is required to be configured with various mandatory WSA headers, including MessageId, ReplyTo and FaultTo. The SOAP headers also need to include service specific transaction identifiers as header elements. This is achieved by by installing them as ReferenceParameters in the endpoints used by the transaction protocol services and transactional web services communicate ie. they are attached to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>the transaction protocol specific Coordinator service endpoints handed out to transactional web services by the WS-C registration service when they enlist in a transaction</li><li> the endpoint in the ReplyTo/FaultTo header included by web services when they negotiate with the registration service or with their Coordinator service</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Yes, as you can see, the use of one way messaging means that the container for the transactional web service must also contain a WS-AT or WS-BA Initiator service. The Coordinator talks back to this Initiator service in order to be able to constuct a long-running dialogue with the transactional web service composed&#160; of a series of 1-way messages such as e.g. <em>enlist</em>, <em>prepare</em>, <em>prepared</em>, <em>commit</em>, <em>commited</em>. In the case of WS-BA this dialogue can be initiated asynchronously from either end --&#160; that's why OneWay MEP was chosen over RPC.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The service specification mandates that in cases where processing of a message runs into certain error conditions a SoapFault must be dispatched to the FaultTo addess configured in the WSA headers. Obviously, if a fault&#160; occurs in <em>delivering</em> the message the JaxWS layer will dispatch a fault to the sender. But that's not that the spec is talking about (or&#160; at least not <em>all</em> it is talking about). The spec is concerned with faults which occur after delivery when the delivered message is being processed. By this stage JaxWS has done its stuff and told the sender 'message delivered'. If the service endpoint bean were to throw a fault nothing would get dispatched back to&#160; the sender. So, the threads which are handling a request to the Coordinator or Initiator services need to be able to dispatch a fault to the FaultTo address asynchronously -- from a standing start. This fault needs to</p><ul><li>be sent to the FaultTo address</li><li>provide a WSA RelatesTo header whcih includes the originating MessageId</li><li>include the ReferenceParameter header obtained with the FaultTo address.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Now the WS-AT/BA coordinator and initiator service enpoint implementation classes all implement a WebMethod which accepts a SoapFault with a specific SOAPAction or WSA Action. This web method is declared by interface SoapFaultPortType generated from the SoapFaultService WSDL and all these services implement the interface i.e.they are capable of acting as an endpoint for the SoapFaultPortType of the SoapFaultService. Now, in order to dispatch an asynchronous SoapFault to the sender the handler thread merely needs to create a fault and an instance of SoapFaultService then clone a proxy port from it and call method soapFault(). So this is what is happening when my current implementation blows up trying to read the soap envelope WSDL.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/548690#548690">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services CXF at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2046">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>