• rohits83
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 10
    Replies
 

I need to Delete Documents from Workspace and Content Folder.

 

I have published the document using a SOAP message by tying the contentdocumentID and ContentWorkspaceId in the ContentWorkspaceDo.

 

I need to delete the document using the web services calls only ... 

 

I tried to modify the publishedstatus of the Document from P to R and IsDelete status from false to true, but I get a error stating that it is not writeable field.

Can someone please suggest a way to delete the document from the Workspace and Content Folder.

 

Thanks

Rohit

I need to push a single file of size 250MB to Content Folder using the Java API, but while trying to do this I got a error message mentioned below:

 

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Maximum size of request reached. Maximum size of request is 52428800 bytes.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

Can someone please help how can I overcome this limitation.  I need this to work as the business requirement.

 

Thanks

Rohit

I need to push large files to Content folder to salesforce.com using the java API. I'm passing data to salesforce.com using SOAP messages.

 

I'm able to push files upto 7MB but if I push the files larger than 7MB I get the following error

java.lang.OutOfMemoryError: Java heap space

 

I have increased the heap size to 1024MB but of no use. The eclipse.ini file looks like 

 

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx1024m
-XX:PermSize=64M
-XX:MaxPermSize=128M

 

Can someone please suggest how can this problem be resolved.

 

Hi

 

I need to push a document in Content Folder in a workspace. I'm creating the below SOAP message but I'm nolt able to push the document using the below mentioned SOAP request message.

 

<urn:create>
<urn:sObjects xsi:type="ContentWorkspaceDoc">
<ContentDocument>
<Title>Title for Document</Title>
<LatestPublishedVersion>
<VersionData>getBinaryData()</VersionData>
</LatestPublishedVersion>
</ContentDocument>
<ContentWorkspace>
<Name>Name of the workspace</Name>
</ContentWorkspace>
</urn:sObjects>
</urn:create>

 

 

Hi

 

I'm facing problem while opening the documents (PDF, doc) that was pushed to SDFC using SOAP Message. The PDF documents are successfully pushed to the folder but when I open them, there is an error message saying that "File Does not Begin with '%PDF-'

 

I'm trying to push the document using the SOAP request which is given below 

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com\" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance\">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>"+sessionID+"</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<urn:sObjects xsi:type="urn:Document">
<Name>Testing</Name>
<Body>readFileInBytes()</Body>
<Description>Testing Desc</Description>
<ContentType>application/pdf</ContentType>
<FolderId>folderID</FolderId>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>

 

When I push the same document using the Web Service Client to SDFC, the PDF opens perfectly fine.

 

I'm setting the content type for the documents. I'm converting the documents in bytes and then populating the bytes array in the  <Body> tag in the SOAP Message.

 

Can someone please suggest me what may be the problem?

 

Thanks

Rohit

I'm trying to connect the salesforce API by creating a web service client in java (Axis).

 

I'm behind proxy and I have set the property that is required for connecting a web service for proxy

The code that I'm using is 

 

            binding = (SoapBindingStub) new SforceServiceLocator().getSoap();

            binding._setProperty("http.proxySet", "true");
            binding._setProperty("http.proxyHost", <proxy-host>);
            binding._setProperty("http.proxyPort", <proxy-port>);

 

 

 I'm calling the login function given below

 

            Login login = new Login();
            login.setUsername(<username>);
            login.setPassword(<password>);
            LoginResult lr = binding.login(username, password);
 

 

I have added the following jars in my classpath :

 

jaxrpc.jar
axis.jar
commons-discovery-0.2.jar
commons-logging.jar
wsdl4j-1.5.1.jar
commons-httpclient-3.0-rc4.jar

I'm getting the following error while calling the login function 

 


AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.UnknownHostException: test.salesforce.com
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.net.UnknownHostException: test.salesforce.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

 

Can someone please help me how can I resolve the problem...

 

Thanks!!!

I need to push a single file of size 250MB to Content Folder using the Java API, but while trying to do this I got a error message mentioned below:

 

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Maximum size of request reached. Maximum size of request is 52428800 bytes.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

Can someone please help how can I overcome this limitation.  I need this to work as the business requirement.

 

Thanks

Rohit

I need to push large files to Content folder to salesforce.com using the java API. I'm passing data to salesforce.com using SOAP messages.

 

I'm able to push files upto 7MB but if I push the files larger than 7MB I get the following error

java.lang.OutOfMemoryError: Java heap space

 

I have increased the heap size to 1024MB but of no use. The eclipse.ini file looks like 

 

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx1024m
-XX:PermSize=64M
-XX:MaxPermSize=128M

 

Can someone please suggest how can this problem be resolved.

 

Hi

 

I need to push a document in Content Folder in a workspace. I'm creating the below SOAP message but I'm nolt able to push the document using the below mentioned SOAP request message.

 

<urn:create>
<urn:sObjects xsi:type="ContentWorkspaceDoc">
<ContentDocument>
<Title>Title for Document</Title>
<LatestPublishedVersion>
<VersionData>getBinaryData()</VersionData>
</LatestPublishedVersion>
</ContentDocument>
<ContentWorkspace>
<Name>Name of the workspace</Name>
</ContentWorkspace>
</urn:sObjects>
</urn:create>

 

 

Hi

 

I'm facing problem while opening the documents (PDF, doc) that was pushed to SDFC using SOAP Message. The PDF documents are successfully pushed to the folder but when I open them, there is an error message saying that "File Does not Begin with '%PDF-'

 

I'm trying to push the document using the SOAP request which is given below 

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com\" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance\">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>"+sessionID+"</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<urn:sObjects xsi:type="urn:Document">
<Name>Testing</Name>
<Body>readFileInBytes()</Body>
<Description>Testing Desc</Description>
<ContentType>application/pdf</ContentType>
<FolderId>folderID</FolderId>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>

 

When I push the same document using the Web Service Client to SDFC, the PDF opens perfectly fine.

 

I'm setting the content type for the documents. I'm converting the documents in bytes and then populating the bytes array in the  <Body> tag in the SOAP Message.

 

Can someone please suggest me what may be the problem?

 

Thanks

Rohit

I'm trying to connect the salesforce API by creating a web service client in java (Axis).

 

I'm behind proxy and I have set the property that is required for connecting a web service for proxy

The code that I'm using is 

 

            binding = (SoapBindingStub) new SforceServiceLocator().getSoap();

            binding._setProperty("http.proxySet", "true");
            binding._setProperty("http.proxyHost", <proxy-host>);
            binding._setProperty("http.proxyPort", <proxy-port>);

 

 

 I'm calling the login function given below

 

            Login login = new Login();
            login.setUsername(<username>);
            login.setPassword(<password>);
            LoginResult lr = binding.login(username, password);
 

 

I have added the following jars in my classpath :

 

jaxrpc.jar
axis.jar
commons-discovery-0.2.jar
commons-logging.jar
wsdl4j-1.5.1.jar
commons-httpclient-3.0-rc4.jar

I'm getting the following error while calling the login function 

 


AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.UnknownHostException: test.salesforce.com
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.net.UnknownHostException: test.salesforce.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
    at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

 

Can someone please help me how can I resolve the problem...

 

Thanks!!!