Hello,consider the above wsdl descriptor [1].
To invoke the hellowold operation using the cxf 2.2 generated classes ( see
[2], I'm doing something like:


HelloWorldServerService factory = new HelloWorldServerService();

HelloWorldServerServicePortType s = factory

.getHelloWorldServerServiceHttpSoap11Endpoint();

System.err.println("from service:" + s.helloWorld("ciao"));


For as simple as it seems: do you see something strange in there ?
I'm asking because the web-service, even if it receives the call, fails with
some strange error [3], and I would like
to be sure that on my side I'm doing the correct operations.

Thanks
Valerio

[1] WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:ns1="
http://org.apache.axis2/xsd"; xmlns:ns="
http://helloworld.examples.fpbinding.galaxy.inria.fr"; xmlns:wsaw="
http://www.w3.org/2006/05/addressing/wsdl"; xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"; xmlns:xs="
http://www.w3.org/2001/XMLSchema"; xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"; targetNamespace="
http://helloworld.examples.fpbinding.galaxy.inria.fr";>

    <wsdl:types>

        <xs:schema attributeFormDefault="qualified"
elementFormDefault="unqualified" targetNamespace="
http://helloworld.examples.fpbinding.galaxy.inria.fr";>

            <xs:element name="helloWorld">

                <xs:complexType>

                    <xs:sequence>

                        <xs:element minOccurs="0" name="param0"
nillable="true" type="xs:string"/>

                    </xs:sequence>

                </xs:complexType>

            </xs:element>

            <xs:element name="helloWorldResponse">

                <xs:complexType>

                    <xs:sequence>

                        <xs:element minOccurs="0" name="return"
nillable="true" type="xs:string"/>

                    </xs:sequence>

                </xs:complexType>

            </xs:element>

        </xs:schema>

    </wsdl:types>

    <wsdl:message name="helloWorldRequest">

        <wsdl:part name="parameters" element="ns:helloWorld"/>

    </wsdl:message>

    <wsdl:message name="helloWorldResponse">

        <wsdl:part name="parameters" element="ns:helloWorldResponse"/>

    </wsdl:message>

    <wsdl:portType name="HelloWorldServer_ServicePortType">

        <wsdl:operation name="helloWorld">

            <wsdl:input message="ns:helloWorldRequest"
wsaw:Action="urn:helloWorld"/>

            <wsdl:output message="ns:helloWorldResponse"
wsaw:Action="urn:helloWorldResponse"/>

        </wsdl:operation>

    </wsdl:portType>

    <wsdl:binding name="HelloWorldServer_ServiceSoap11Binding"
type="ns:HelloWorldServer_ServicePortType">

        <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>

        <wsdl:operation name="helloWorld">

            <soap:operation soapAction="urn:helloWorld" style="document"/>

            <wsdl:input>

                <soap:body use="literal"/>

            </wsdl:input>

            <wsdl:output>

                <soap:body use="literal"/>

            </wsdl:output>

        </wsdl:operation>

    </wsdl:binding>

    <wsdl:binding name="HelloWorldServer_ServiceSoap12Binding"
type="ns:HelloWorldServer_ServicePortType">

        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>

        <wsdl:operation name="helloWorld">

            <soap12:operation soapAction="urn:helloWorld" style="document"/>

            <wsdl:input>

                <soap12:body use="literal"/>

            </wsdl:input>

            <wsdl:output>

                <soap12:body use="literal"/>

            </wsdl:output>

        </wsdl:operation>

    </wsdl:binding>

    <wsdl:binding name="HelloWorldServer_ServiceHttpBinding"
type="ns:HelloWorldServer_ServicePortType">

        <http:binding verb="POST"/>

        <wsdl:operation name="helloWorld">

            <http:operation location="HelloWorldServer_Service/helloWorld"/>

            <wsdl:input>

                <mime:content type="text/xml" part="helloWorld"/>

            </wsdl:input>

            <wsdl:output>

                <mime:content type="text/xml" part="helloWorld"/>

            </wsdl:output>

        </wsdl:operation>

    </wsdl:binding>

    <wsdl:service name="HelloWorldServer_Service">

        <wsdl:port name="HelloWorldServer_ServiceHttpSoap11Endpoint"
binding="ns:HelloWorldServer_ServiceSoap11Binding">

            <soap:address location="
http://localhost:8080/proactive/services/HelloWorldServer_Service.HelloWorldServer_ServiceHttpSoap11Endpoint/
"/>

        </wsdl:port>

        <wsdl:port name="HelloWorldServer_ServiceHttpSoap12Endpoint"
binding="ns:HelloWorldServer_ServiceSoap12Binding">

            <soap12:address location="
http://localhost:8080/proactive/services/HelloWorldServer_Service.HelloWorldServer_ServiceHttpSoap12Endpoint/
"/>

        </wsdl:port>

        <wsdl:port name="HelloWorldServer_ServiceHttpEndpoint"
binding="ns:HelloWorldServer_ServiceHttpBinding">

            <http:address location="
http://localhost:8080/proactive/services/HelloWorldServer_Service.HelloWorldServer_ServiceHttpEndpoint/
"/>

        </wsdl:port>

    </wsdl:service>

</wsdl:definitions>



[2]

                        <plugin>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-codegen-plugin</artifactId>

<version>2.2</version>

<executions>

<execution>

<id>generate-sources</id>

<phase>generate-sources</phase>

<configuration>

<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>

<wsdlOptions>

<wsdlOption>

<wsdl>${basedir}/src/main/resources/wsdl/proactive.wsdl</wsdl>

</wsdlOption>

</wsdlOptions>

</configuration>

<goals>

<goal>wsdl2java</goal>

</goals>

</execution>

</executions>

</plugin>



[3] The server-side error:
org.objectweb.fractal.api.NoSuchInterfaceException:
ServiceHttpSoap11Endpoint
at
org.objectweb.proactive.core.component.representative.ProActiveComponentRepresentativeImpl.getFcInterface(ProActiveComponentRepresentativeImpl.java:415)
at
org.objectweb.proactive.extensions.webservices.receiver.PAInOutMessageReceiver.invokeBusinessLogic(PAInOutMessageReceiver.java:99)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:637)
[email protected] - [ERROR     http.AxisServlet]
java.lang.NullPointerException
at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:337)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:214)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:637)



-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni

Reply via email to