- Community Home
- >
- Welcome
- >
- Other HPE Product Questions
- >
- Re: download and upload attachments in MF SM9
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2018 06:45 AM
06-14-2018 06:45 AM
download and upload attachments in HPSM9
hi
i havea hava program which imports a WSDL generated for HP sm9. am able to get all the other details like status assignment group etc. this webservice is created for incidnet module.
now am struck with dowbnload and upload an attachment kindly help me , the getattaachment methof of the instance is returning nothign for an incident. but in real the incident has attachments below is the code
import java.io.File;
import java.nio.file.Files;
import com.hp.schemas.SM._7.RetrieveSherpaRequest;
import com.hp.schemas.SM._7.RetrieveSherpaResponse;
import com.hp.schemas.SM._7.SherpaInstanceType;
import com.hp.schemas.SM._7.SherpaKeysType;
import com.hp.schemas.SM._7.SherpaModelType;
import com.hp.schemas.SM._7.SherpaProxy;
import com.hp.schemas.SM._7.UpdateSherpaRequest;
import com.hp.schemas.SM._7.UpdateSherpaResponse;
import com.hp.schemas.SM._7.Common.AttachmentType;
import com.hp.schemas.SM._7.Common.StringType;
import com.hp.schemas.SM._7.Common.AttachmentType;
public class retrive_incident {
@SuppressWarnings("null")
public static void main(String[] args) throws Exception {
RetrieveSherpaRequest retrive_inc = new RetrieveSherpaRequest();
retrive_inc.setAttachmentInfo(null);
retrive_inc.setAttachmentData(null);
retrive_inc.setIgnoreEmptyElements(true);
retrive_inc.setUpdatecounter(null);
retrive_inc.setHandle(null);
retrive_inc.setCount(null);
retrive_inc.setStart(null);
SherpaInstanceType inc_instance = new SherpaInstanceType();
inc_instance.setQuery(null);
inc_instance.setUniquequery(null);
inc_instance.setRecordid(null);
inc_instance.setUpdatecounter(null);
StringType inc_id = new StringType();
inc_id.set_value("IM66913777");
SherpaKeysType keys_samp = new SherpaKeysType();
keys_samp.setIncidentID(inc_id);
keys_samp.setQuery("");
keys_samp.setUpdatecounter(null);
SherpaModelType model_samp = new SherpaModelType();
model_samp.setQuery("");
model_samp.setKeys(keys_samp);
model_samp.setInstance(inc_instance);
retrive_inc.setModel(model_samp);
//update_sherpa update_incidnet = new update_sherpa();
//update_incidnet.upadte_sherpa_incident();
SherpaProxy incd_proxy = new SherpaProxy();;
((javax.xml.rpc.Stub) incd_proxy.getSherpa_PortType())._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "sherpa");
((javax.xml.rpc.Stub) incd_proxy.getSherpa_PortType())._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "sherpa");
RetrieveSherpaResponse response = incd_proxy.retrieveSherpa(retrive_inc);
AttachmentType attchment = new AttachmentType();
System.out.println("before cmpletion");
String a = response.getModel().getInstance().getAttachments()[0].getHref();
System.out.println("entering cmpletion");
System.out.println(a + " completed");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2018 03:58 AM - edited 06-17-2018 03:59 AM
06-17-2018 03:58 AM - edited 06-17-2018 03:59 AM
Re: download and upload attachments in MF SM9
This is the wrong company for MF software questions. You need to register in the MF Software Forum:
https://community.softwaregrp.com/t5/Service-Manager-Service-Center/bd-p/itrc-695