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 Vadim Draluk <va...@draluk.net> on 2002/09/10 02:16:48 UTC

Re: Newbie: Help with Message-Based Services

Nicolas,

what's in your catalog.xml file ? I'd expect
"publishCatalog" to be its root element. I haven't
tried it against Axis server, but very similar code
works with number of other servers (BEA, IBM).

Another thing is that I've also explicitly set the
operation style:

   call.setOperationStyle("document");

but I doubt it makes any difference.

Cheers

Vadim

--- "Nicolas Dinh (VP Academic)"
<du...@hotmail.com> wrote:

<HR>
<html><div
style='background-color:'><DI...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>I'm
trying to deploy a MSG-based service and run a client
for it. I got the source code from the the wrox AXIS
book.</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>I
manage to deploy the the web-service on my AXIS Beta
3. I can view the WSDL file for the web-service and
even manage to use the AdminClient to list the
service. However, when I run the client, I get the
following
error:</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>java.lang.NoSuchMethodException:
tried class:
wroxaxis.chapter2.messaging.CatalogPublisherService,
method name:
publishCatalog.</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>The
publishCatalog is the only allowedMethod for the
CatalogPublisherService:</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>&lt;service
name="CatalogPublisherService"
provider="java:MSG"&gt;</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&lt;parameter
name="className"
value="wroxaxis.chapter2.messaging.CatalogPublisherService"/&gt;</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&lt;paramater
name="allowedMethods"
value="publishCatalog"/&gt;</m...@xml.apache.org></DIV>
<DI...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>This
is how I invoke the method in my
client:</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>Call
call = (Call)
service.createCall();</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>call.setTargetEndpointAddress(
new URL(endpointURL)
);</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>SOAPBodyElement[]
reqSOAPBodyElements = new
SOAPBodyElement[1];</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>reqSOAPBodyElements[0]
= new SOAPBodyElement(XMLUtils.newDocument( new
java.io.FileInputStream( new
java.io.File("catalog.xml") )).getDocumentElement()
);</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>Vector
resSOAPBodyElements = (Vector)
call.invoke(reqSOAPBodyElements);</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>The
CatalogPublisherService web service is as
follows:</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>public
class CatalogPublisherService
{</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;&nbsp;
public Element[] publishCatalog( MessageContext
context, Vector soapBodyElements )
{}</m...@xml.apache.org></DIV>
<DI...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>I
don't know why my client is unable to find the
method.... any
ideas?</m...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org></DIV>
<DI...@xml.apache.org>&nbsp;</DIV>
<DI...@xml.apache.org>Nicolas
Dinh</D...@xml.apache.org></div><br
clear=all><hr>Send and receive Hotmail on your mobile
device: <a
href='http://g.msn.com/1HM1ENCA/c152??PI=44318'>Click
Here</a><br></html>