Hi there!

We've used the attached WSDL to create a service & client by means of
the WSDL2Java tool (xmlbeans databinding). After implementing the
simplest of business logics in the server, we deployed the service .aar
in the axis2 install inside a tomcat server. According to the status
page, the service is running error free.

The client was also created by WSDL2Java, where we wrote a simple main()
class to test the client. We've pasted it below.

public static void main(String[] args) {
   try {
     PredictLocalizationRequestDocument pdoc =
PredictLocalizationRequestDocument.Factory.newInstance();
     pdoc.addNewPredictLocalizationRequest();
     pdoc.getPredictLocalizationRequest().setSequence("ASDF");
     pdoc.getPredictLocalizationRequest().setOrganism("ANIMAL");
     TextLocServiceStub sender = new
TextLocServiceStub("http://localhost/axis2/services/TextLocService";);
     PredictLocalizationResponseDocument res =
                sender.predictLocalization(pdoc);
     System.out.println(res.toString());
   } catch (Exception e) {
     e.printStackTrace();
   }
}

The client now runs up until the document is being sent, where it throws
an Exception. The stack trace is below. We think it is still a
client-side problem, although the client does complain if it is not
connected to the server and doesn't throw this exception.

Please let us know if we should change anything about our client
generation procedure, or how we can use the test client jar that is also
generated by the WSDL2Java tool.

Thanks a lot for your time!

Greetings,

-- Sebastian


org.apache.axis2.AxisFault: Data binding error
        at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)
        at
org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)
        at org.apache.axis2.runLoc.main(runLoc.java:26)
Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding
error; nested exception is:
        java.lang.RuntimeException: Data binding error
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
        at
org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:66)
        at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
        at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: Data binding error
        at
org.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM(TextLocServiceMessageReceiverInOut.java:158)
        at
org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50)
        ... 20 more
Caused by: java.lang.NullPointerException
        at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041)
        at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)
        at org.apache.xmlbeans.impl.store.Locale.doNamespaces(Locale.java:900)
        at
org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
        at
axis2.apache.org.xsd.PredictLocalizationRequestDocument$Factory.parse(PredictLocalizationRequestDocument.java:153)
        at
org.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM(TextLocServiceMessageReceiverInOut.java:137)
        ... 21 more

        at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
        ... 3 more

--------------080405050007010700050803
Content-Type: text/plain;
 name="EpiLocService.wsdl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="EpiLocService.wsdl"

<wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd";
    xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="http://www-bs.informatik.uni-tuebingen.de/compas";
    targetNamespace="http://www-bs.informatik.uni-tuebingen.de/compas";>
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
            xmlns:ns1="http://org.apache.axis2/xsd";
targetNamespace="http://org.apache.axis2/xsd";
            elementFormDefault="unqualified" attributeFormDefault="unqualified">
            <xs:element name="predictLocalizationRequest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element type="xs:string" name="sequence"/>
                        <xs:element type="xs:string" name="organism"/>

                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="predictLocalizationResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="1" maxOccurs="10"
type="xs:string" name="subcellularLocalization"/>
                        <xs:element minOccurs="1" maxOccurs="10"
type="xs:decimal" name="probabilityScore" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="predictLocalizationResponseMessage">
        <wsdl:part name="part1" element="ns1:predictLocalizationResponse"/>
    </wsdl:message>
    <wsdl:message name="predictLocalizationRequestMessage">
        <wsdl:part name="part1" element="ns1:predictLocalizationRequest"/>
    </wsdl:message>
    <wsdl:portType name="TextLocServicePort">
        <wsdl:operation name="predictLocalization">
            <wsdl:input message="tns:predictLocalizationRequestMessage"/>
            <wsdl:output message="tns:predictLocalizationResponseMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TextLocServiceBinding" type="tns:TextLocServicePort">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
        <wsdl:operation name="predictLocalization">
            <soap:operation soapAction="predictLocalization" style="document"/>
            <wsdl:input>
                <soap:body use="literal"
namespace="http://www-bs.informatik.uni-tuebingen.de/compas"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"
namespace="http://www-bs.informatik.uni-tuebingen.de/compas"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TextLocService">
        <wsdl:port name="TextLocServicePortType0"
binding="tns:TextLocServiceBinding">
            <soap:address

location="http://localhost/axis2/services/TextLocService:localhost/axis2/services/TextLocService";
            />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Attachment: EpiLocService.wsdl
Description: Binary data

Reply via email to