axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wadi wadi <wadie...@gmail.com>
Subject Re: org.apache.axis2.AxisFault: No such method
Date Mon, 07 Mar 2011 16:27:58 GMT
Hi Amila,

The method is there, I checked, here is the tomcat log:

[ERROR] org.apache.axis2.AxisFault: can not find read method for : endDate
java.lang.RuntimeException: org.apache.axis2.AxisFault: can not find read
method for : endDate
        at
org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:261)
        at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:67)
        at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:994)
        at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:831)
        at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:672)
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
        at
org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:745)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:723)
        at
org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:297)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:213)
        at
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
        at
org.apache.axis2.rpc.receivers.RPCUtil.processResponseAsDocLitWrapped(RPCUtil.java:381)
        at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:138)
        at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
        at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
        at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.axis2.AxisFault: can not find read method for :
endDate
        at
org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:148)
        ... 37 more


Here is its definition in class Result.java


public void setEndDate(String endDate) {
this.endDate = endDate;
}


Also in the service class file SimpleService.java here is the code that
requires the Result.java class:

ArrayList list = new ArrayList();

while (rs.next()) {
result.setVisitid(rs.getString("visit_id"));
result.setInstrument(rs.getString("instrument"));
result.setTitle(rs.getString("title"));
 result.setInvNumber(rs.getString("inv_number"));
result.setStartDate(rs.getString("START_DATE"));
result.setEndDate(rs.getString("END_DATE"));

list.add(result);

System.out.println(rs.getString("visit_id") + "   "
+ rs.getString("instrument") + "   "
+ rs.getString("title") + "   "
+ rs.getString("inv_number") + "   "
+ rs.getString("START_DATE") + "   "
+ rs.getString("END_DATE"));
}

return (Result[]) list.toArray(new Result[list.size()]);

} catch (SQLException e) {
System.out.println("\nCould not connect to the database");
}

Many thanks for your help.




On Fri, Mar 4, 2011 at 6:25 PM, Amila Jayasekara <amilaj@wso2.com> wrote:

