You need to sign in to do that
Don't have an account?
Subhranshu Mohanty
PHP TO SALESFORCE SOAP CALL
Hi All,
My requirement is to create a record for on object & its related attachment in salesforce from php. So for that i created one webservice class & method exposed it .From php side we can able to pass parameters(fields) & record aslo created in salesforce , But How could we pass files which will going to store in the attachment of that record? what should i do to accept that file in my class?
My requirement is to create a record for on object & its related attachment in salesforce from php. So for that i created one webservice class & method exposed it .From php side we can able to pass parameters(fields) & record aslo created in salesforce , But How could we pass files which will going to store in the attachment of that record? what should i do to accept that file in my class?
The above would generate the WSDL that would contain the blobl paramter as below:
<xsd:element name="body" type="xsd:base64Binary" nillable="true"/>
From PHP, you would then pass the base64 value of the file in the "body" attribute of the XML.
Let me know if this solves your problem. Don't forget to mark it solve to benefit others :)
Regards,
Varun.
All Answers
The above would generate the WSDL that would contain the blobl paramter as below:
<xsd:element name="body" type="xsd:base64Binary" nillable="true"/>
From PHP, you would then pass the base64 value of the file in the "body" attribute of the XML.
Let me know if this solves your problem. Don't forget to mark it solve to benefit others :)
Regards,
Varun.
Actually i have also created a class to create record for one object , after this whether i need to create another method to insert attachment for same record or in this same method i can manage.
Do you have any idea to implemet this logic in php (means wsdl to use in php files to call & push data)
global class WebServiceClass {
webService static String insertTestObjcet(String Name, String Phone,Date duedate){
Test__c t=new Test__c();
t.name=Name;
t.Phone__c=phone;
t.DueDate__c=duedat;
insert t;
return t.id
}
}
Thanks.