Thanks,
Robert
http://www.braziloutsource.com/
On 5/10/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
Sebastian,
There are errors in your WSDL. You must remove the namespace attributes from the <soap:body> binding descriptions. (The namespace attribute must be use only with RPC style.)
AnneOn 5/10/06, Sebastian J. Schultheiss <[EMAIL PROTECTED] > wrote: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>
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="SimpleService" targetNamespace="http://simpleNS" xmlns:tns="http://simpleNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://simpleNS/types"> <types> <schema targetNamespace="http://simpleNS/types" xmlns:tns="http://simpleNS/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <element name="simpleLogin"> <complexType> <sequence> <element name="user_name" type="xsd:string"/> <element name="user_password" type="xsd:string"/> </sequence> </complexType> </element> <element name="simpleLoginResponse"> <complexType> <sequence> <element name="soap_session_id" type="xsd:string"/> <element name="web_user_name" type="xsd:string"/> </sequence> </complexType> </element> </schema></types> <message name="SimpleEndpoint_simpleLogin"> <part name="parameters" element="ns2:simpleLogin"/> </message> <message name="SimpleEndpoint_simpleLoginResponse"> <part name="result" element="ns2:simpleLoginResponse"/> </message> <portType name="SimpleEndpoint"> <operation name="simpleLogin"> <input message="tns:SimpleEndpoint_simpleLogin" name="SimpleEndpoint_simpleLogin"/> <output message="tns:SimpleEndpoint_simpleLoginResponse" name="SimpleEndpoint_simpleLoginResponse"/> </operation> </portType> <binding name="SimpleEndpointBinding" type="tns:SimpleEndpoint"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="simpleLogin"> <soap:operation soapAction="simpleLogin"/> <input name="SimpleEndpoint_simpleLogin"> <soap:body use="literal"/> </input> <output name="SimpleEndpoint_simpleLoginResponse"> <soap:body use="literal"/> </output> </operation> </binding> <service name="SimpleService"> <port name="SimpleEndpointPort" binding="tns:SimpleEndpointBinding"> <soap:address location="http://localhost:8080/axis2/services/SimpleService"/></port></service></definitions>