function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TesterInSkyTesterInSky 

what data type I need to use to represent xsd:time and xsd:base64Binary

When using Axis API to send xsd:time or xsd:base64Binary type data in a SOAP call, there is a org.apache.axis.message.MessageElement class, I need to call its 'setObjectValue(Object newValue)' method to set the value for a element node. 

 

If this 'Object newValue' is in Java boolean type, then the element will be created as the xsd:boolean. But for now, I do not know what Java type is used for representing xsd:time and xsd:base64Binary. I looked up the Internet and tried for xsd:time to use java.sql.Time, but failed, the API call convered the created java.sql.Time to java.Util.Date, then the created element node is in the type of xsd:datetime.

 

Could any one give some advice on this, thanks!

Best Answer chosen by Admin (Salesforce Developers) 
onedayoneday

Running the WSDL2Java on the enterprise WSDL is a good idea!

 

I find out it uses it is org.apache.axis.types.Time for xsd:Time

 

Thanks! 

All Answers

SuperfellSuperfell
Not sure for xsd:time, you'll need to check the axis docs, for base64Binary, its byte []. (you could also run WSDL2Java on the enterprise WSDL, and see what java types it uses for those elements)
onedayoneday

Running the WSDL2Java on the enterprise WSDL is a good idea!

 

I find out it uses it is org.apache.axis.types.Time for xsd:Time

 

Thanks! 

This was selected as the best answer