axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2-5636) Send file using stub generated from Apache Axis2/Java 1.6.2
Date Sat, 08 Mar 2014 14:10:42 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sagara Gunathunga  resolved AXIS2-5636.
---------------------------------------

    Resolution: Invalid

JIRA is to track project issues and improvements not to provide user helps, use user mailing
list to get helps.  

> Send file using stub generated from Apache Axis2/Java 1.6.2 
> ------------------------------------------------------------
>
>                 Key: AXIS2-5636
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5636
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.6.2
>            Reporter: Avinash
>             Fix For: 1.6.3
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> hello all,
> I am stuck in a issus with sending file using stub generated by Apache Axis2/Java 1.6.2
, in spring mvc as server side and angularjs as front end.
> my java code below ::
> long chunkedSize = 8192;
> 			SiteKey keyObj = new SiteKey();
> 			keyObj.setSiteKey(wsEndPointsFactory.getSiteKey());
> 			EproofServiceStub stub = wsEndPointsFactory
> 					.eproofServiceStubFromPool();
> 			ServiceClient serviceClient = stub._getServiceClient();
> 			Options clientOptions = new Options();
> 			clientOptions
> 					.setSoapVersionURI(org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> 			
> 			  clientOptions.setProperty(HTTPConstants.CONTENT_TYPE,
> 			  "multipart/related");
> 			  
> 			  /*clientOptions.setProperty(
> 			  Constants.Configuration.ENABLE_HTTP_CONTENT_NEGOTIATION, "true");*/
> 			  clientOptions.setProperty(Constants.Configuration.MESSAGE_TYPE,
> 			  "multipart/related");
> 			  
> 			  clientOptions.setProperty(Constants.Configuration.CONTENT_TYPE,
> 					  "multipart/related");
> 			  
> 			 /*clientOptions.setProperty(HTTPConstants.CHAR_SET_ENCODING,
> 			 "utf-8");*/
> 			clientOptions.setTo(new EndpointReference(eproofService));
> 			clientOptions.setProperty(Constants.Configuration.ENABLE_MTOM,
> 					Constants.VALUE_TRUE);
> 			clientOptions.setProperty(HTTP_CLIENT_STREAMING_CHUNK_SIZE,
> 					chunkedSize);
> 			serviceClient.setOptions(clientOptions);
> 			stub._setServiceClient(serviceClient);
> 			SecurityToken tokenObj = new SecurityToken();
> 			tokenObj.setSecurityToken(sessionID);
> 			// MessageFactory factory = MessageFactory.newInstance();
> 			// SOAPMessage message = (SOAPMessage) factory.createMessage();
> 			DoImportComponent doImportComponent = new DoImportComponent();
> 			ImPortClass importClass = new ImPortClass();
> 			importClass.setUserID(userId);
> 			importClass.setStrStickyId(String.valueOf(stickyId));
> 			importClass.setStrAdNumber(String.valueOf(adNumber));
> 			importClass.setIsPrePrint(preprint);
> 			importClass.setExt(ext);
> 			File file1 = new File("C:/Users/mananvm/Desktop/iglpayment.png");
> 			DataHandler dataHandler = new DataHandler(file.getBytes(),
> 					file.getContentType());
> 			importClass.setContent(dataHandler);
> 			doImportComponent.setObj(importClass);
> 			DoImportComponentResponse response = stub.doImportComponent(
> 					doImportComponent, keyObj, tokenObj);
> 			return false;// response.getDoImportComponentResult();



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message