<!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">JBoss 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;">
    Problems with example on JBossWS - JAX-WS Tools
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/cristisor">Luc Chris</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/581161#581161">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi guys. I am trying to deploy the test project that is showed on the "<span style="font-size: 10pt;">JBossWS - JAX-WS Tool<strong> </strong>s" page: </span><a class="jive-link-external-small" href="http://community.jboss.org/docs/DOC-13544" target="_blank">http://community.jboss.org/wiki/JBossWS-JAX-WSTools</a><span>. I generated the wsdl and schema files with "wsprovide". </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is the wsdl file:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;wsdl:definitions name="EchoService" targetNamespace="http://echo/"
&#160;&#160;&#160; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://echo/"
&#160;&#160;&#160; xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"&gt;
&#160;&#160;&#160; &lt;wsdl:types&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;schema xmlns="http://www.w3.org/2001/XMLSchema"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;import namespace="http://echo/" schemaLocation="EchoService_schema1.xsd" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/schema&gt;
&#160;&#160;&#160; &lt;/wsdl:types&gt;
&#160;&#160;&#160; &lt;wsdl:message name="echoResponse"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:part name="parameters" element="tns:echoResponse"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:part&gt;
&#160;&#160;&#160; &lt;/wsdl:message&gt;
&#160;&#160;&#160; &lt;wsdl:message name="echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:part name="parameters" element="tns:echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:part&gt;
&#160;&#160;&#160; &lt;/wsdl:message&gt;
&#160;&#160;&#160; &lt;wsdl:portType name="Echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:operation name="echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:input name="echo" message="tns:echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:input&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:output name="echoResponse" message="tns:echoResponse"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:output&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:operation&gt;
&#160;&#160;&#160; &lt;/wsdl:portType&gt;
&#160;&#160;&#160; &lt;wsdl:binding name="EchoServiceSoapBinding" type="tns:Echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:binding style="document"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; transport="http://schemas.xmlsoap.org/soap/http" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:operation name="echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:operation soapAction="" style="document" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:input name="echo"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:body use="literal" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:input&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:output name="echoResponse"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:body use="literal" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:output&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:operation&gt;
&#160;&#160;&#160; &lt;/wsdl:binding&gt;
&#160;&#160;&#160; &lt;wsdl:service name="EchoService"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;wsdl:port name="EchoPort" binding="tns:EchoServiceSoapBinding"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;soap:address location="http://localhost:9090/EchoPort" /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/wsdl:port&gt;
&#160;&#160;&#160; &lt;/wsdl:service&gt;
&lt;/wsdl:definitions&gt;</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is the schema file that was generated along with the wsdl when I called wsprovide:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;xs:schema xmlns:xs="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"
&#160;&#160;&#160; xmlns:tns="</span><a class="jive-link-external-small" href="http://echo/" target="_blank">http://echo/</a><span>" elementFormDefault="unqualified"
&#160;&#160;&#160; targetNamespace="</span><a class="jive-link-external-small" href="http://echo/" target="_blank">http://echo/</a><span>" version="1.0"&gt;</span></span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:element name="echo" type="tns:echo" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:element name="echoResponse" type="tns:echoResponse" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:complexType name="echo"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:sequence&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:element minOccurs="0" name="arg0" type="xs:string" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/xs:sequence&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/xs:complexType&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:complexType name="echoResponse"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:sequence&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xs:element minOccurs="0" name="return" type="xs:string" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/xs:sequence&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/xs:complexType&gt;</span>
<span class="jive-xml-tag">&lt;/xs:schema&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then I generated&#160; all the class files with "wsconsume" <span style="font-size: 10pt;"><strong> </strong> on the wsdl file. This generated an interface "Echo" and so I created a class "EchoImpl" that implements the interface:</span></p><p><span style="font-size: 10pt;"><br/></span></p><pre ___default_attr="java" class="jive_text_macro jive_macro_code"><p>package echo;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@javax.jws.WebService</p><p>public class EchoImpl implements Echo</p><p>{</p><p>&#160;&#160; public String echo(String arg0)</p><p>&#160;&#160; {</p><p>&#160;&#160;&#160;&#160;&#160; return arg0;</p><p>&#160;&#160; }</p><p>}</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The web service is ok when I make the deploy and so I created a client also. I used the class "EchoService", generated by wsconsume, and I created a new class, called "EchoClient", just like in the example. The client connect to the web service and gets the correct result, but JBoss throws a warning after creating the line:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">EchoService service = <font color="navy"><b>new</b></font> EchoService();
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is the warn: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">12:46:49,724 WARN&#160; [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://echo/}EchoImplService has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: No such operation: WebWithWSDLnull (HTTP GET PATH_INFO: /WebWithWSDLnull)
&#160;&#160;&#160; at org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappingInterceptor.java:88) [:2.3.1]
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I googled for this warn and I found that it should come up only when a GET request is made, but I use the generated service class, nothing else.</p><p>This happens when I run the example from the Eclipse IDE, run as java application. If I use wsrunclient on the client classes I get this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.serv
ice.factory.ServiceConstructionException: Failed to create service.
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:152)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(Pro
viderImpl.java:71)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at echo.EchoService.&lt;init&gt;(EchoService.java:45)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at echo.EchoClient.main(EchoClient.java:11)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed t
o create service.
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.ja
va:93)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:207
)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:150)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException (at /soap:Envelope): faultCod
e=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'
.
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(Unknown Source)
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I guess that there might be something in my wsdl that he doesn't like, but I can't figure out what.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks a lot.</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/581161#581161">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>