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
test777test777 

calling(enterprise edition) webservice class(method) into java class

Hi All,

     i need to call webservice method of enterprise edition in java class.i  wrote like this for stub.

Here Dss is the webservice class name of Enterprise edition.

 

import com.sforce.soap.schemas._class.Dss.DssBindingStub;
import com.sforce.soap.schemas._class.Dss.DssServiceLocator;

 

Function like this

private void method123()

{

DssBindingStub accountBindingStub=null;

accountBindingStub=(DssBindingStub) new DssServiceLocator().getDss();

accountBindingStub.setHeader(new DssServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader",new SessionHeader(connection.getConfig().getSessionId()));
String p="<?xml version='1.0' encoding='UTF-8'?>"+
"<OrderStatusNotification xmlns='http://www.hns.com/iag/schemas/partner'>"+
"<MessageHeader>"+
"<TransactionDateTime>11/01/2011 10:21:20</TransactionDateTime>"+
"<TransactionCode>CON</TransactionCode>"+
"<TransactionSequenceId>DSS115825734</TransactionSequenceId>"+
"</MessageHeader>"+
"<SAN>DNYPP002</SAN>"+
"<OrderId>2990077</OrderId>"+
"<FSOId>3438998</FSOId>"+
"<CONCode>0</CONCode>"+
"<ConMessage>Order accepted, SAN assigned, Field Service Order created, Distributor assigned. Installation not scheduled. Order modification allowed.</ConMessage>"+
"<Name>"+
"<FirstName>Parul</FirstName>"+
"<LastName>Goel</LastName>"+
"</Name>"+
"<InstallAddress>"+
"<StreetAddress1>1400 Spring Garden Street</StreetAddress1>"+
"<StreetAddress2>String</StreetAddress2>"+
"<City>Greensboro</City>"+
"<State>NC</State>"+
"<PostalCode>27412</PostalCode>"+
"<CountryCode>US</CountryCode>"+
"</InstallAddress>"+
"</OrderStatusNotification>";

String s=accountBindingStub.notification(p);

System.out.println('-----------'+s);

}

 

Here notification is the metod which is in the Dss class of enterprise edition.

 

And for this i generate  jar files using wsc-20.jar(dss.jar,enterprise.jar,metadata.jar).All thes jar files are added under the java projece.But i got a message like 

import com.sforce.soap.schemas._class.Dss.DssBindingStub;
import com.sforce.soap.schemas._class.Dss.DssServiceLocator; packages are not resolved.

Any one can u help me this .

 

 

 

 

Thanks in advance.