Tag Archives: Webservices

Adding a Custom header to your Web Service (WSDL)

It’s very common that you have to define a WSDL and want it to have custom header. I have been using WSDL’s with custom headers for some time and thought I will post this sample WSDL for all of you who want to define a SOAP 1.1 WSDL with a custom message header. Below is […]

read more

Generating Client JAVA code for WSDL using SOAP UI – AXIS2 WSDL2JAVA

Create a Soap UI project using your WSDL. Set the Preferences in SOAP UI for AXIS2 home directory. Right Click on the WSDL in SOAP UI and click generate code. Select ADB binding and the following settings and click generate Following is the directory structure and code files generated. That’s it, you can now use […]

read more

How to Upload Multiple Files in Java

package com.mp.ws; /** * * @author nitinaggarwal * */ public interface IFileUpload { public byte[] get1File(String name); public byte[][] getMulitpleFiles(String names[]); public String getXmlFile(String name); } package com.mp.ws; /** * * @author nitinaggarwal * */ public class FileUpload implements IFileUpload { public byte[] get1File(String name) { byte data[] = null; FileReader fr = new FileReader(); […]

read more