• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Spring-WS Client

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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">
<wsdl:operation name="uploadFile">
<wsdl:input message="uploadFileRequestMsg" name="uploadFileRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding>
<wsdl:operation name="uploadFile">
<soap12:operation 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/"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>

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

Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic