wood burning stoves 2.0*
The moose likes Web Services and the fly likes Spring-WS Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring-WS Client " Watch "Spring-WS Client " New topic

Spring-WS Client

Joyce Kind

Joined: Nov 27, 2008
Posts: 8

I just start to use Spring-WS client to send request with an attachment to a Web Service. According to the Web service functional spec I received from client, I need to call an operation uploadFile with the file itself as a SOAP attachment. However I am not able to find anything related to attachement in the WSDL file and JAXB generatd classes. As I presume the WSDL should have <mime:part><mime:content part="attach" type="application/pdf" /> </mime:part> declared for the uploadFileRequest. So I wonder if the WSDL I received is wrong.

As I am new to Spring-WS and SOAP attachement, and really not sure if Spring-WS has better way to deal with the attachment. Could someone please help?

The WSDL I got:
<wsdl:portType name="FileService">
<wsdlperation name="uploadFile">
<wsdl:input message="uploadFileRequestMsg" name="uploadFileRequest"/>
<wsdlperation name="uploadFile">
<soap12peration soapAction="uploadFile" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
<wsdl:input name="uploadFileRequest">
<soap12:header message="serviceHeaderMsg" part="serviceHeader" use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
<soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>

schema for uploadFileRequest:
<xsd:complexType name="uploadFileRequest">
<xsd:element minOccurs="0" name="repositoryName" type="xsd:string" />
<xsd:element minOccurs="0" name="fileName" type="xsd:string" />

I agree. Here's the link: http://aspose.com/file-tools
subject: Spring-WS Client
Similar Threads
maxOccurs issue
Can we support Map/HashMap in the webservice as one of internal parameters?
Error Building Java Application
Client for Axis2 POJO webservice giving error
Web Service message level Encryption Decryption through public and private key