File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Please Help to write client for Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Please Help to write client for Webservice" Watch "Please Help to write client for Webservice" New topic

Please Help to write client for Webservice

chinna sankar

Joined: Mar 06, 2005
Posts: 22
I need to sent a file as a SOAP attachment (Multi part Message)in Webservices. I am using axis
for generation WSDL and Wsdd Files

Can u help me in how to write a client for below

*****My Interface Defination is

package DhPack;

public interface AttachmentTip extends java.rmi.Remote {
public void sendOctet(javax.activation.DataHandler in0) throws java.rmi.RemoteException;

*****WSDL File is
<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="urn:AttachmentTip" xmlns:apachesoap="" xmlns:impl="urn:AttachmentTip" xmlns:intf="urn:AttachmentTip" xmlns:soapenc="" xmlns:wsdl="" xmlns:wsdlsoap="" xmlns:xsd="">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->

<wsdl:message name="sendOctetResponse">


<wsdl:message name="sendOctetRequest">

<wsdl art name="in0" type="apachesoap ataHandler"/>


<wsdl ortType name="AttachmentTip">

<wsdl peration name="sendOctet" parameterOrder="in0">

<wsdl:input message="impl:sendOctetRequest" name="sendOctetRequest"/>

<wsdl utput message="impl:sendOctetResponse" name="sendOctetResponse"/>

</wsdl peration>

</wsdl ortType>

<wsdl:binding name="AttachmentTipSoapBinding" type="impl:AttachmentTip">

<wsdlsoap:binding style="rpc" transport=""/>

<wsdl peration name="sendOctet">

<wsdlsoap peration soapAction=""/>

<wsdl:input name="sendOctetRequest">

<wsdlsoap:body encodingStyle="" namespace="urn:AttachmentTip" use="encoded"/>


<wsdl utput name="sendOctetResponse">

<wsdlsoap:body encodingStyle="" namespace="urn:AttachmentTip" use="encoded"/>

</wsdl utput>

</wsdl peration>


<wsdl:service name="AttachmentTipService">

<wsdl ort binding="impl:AttachmentTipSoapBinding" name="AttachmentTip">

<wsdlsoap:address location="http://localhost:8080/axis/services/AttachmentTip"/>

</wsdl ort>


</wsdl efinitions>

*****WSDL File is End

****************and My WSDD file is


<!-- Services from AttachmentTipService WSDL service -->

<service name="AttachmentTip" provider="java:RPC" style="rpc" use="encoded">
<parameter name="wsdlTargetNamespace" value="urn:AttachmentTip"/>
<parameter name="wsdlServiceElement" value="AttachmentTipService"/>
<parameter name="wsdlServicePort" value="AttachmentTip"/>
<parameter name="className" value="DhPack.AttachmentTipSoapBindingSkeleton"/>
<parameter name="wsdlPortType" value="AttachmentTip"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="allowedMethods" value="*"/>

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Reading this article may provide you with some help.
I agree. Here's the link:
subject: Please Help to write client for Webservice
jQuery in Action, 3rd edition