> Hello Wadi,
>
> At a glance it seems that operation you are trying to call is not
> there in the axis2 environment. Can you check whether the operation
> name given in client side is correct ?
> Also, could you please send us the full stack trace in client side and
> server side logs. Also we will be able to gather more info about the
> error if we have the services.xml.
>
> Thanks
> AmilaJ
>
> On Wed, Mar 2, 2011 at 4:06 AM, wadi wadi <wadienil@gmail.com> wrote:
> >
> > Hi all,
> >
> > I am running a sign and encrypt example based on sample 07 in rampart
> installation.
> > I am getting the following error when calling a simple 'authenticate'
> method
> >
> > "org.apache.axis2.AxisFault: No such method 'authenticate' in class
> edu.uni.myservice.PWCBHandler
> >
> > when browsing http://localhost:8080/axis2/services/ the method exists
> under the webservice name.
> >
> > Here is tcpmon output.
> >
> > Any idea? many thanks.
> >
> >
> > ==============
> > Listen Port: 8090
> > Target Host: 127.0.0.1
> > Target Port: 8080
> > ==== Request ====
> > POST
> /axis2/services/bankingshttp://localhost:8090/axis2/services/bankings
> HTTP/1.1
> > Content-Type: text/xml; charset=UTF-8
> > SOAPAction: "urn:authenticate"
> > User-Agent: Axis2
> > Host: 127.0.0.1:8090
> > Transfer-Encoding: chunked
> >
> > f9c
> > <?xml version='1.0' encoding='UTF-8'?>
> >    <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> >       <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
> >          <wsse:Security xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> soapenv:mustUnderstand="1">
> >             <wsu:Timestamp xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Timestamp-1">
> >                <wsu:Created>2011-03-02T11:45:58.791Z</wsu:Created>
> >                <wsu:Expires>2011-03-02T11:50:58.791Z</wsu:Expires>
> >             </wsu:Timestamp>
> >             <wsse:BinarySecurityToken xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> EncodingType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
> ValueType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
> wsu:Id="CertId-72CD692494206F603A12990663589001">MIICTzCCAbigAwIBAgIESy9O5zANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEPMA0GA1UEChMGQXBhY2hlMRAwDgYDVQQLEwdSYW1wYXJ0MRYwFAYDVQQDEw1TYW1wbGUgQ2xpZW50MB4XDTA5MTIyMTEwMzMxMVoXDTM3MDUwNzEwMzMxMVowbDELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xDzANBgNVBAoTBkFwYWNoZTEQMA4GA1UECxMHUmFtcGFydDEWMBQGA1UEAxMNU2FtcGxlIENsaWVudDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjBQM+kgC0Wm9hk9v4pjLSg5yK0Em2ulyDmODckWv4mZJ8YwJPVgqEIzwRiOnNBH3s+wFCw297zDsnEgDKSQrsPf1smVUOK/slyDPbqZ47Ewcs07nCPfNigncmpbcaluO3bMw9Oqj9VIYjrUHu5xCp2Fe39ZPbwOzLtAmT8b6iucCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAnjPanrVjFVkxnhsj83RJA2tK//v99KpPf3do9VUI2yEgvBZUzH3q2jk3widwEcsJMHgbRr3VTFL7dNVdCYBcI1KiBY9SMa1XZ4RIHmw7gkJt1JTgjKBzfrout2z614KixRf4w7qkDacGxkNspXG/PSlh03Lfm5sb0vzH1aqBl3g==</wsse:BinarySecurityToken>
> >             <wsse:BinarySecurityToken xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> EncodingType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
> ValueType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
> wsu:Id="CertId-72CD692494206F603A12990663589164">MIICTzCCAbigAwIBAgIESy9O5zANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEPMA0GA1UEChMGQXBhY2hlMRAwDgYDVQQLEwdSYW1wYXJ0MRYwFAYDVQQDEw1TYW1wbGUgQ2xpZW50MB4XDTA5MTIyMTEwMzMxMVoXDTM3MDUwNzEwMzMxMVowbDELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xDzANBgNVBAoTBkFwYWNoZTEQMA4GA1UECxMHUmFtcGFydDEWMBQGA1UEAxMNU2FtcGxlIENsaWVudDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjBQM+kgC0Wm9hk9v4pjLSg5yK0Em2ulyDmODckWv4mZJ8YwJPVgqEIzwRiOnNBH3s+wFCw297zDsnEgDKSQrsPf1smVUOK/slyDPbqZ47Ewcs07nCPfNigncmpbcaluO3bMw9Oqj9VIYjrUHu5xCp2Fe39ZPbwOzLtAmT8b6iucCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAnjPanrVjFVkxnhsj83RJA2tK//v99KpPf3do9VUI2yEgvBZUzH3q2jk3widwEcsJMHgbRr3VTFL7dNVdCYBcI1KiBY9SMa1XZ4RIHmw7gkJt1JTgjKBzfrout2z614KixRf4w7qkDacGxkNspXG/PSlh03Lfm5sb0vzH1aqBl3g==</wsse:BinarySecurityToken>
> >             <wsse:BinarySecurityToken xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> EncodingType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
> ValueType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
> wsu:Id="CertId-72CD692494206F603A12990663589317">MIICTzCCAbigAwIBAgIESy9O5zANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEPMA0GA1UEChMGQXBhY2hlMRAwDgYDVQQLEwdSYW1wYXJ0MRYwFAYDVQQDEw1TYW1wbGUgQ2xpZW50MB4XDTA5MTIyMTEwMzMxMVoXDTM3MDUwNzEwMzMxMVowbDELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xDzANBgNVBAoTBkFwYWNoZTEQMA4GA1UECxMHUmFtcGFydDEWMBQGA1UEAxMNU2FtcGxlIENsaWVudDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjBQM+kgC0Wm9hk9v4pjLSg5yK0Em2ulyDmODckWv4mZJ8YwJPVgqEIzwRiOnNBH3s+wFCw297zDsnEgDKSQrsPf1smVUOK/slyDPbqZ47Ewcs07nCPfNigncmpbcaluO3bMw9Oqj9VIYjrUHu5xCp2Fe39ZPbwOzLtAmT8b6iucCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAnjPanrVjFVkxnhsj83RJA2tK//v9
> > 728
> >
> 9KpPf3do9VUI2yEgvBZUzH3q2jk3widwEcsJMHgbRr3VTFL7dNVdCYBcI1KiBY9SMa1XZ4RIHmw7gkJt1JTgjKBzfrout2z614KixRf4w7qkDacGxkNspXG/PSlh03Lfm5sb0vzH1aqBl3g==</wsse:BinarySecurityToken>
> >             <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> Id="Signature-4">
> >                <ds:SignedInfo>
> >                   <ds:CanonicalizationMethod Algorithm="
> http://www.w3.org/2001/10/xml-exc-c14n#" />
> >                   <ds:SignatureMethod Algorithm="
> http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
> >                   <ds:Reference URI="#Timestamp-1">
> >                      <ds:Transforms>
> >                         <ds:Transform Algorithm="
> http://www.w3.org/2001/10/xml-exc-c14n#" />
> >                      </ds:Transforms>
> >                      <ds:DigestMethod Algorithm="
> http://www.w3.org/2000/09/xmldsig#sha1" />
> >
> <ds:DigestValue>tAz2cY4E2AWiyUYK5iuD+t4dnuE=</ds:DigestValue>
> >                   </ds:Reference>
> >                </ds:SignedInfo>
> >
> <ds:SignatureValue>JIkHZzws84UiNKASn+V4S1/uNPFIa+vaM3Ft4LSOq3QdMYg7COZCsQ9enHXzgPmlb4N3b9c7ofH/ArcqHhEZvf0mqtbCpG13eLX8s+Hb3RnEfILpHHDKZGAy7bFH3l6TvmQZ6veVG7iCFTR23i/pON4sFnG4dY9mbGAF3G5T4Uw=</ds:SignatureValue>
> >                <ds:KeyInfo Id="KeyId-72CD692494206F603A12990663589318">
> >                   <wsse:SecurityTokenReference xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="STRId-72CD692494206F603A12990663589319">
> >                      <wsse:Reference
> URI="#CertId-72CD692494206F603A12990663589317" ValueType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
> />
> >                   </wsse:SecurityTokenReference>
> >                </ds:KeyInfo>
> >             </ds:Signature>
> >          </wsse:Security>
> >          <wsa:To>
> http://localhost:8090/axis2/services/bankingshttp://localhost:8090/axis2/services/bankings
> </wsa:To>
> >
> <wsa:MessageID>urn:uuid:7EAAA01583056A63491299066358326</wsa:MessageID>
> >          <wsa:Action>urn:authenticate</wsa:Action>
> >       </soapenv:Header>
> >       <soapenv:Body>
> >          <ns:authenticate xmlns:ns="http://mydbService.gold.uni.edu">
> >             <ns:args>user2</ns:args>
> >             <ns:args>xxxxx</ns:args>
> >          </ns:authenticate>
> >       </soapenv:Body>
> >    </soapenv:Envelope>0
> > ==== Response ====
> > HTTP/1.1 500 Internal Server Error
> > Server: Apache-Coyote/1.1
> > Content-Type: text/xml;charset=UTF-8
> > Transfer-Encoding: chunked
> > Date: Wed, 02 Mar 2011 11:45:59 GMT
> > Connection: close
> >
> > 85d
> > <?xml version='1.0' encoding='UTF-8'?>
> >    <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> >       <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
> >          <wsse:Security xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> soapenv:mustUnderstand="1">
> >             <wsu:Timestamp xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Timestamp-3">
> >                <wsu:Created>2011-03-02T11:45:59.134Z</wsu:Created>
> >                <wsu:Expires>2011-03-02T11:50:59.134Z</wsu:Expires>
> >             </wsu:Timestamp>
> >             <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> Id="Signature-4">
> >                <ds:SignedInfo>
> >                   <ds:CanonicalizationMethod Algorithm="
> http://www.w3.org/2001/10/xml-exc-c14n#" />
> >                   <ds:SignatureMethod Algorithm="
> http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
> >                   <ds:Reference URI="#Timestamp-3">
> >                      <ds:Transforms>
> >                         <ds:Transform Algorithm="
> http://www.w3.org/2001/10/xml-exc-c14n#" />
> >                      </ds:Transforms>
> >                      <ds:DigestMethod Algorithm="
> http://www.w3.org/2000/09/xmldsig#sha1" />
> >
> <ds:DigestValue>0rYf4sdG7cxntnvByo8/d2fhcOs=</ds:DigestValue>
> >                   </ds:Reference>
> >                </ds:SignedInfo>
> >
> <ds:SignatureValue>VbDLUwUaTVrleCVZEDFMSQTaxyeVnhBIdN3TEngADHz8do0G0b1RkADOJgHt3ggIDQbyZRSVFnU4VhVFWF7WOnfYC+kW3u/G1dct9hEJ32DZTaH7PvLhxTnj50TCmFjLOSnHma5Toa6QQ8TphZF1pOGEJkNVNcoCQdgK04ecHQE=</ds:SignatureValue>
> >                <ds:KeyInfo Id="KeyId-3D3FDA47D2D42934BB12990663591345">
> >                   <wsse:SecurityTokenReference xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="STRId-3D3FDA47D2D42934BB12990663591346">
> >                      <wsse:KeyIdentifier EncodingType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
> ValueType="
> http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1
> ">aqePjuZzE1lzwMMtquksvNJsbmI=</wsse:KeyIdentifier>
> >                   </wsse:SecurityTokenReference>
> >                </ds:KeyInfo>
> >             </ds:Signature>
> >          </wsse:Security>
> >          <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault
> </wsa:Action>
> >
> <wsa:RelatesTo>urn:uuid:7EAAA01583056A63491299066358326</wsa:RelatesTo>
> >       </soapenv:Header>
> >       <soapenv:Body>
> >          <soapenv:Fault>
> >             <faultcode>soapenv:Server</faultcode>
> > 68
> >
> >             <faultstring>No such method 'authenticate' in class
> edu.uni.gold.mydbservice.PWCBHandler</faultstring>
> > a
> >
> >             <detail />32
> >          </soapenv:Fault>
> >       </soapenv:Body>
> >    </soapenv:Envelope>0
> >
> > ==============
> >
>



-- 
Wadienil.

Mime
View raw message