aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Please Help to write client for Webservice" Watch "Please Help to write client for Webservice" New topic
Author

Please Help to write client for Webservice

chinna sankar
Greenhorn

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="http://xml.apache.org/xml-soap" xmlns:impl="urn:AttachmentTip" xmlns:intf="urn:AttachmentTip" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->

<wsdl:message name="sendOctetResponse">

</wsdl:message>

<wsdl:message name="sendOctetRequest">

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

</wsdl:message>

<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="http://schemas.xmlsoap.org/soap/http"/>

<wsdl peration name="sendOctet">

<wsdlsoap peration soapAction=""/>

<wsdl:input name="sendOctetRequest">

<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AttachmentTip" use="encoded"/>

</wsdl:input>

<wsdl utput name="sendOctetResponse">

<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AttachmentTip" use="encoded"/>

</wsdl utput>

</wsdl peration>

</wsdl:binding>

<wsdl:service name="AttachmentTipService">

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

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

</wsdl ort>

</wsdl:service>

</wsdl efinitions>

*****WSDL File is End


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

<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<!-- 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="*"/>

</service>
</deployment>
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
Reading this article may provide you with some help.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please Help to write client for Webservice