Re: sent a message to a particular method on the server side

From: Oancea Daniel <>
Date: Tue, 19 Jul 2005 17:04:24 +0100

Thanks for your reply Anne

i read much better the tutorial and i made a client. But, the I still
have a problem.
The client that I made have to sent an attachment to an web service ,
and get an answer from them. The think is that I don't get anything
from the server side.

The system server - client is very simple.

here is a part from WSDL file:

    <wsdl:operation name="sendOctet">
            <soap:operation soapAction="sendOctet"/>
                        <soap:body use="literal"/>
                        <mime:content part="octet"
                <soap:body use="literal"/>

the interface generated by the wscompile using -import -f:wsi options
is look like:

public interface AttachmentPortType extends java.rmi.Remote {
    public java.lang.String sendOctet(javax.activation.DataHandler
octet) throws

the implementation of interface:

public class AttachmentPortTypeImpl implements AttachmentPortType{

   public String sendOctet(javax.activation.DataHandler octet) {
             return ("***Service received DataHandler of type: " +

and the client :

public static void main(String[] args) {
try {
Stub proxy = proxy();

AttachmentPortType req = (AttachmentPortType) proxy;

FileDataSource file = new FileDataSource("e://lucru/IMSClient/conf/test.txt");
DataHandler dh = new DataHandler(file);

String request = req.sendOctet(dh);

System.out.println("response " + request);
} catch (Exception e) {
// TODO: handle exception

public static Stub proxy(){
return (Stub) (new Attachment_Impl().getAttachmentPort());

when I run this client i don't receive anything.

I do something wrong in the client in order to transmit an attachment ?
How can i see if the client send something to the web service ? I try
with TCP Monitor from Axis Apache but don't capture any SOAP Message
in this case.
Any help will be appreciated .


On 7/18/05, Anne Thomas Manes <> wrote:
> The service at the endpoint uses the qname of the child element of the
> SOAP Body to determine how to dispatch the request. That information
> must be defined as part of the service configuration. Your client must
> construct an appropriate message (as specified by the WSDL file), and
> then it should work. The client does not need to indicate the
> service's method name.
> On 7/14/05, Oancea Daniel <> wrote:
> > hi everybody,
> >
> > a read the Java Web Services Tutorial and I build an JAX-RPC client
> > which has to interact whit a web service. The problem is that i don't
> > now exactly how to tell to my client to try to reach a particular
> > method from the server side. In the tutorial I find that I have to use
> > <call> method to send a message, which have two arguments: the message
> > being sent and the destination to which the message should go. Is
> > nothing about the method that i want to address this message.
> >
> > I done something like :
> >
> > SOAPMessage response =, endpoint);
> >
> > where <endpoint> is the address location of the web service.
> >
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail: