You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Markus Frommherz <Ma...@wdr.de> on 2003/01/17 22:24:38 UTC

Antw: FW: Method 'request' does not match any of the validsignatures

To clarify my statements, I beg your pardon for my broken english,
Axis is (at time of writing) not able, to parse an arbitrary document and map it on your delivered class. 
That might change in the future.
Workarounds: write special de/serializer, and use "wrapped" style. 
I personally do not recommend this, your are stuck when the input changes.
Use a xml->java framework that takes the dom-document as input, and map the content onto java-objects. This is not as hard as it sounds.
Benefits: you don't feeble around with xml, you might use internal validation of the incoming xml, 
fine-tuning of mapping, if framework supports it, and you might get rid of it, when axis will do the job for you internally once. 


>>> Markus.Frommherz@wdr.de 17.01.2003  22.11 Uhr >>>
So here we go, and now you could map your Elements[] 1. by hand (no) or use JAXB (beta), better Castor( if you have a schema for your document, editors like stylus studio may be a help), to do the dirty work to map to java = "Your Code".

>>> cwilkerson@travelnow.com 17.01.2003  21.42 Uhr >>>
For what it's worth...the other types of message-style services seem to work fine...just not this one as indicated in the user guide:

Message services
-------------------
Finally, we arrive at "Message" style services, which should be used when you want Axis to step back and let your code at the actual XML instead of turning it into Java objects. There are four valid signatures for your message-style service methods:

public Element [] method(Element [] bodies);
public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
public Document method(Document body);
public void method(SOAPEnvelope req, SOAPEnvelope resp); 


-----Original Message-----
From: Cory Wilkerson 
Sent: Friday, January 17, 2003 2:18 PM
To: axis-user@xml.apache.org 
Subject: Method 'request' does not match any of the valid signatures


Issue on the server side...any assistance would be appreciated.  I can't seem to pin it down...am I missing something?

I've implemented a message-style service defined as:

-------------------------------------
package com.cory.xml.service;

import javax.xml.soap.SOAPEnvelope;

public class XMLInterface {

    /**
     * Services an incoming XML request.
     * Provides authentication and routing based off of soap headers.
     */
    public void request(SOAPEnvelope request, SOAPEnvelope response) {


    }
}
----------------------------------------

Server spitting out:

------------------------------------------
SEVERE: Exception:
java.lang.Exception: Method 'request' does not match any of the valid signatures
 for message-style service methods
        at org.apache.axis.InternalException.<init>(InternalException.java:108)
        at org.apache.axis.description.ServiceDesc.checkMessageMethod(ServiceDesc.java:726)

I thought that public void request(SOAPEnvelope request, SOAPEnvelope response) was a valid message-style service method, no???
------------------------------------------

Registered on the server (server-config.wsdd) as:

------------------------------------------
<service name="XmlMessageBased" provider="java:MSG">
  <requestFlow>
   <handler type="soapmonitor"/>
  </requestFlow>
  <responseFlow>
   <handler type="soapmonitor"/>
  </responseFlow>
  <parameter name="allowedMethods" value="request"/>
  <parameter name="scope" value="request"/>
  <parameter name="className" value="com.cory.xml.service.XMLInterface"/>
 </service>