WebServices: how to convert a Zip file into a octet Stream
===

I am working on soap webservices .I have given a third party wsdl url in which i need to generate client code .
My query is i need to pass zip file which contains bundle of xml which the passing parameter should be type octet stream. I dont know how to pass argument as octet stream. Plzz Help me..Here my Code

    try {
		  String xmlfilename= "d:\\projects\\jj.zip";
	    DITWSAuthInfo reqType = new DITWSAuthInfo();
	
	  
	    reqType.setUserID(userID );
	    reqType.setPassword(password);

	    // Set the Certificate Chain and digital signature using sample code snippets
	    reqType.setCertChain(certChain);
	    reqType.setSignature(digitalSignature);

	    // Set TrustStore and TrustStorePassword to invoke the web service
	    // over SSL
	    System.setProperty("javax.net.ssl.trustStore", trustStorepath);
	    System.setProperty("javax.net.ssl.trustStorePassword",
	        trustStorePassword);
	    System.out.println("Hello 3");
	    
	    
	    // Attach XML as SOAP with Attachment
	   
	  
	  
	
	 DataHandler itrXMLFile = new DataHandler(new
	        FileDataSource(xmlfilename));
	


	 ITRServiceSoapBindingStub m_endpoint = new ITRServiceSoapBindingStub();
	 
	 DITWSResponse response = m_endpoint.submitITR(reqType,itrXMLFile);
  	  
	    System.out.println("Web Service Response is : " +
	        response.getResult());
	}catch(ITRInvalidDocFaultException itrInvalidDocExcep) {
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrInvalidDocExcep.getErrorCode()+ "\n" +
	        "Error MSG - "+itrInvalidDocExcep.getErrorDesc());
	} catch(ITRCredentialFaultException itrCredFaultExcep) {
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrCredFaultExcep.getErrorCode() + "\n" +
	        "Error MSG - "+itrCredFaultExcep.getErrorDesc());
	} catch(ITRInvalidCertificateFaultException itrInvalidCertFaultExcep){
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrInvalidCertFaultExcep.getErrorCode() + "\n"
	        + "Error MSG - " + itrInvalidCertFaultExcep.getErrorDesc());
	} catch(ITRServiceFaultException itrServiceFaultExcep) {
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrServiceFaultExcep.getErrorCode() + "\n" +
	        "Error MSG - " + itrServiceFaultExcep.getErrorDesc());
	} catch(ITRBusinessServiceFaultException itrBixEx) {
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrBixEx.getErrorCode() + "\n" +
	        "Error MSG - " + itrBixEx.getErrorDesc());
	} catch(ITRFaultException itrFaultExcep) {
	    System.out.println("Web Service Response is: " + "\n" +
	        "ErrorCode - " + itrFaultExcep.getErrorCode() + "\n" +
	        "Error MSG - " + itrFaultExcep.getErrorDesc());
	} catch(Exception ex) {
	    System.out.println("Error Message " + ex.getMessage());
	}
	}
}


