+ Start a Discussion
Ken Koellner 7Ken Koellner 7 

Where are PartnerConnection and Connector classes

I'm trying to build a simple java client program using the partner WSDL. I built stubs from the Partner WSDL file. I downloaded the WSC .jar file and added it to my build path. I'm still getting Connector cannot be resolved and PartnerConnection cannot be resolved.  I would have thought they were in the Partner WSDL file but I don't see them there.

Anyone know where I should go for those or why I don't have them in my project when I have the stubs from the partner WSDL and the force-wsc-44.0.0.jar?
 
import com.sforce.soap.partner.*;
import com.sforce.soap.partner.sobject.*;
import com.sforce.ws.*;
import com.sforce.ws.ConnectorConfig;

class SalesforceHelper {

    public SalesforceHelper () {

        ConnectorConfig config = new ConnectorConfig();
        config.setUsername("username");
        config.setPassword("password");

        PartnerConnection connection = Connector.newConnection(config);
    }

}

 
Raj VakatiRaj Vakati
Can you please give me the list of jars you are using .. you need to wsc jar and partner jar ...  and make sure those are in class path 
Ken Koellner 7Ken Koellner 7
I have the classes in my project that were generated from the Partner WSDL.   They are listed below.  I have  force-wsc-44.0.0.jar in my build path but that doesn't have them either. Content pasted below.
 
ActionOverride.java
AdditionalInformationMap.java
Address.java
AllOrNoneHeader.java
AllowFieldTruncationHeader.java
AnalyticsCloudComponent.java
AppMenuType.java
Article.java
AssignmentRuleHeader.java
AttachmentRetrievalOption.java
CallOptions.java
Canvas.java
CaseType.java
ChangeEventHeader.java
ChangeEventType.java
ChangeOwnPassword.java
ChangeOwnPasswordResponse.java
ChangeOwnPasswordResult.java
ChildRelationship.java
CustomLinkComponent.java
DataCategory.java
DataCategoryGroupSobjectTypePair.java
DebuggingHeader.java
DebuggingInfo.java
DebugLevel.java
DeleteByExampleResult.java
DeletedRecord.java
DeleteResult.java
DescribeAllTabs.java
DescribeAppMenu.java
DescribeAppMenuItem.java
DescribeAppMenuResponse.java
DescribeApprovalLayout.java
DescribeApprovalLayoutResponse.java
DescribeApprovalLayoutType1.java
DescribeAvailableQuickActionResult.java
DescribeAvailableQuickActions.java
DescribeColor.java
DescribeColumn.java
DescribeCompactLayout.java
DescribeCompactLayouts.java
DescribeCompactLayoutsResponse.java
DescribeCompactLayoutsResult.java
DescribeDataCategoryGroupResult.java
DescribeDataCategoryGroupStructureResult.java
DescribeDataCategoryGroupStructures.java
DescribeGlobal.java
DescribeGlobalResponse.java
DescribeGlobalResult.java
DescribeGlobalSObjectResult.java
DescribeGlobalTheme.java
DescribeGlobalThemeResponse.java
DescribeGlobalThemeType0.java
DescribeIcon.java
DescribeKnowledgeSettings.java
DescribeKnowledgeSettingsResponse.java
DescribeLayout.java
DescribeLayoutButton.java
DescribeLayoutComponent.java
DescribeLayoutFeedFilter.java
DescribeLayoutItem.java
DescribeLayoutResponse.java
DescribeLayoutResult.java
DescribeLayoutRow.java
DescribeLayoutSaveOption.java
DescribeLayoutSection.java
DescribeLayoutType2.java
DescribeNounResult.java
DescribeNouns.java
DescribePathAssistant.java
DescribePathAssistantField.java
DescribePathAssistants.java
DescribePathAssistantsResponse.java
DescribePathAssistantStep.java
DescribeQuickActionDefaultValue.java
DescribeQuickActionListItemResult.java
DescribeQuickActionResult.java
DescribeQuickActionsForRecordType.java
DescribeRelatedContentItem.java
DescribeSearchableEntities.java
DescribeSearchableEntityResult.java
DescribeSearchLayoutResult.java
DescribeSearchScopeOrder.java
DescribeSearchScopeOrderResult.java
DescribeSObject.java
DescribeSObjectListViews.java
DescribeSObjectListViewsResponse.java
DescribeSObjectResponse.java
DescribeSObjectResult.java
DescribeSoftphoneLayout.java
DescribeSoftphoneLayoutCallType.java
DescribeSoftphoneLayoutInfoField.java
DescribeSoftphoneLayoutItem.java
DescribeSoftphoneLayoutResponse.java
DescribeSoftphoneLayoutResult.java
DescribeSoftphoneLayoutSection.java
DescribeSoftphoneScreenPopOption.java
DescribeSoqlListView.java
DescribeSoqlListViewParams.java
DescribeSoqlListViews.java
DescribeSoqlListViewsResponse.java
DescribeTab.java
DescribeTabs.java
DescribeTabSetResult.java
DescribeThemeItem.java
DescribeThemeResponse.java
DescribeVisualForce.java
DescribeVisualForceResponse.java
DescribeVisualForceResult.java
DifferenceType.java
DisableFeedTrackingHeader.java
DuplicateError.java
DuplicateResult.java
DuplicateRuleHeader.java
Email.java
EmailFileAttachment.java
EmailHeader.java
EmailPriority.java
EmptyRecycleBinResult.java
EntitySearchMetadata.java
EntitySearchPromotionMetadata.java
EntitySpellCorrectionMetadata.java
Error.java
ExecuteListView.java
ExecuteListViewRequest.java
ExecuteListViewResponse.java
ExecuteListViewResult.java
ExtendedErrorCode.java
ExtendedErrorDetails.java
FeedLayoutFilterType.java
Field.java
FieldComponent.java
FieldDiff.java
FieldLayoutComponent.java
FieldLevelSearchMetadata.java
FieldType.java
FilteredLookupInfo.java
FindDuplicatesResult.java
Gender.java
GetDeleted.java
GetDeletedResponse.java
GetDeletedResult.java
GetServerTimestamp.java
GetServerTimestampResponse.java
GetServerTimestampResult.java
GetUpdated.java
GetUpdatedResponse.java
GetUpdatedResult.java
GetUserInfo.java
GetUserInfoResponse.java
GetUserInfoResult.java
GrammaticalNumber.java
InvalidateSessionsResult.java
KnowledgeLanguageItem.java
KnowledgeSettings.java
LabelsSearchMetadata.java
LayoutComponentType.java
LeadConvert.java
LeadConvertResult.java
LimitInfo.java
ListViewColumn.java
ListViewIsSoqlCompatible.java
ListViewOrderBy.java
ListViewRecordColumn.java
LocaleOptions.java
Location.java
LogCategory.java
LogCategoryLevel.java
Login.java
LogInfo.java
LoginResponse.java
LoginResult.java
LoginScopeHeader.java
Logout.java
LogoutResponse.java
MassEmailMessage.java
MatchRecord.java
MatchResult.java
MergeRequest.java
MergeResult.java
MruHeader.java
NameCaseValue.java
NamedLayoutInfo.java
NameObjectValuePair.java
NameValuePair.java
OrderByDirection.java
OrderByNullsPosition.java
OwnerChangeOption.java
OwnerChangeOptionType.java
PackageVersion.java
PerformQuickActionRequest.java
PerformQuickActionResult.java
PicklistEntry.java
PicklistForRecordType.java
Possessive.java
ProcessRequest.java
ProcessResult.java
ProcessSubmitRequest.java
ProcessWorkitemRequest.java
Query.java
QueryAll.java
QueryAllResponse.java
QueryMore.java
QueryMoreResponse.java
QueryOptions.java
QueryResponse.java
QueryResult.java
QuickActionTemplateResult.java
RecordTypeCompactLayoutMapping.java
RecordTypeInfo.java
RecordTypeMapping.java
RelatedList.java
RelatedListColumn.java
RelatedListSort.java
RenderEmailTemplateBodyResult.java
RenderEmailTemplateError.java
RenderEmailTemplateRequest.java
RenderEmailTemplateResult.java
RenderStoredEmailTemplate.java
RenderStoredEmailTemplateRequest.java
RenderStoredEmailTemplateResponse.java
RenderStoredEmailTemplateResult.java
ReportChartComponent.java
ReportChartSize.java
ResetPassword.java
ResetPasswordResponse.java
ResetPasswordResult.java
Retrieve.java
RetrieveMassQuickActionTemplates.java
RetrieveQuickActionTemplates.java
SaveResult.java
ScopeInfo.java
Search.java
SearchLayoutButton.java
SearchLayoutButtonsDisplayed.java
SearchLayoutField.java
SearchLayoutFieldsDisplayed.java
SearchRecord.java
SearchRecordMetadata.java
SearchResponse.java
SearchResult.java
SearchResultsMetadata.java
SearchSnippet.java
SendEmailError.java
SendEmailOptOutPolicy.java
SendEmailResult.java
SessionHeader.java
SetPassword.java
SetPasswordResponse.java
SetPasswordResult.java
SforceService.java
SforceServiceLocator.java
ShareAccessLevel.java
SingleEmailMessage.java
Soap.java
SoapBindingStub.java
SoapProxy.java
SoapType.java
SoqlCondition.java
SoqlConditionGroup.java
SoqlConjunction.java
SoqlNotCondition.java
SoqlOperator.java
SoqlSubQueryCondition.java
SoqlWhereCondition.java
StartsWith.java
StatusCode.java
StreamingEnabledHeader.java
TabOrderType.java
UndeleteResult.java
Upsert.java
UpsertResult.java
UserTerritoryDeleteHeader.java
VisualforcePage.java
WebLinkPosition.java
WebLinkType.java
WebLinkWindowType.java
 
$ jar -tf force-wsc-44.0.0.jar 
META-INF/
META-INF/MANIFEST.MF
com/
com/sforce/
com/sforce/bulk/
com/sforce/async/
com/sforce/ws/
com/sforce/ws/tools/
com/sforce/ws/types/
com/sforce/ws/transport/
com/sforce/ws/util/
com/sforce/ws/parser/
com/sforce/ws/codegen/
com/sforce/ws/codegen/templates/
com/sforce/ws/codegen/metadata/
com/sforce/ws/wsdl/
com/sforce/ws/bind/
LICENSE.md
com/sforce/bulk/CsvWriter.class
com/sforce/bulk/UpdateStream.class
com/sforce/bulk/UpdateResult.class
com/sforce/bulk/UpdateResultStream.class
com/sforce/bulk/LoginHelper.class
com/sforce/bulk/StreamException.class
com/sforce/bulk/StreamHandler.class
com/sforce/async/QueryResultList.class
com/sforce/async/AsyncExceptionCode.class
com/sforce/async/StatusCode.class
com/sforce/async/SObject.class
com/sforce/async/ConcurrencyMode.class
com/sforce/async/Error.class
com/sforce/async/CsvBatchRequest.class
com/sforce/async/Result.class
com/sforce/async/BatchStateEnum.class
com/sforce/async/JobInfo.class
com/sforce/async/JobStateEnum.class
com/sforce/async/BatchRequest.class
com/sforce/async/OperationEnum.class
com/sforce/async/AsyncApiException.class
com/sforce/async/TransformationSpecRequest.class
com/sforce/async/BatchResult.class
com/sforce/async/BatchInfo.class
com/sforce/async/ContentType.class
com/sforce/async/BulkConnection.class
com/sforce/async/BulkConnection$1.class
com/sforce/async/CSVReader.class
com/sforce/async/BatchInfoList.class
com/sforce/async/AsyncXmlOutputStream.class
com/sforce/async/CSVReader$CSVParseException.class
com/sforce/async/JobInfo$Builder.class
com/sforce/ws/MessageHandler.class
com/sforce/ws/tools/PostMain$1.class
com/sforce/ws/tools/PostMain.class
com/sforce/ws/tools/WsdlcIterator$1.class
com/sforce/ws/tools/ToolsException.class
com/sforce/ws/tools/wsdlc.class
com/sforce/ws/tools/VersionInfo.class
com/sforce/ws/tools/WsdlcIterator.class
com/sforce/ws/types/Time.class
com/sforce/ws/transport/Transport.class
com/sforce/ws/transport/LimitingInputStream.class
com/sforce/ws/transport/MessageHandlerOutputStream.class
com/sforce/ws/transport/JdkHttpTransport.class
com/sforce/ws/transport/SoapConnection.class
com/sforce/ws/transport/LimitingOutputStream.class
com/sforce/ws/transport/SoapConnection$SessionTimedOutException.class
com/sforce/ws/transport/TransportFactory.class
com/sforce/ws/transport/SoapConnection$1.class
com/sforce/ws/transport/GaeHttpTransport.class
com/sforce/ws/util/Base64.class
com/sforce/ws/util/FileUtil.class
com/sforce/ws/util/Verbose.class
com/sforce/ws/ConnectionException.class
com/sforce/ws/MessageHandlerWithHeaders.class
com/sforce/ws/runtime-classes.txt
com/sforce/ws/SessionRenewer.class
com/sforce/ws/parser/MXSerializer.class
com/sforce/ws/parser/XmlPullParserException.class
com/sforce/ws/parser/MXParser.class
com/sforce/ws/parser/PullParserException.class
com/sforce/ws/parser/XmlInputStream.class
com/sforce/ws/parser/XmlPullParser.class
com/sforce/ws/parser/XmlOutputStream.class
com/sforce/ws/codegen/FactoryMetadataConstructor.class
com/sforce/ws/codegen/Generator.class
com/sforce/ws/codegen/TypeMetadataConstructor$JavaType.class
com/sforce/ws/codegen/Compiler.class
com/sforce/ws/codegen/TypeMetadataConstructor$1.class
com/sforce/ws/codegen/TypeMetadataConstructor.class
com/sforce/ws/codegen/TypeMetadataConstructor$JavaTypeMap.class
com/sforce/ws/codegen/ConnectionMetadataConstructor$ArgListTypesToGenerate.class
com/sforce/ws/codegen/templates/connection.st
com/sforce/ws/codegen/templates/connector.st
com/sforce/ws/codegen/templates/simpleType.st
com/sforce/ws/codegen/templates/iconnectionWrapper.st
com/sforce/ws/codegen/templates/iExtendedErrorDetails.st
com/sforce/ws/codegen/templates/sobject.st
com/sforce/ws/codegen/templates/isobject.st
com/sforce/ws/codegen/templates/typeinterface.st
com/sforce/ws/codegen/templates/factory.st
com/sforce/ws/codegen/templates/ifactory.st
com/sforce/ws/codegen/templates/type.st
com/sforce/ws/codegen/templates/connectionWrapper.st
com/sforce/ws/codegen/templates/aggregateResult.st
com/sforce/ws/codegen/templates/extendedErrorDetails.st
com/sforce/ws/codegen/ConnectionMetadataConstructor.class
com/sforce/ws/codegen/metadata/FactoryClassMetadata.class
com/sforce/ws/codegen/metadata/ConnectionWrapperClassMetadata.class
com/sforce/ws/codegen/metadata/SimpleClassMetadata$EnumAndValue.class
com/sforce/ws/codegen/metadata/OperationMetadata.class
com/sforce/ws/codegen/metadata/MemberMetadata.class
com/sforce/ws/codegen/metadata/SimpleClassMetadata.class
com/sforce/ws/codegen/metadata/HeaderMetadata$HeaderElementMetadata.class
com/sforce/ws/codegen/metadata/ClassMetadata.class
com/sforce/ws/codegen/metadata/ComplexClassMetadata.class
com/sforce/ws/codegen/metadata/ConnectorMetadata.class
com/sforce/ws/codegen/metadata/ElementMetadata.class
com/sforce/ws/codegen/metadata/ConnectionClassMetadata.class
com/sforce/ws/codegen/metadata/HeaderMetadata.class
com/sforce/ws/ConnectorConfig$1.class
com/sforce/ws/wsdl/Restriction.class
com/sforce/ws/wsdl/WsdlParseException.class
com/sforce/ws/wsdl/SimpleType.class
com/sforce/ws/wsdl/Binding.class
com/sforce/ws/wsdl/Constants.class
com/sforce/ws/wsdl/BindingMessage.class
com/sforce/ws/wsdl/Service.class
com/sforce/ws/wsdl/Definitions.class
com/sforce/ws/wsdl/PortType.class
com/sforce/ws/wsdl/Port.class
com/sforce/ws/wsdl/Documentation.class
com/sforce/ws/wsdl/Collection.class
com/sforce/ws/wsdl/Message.class
com/sforce/ws/wsdl/ParserUtil.class
com/sforce/ws/wsdl/Operation$MessageRef.class
com/sforce/ws/wsdl/SoapAddress.class
com/sforce/ws/wsdl/Enumeration.class
com/sforce/ws/wsdl/Element.class
com/sforce/ws/wsdl/SoapHeader.class
com/sforce/ws/wsdl/Schema.class
com/sforce/ws/wsdl/Part.class
com/sforce/ws/wsdl/WsdlParser.class
com/sforce/ws/wsdl/ComplexType.class
com/sforce/ws/wsdl/Main.class
com/sforce/ws/wsdl/WsdlNode.class
com/sforce/ws/wsdl/Attribute.class
com/sforce/ws/wsdl/Operation.class
com/sforce/ws/wsdl/Annotation.class
com/sforce/ws/wsdl/PortType$MessageRef.class
com/sforce/ws/wsdl/SoapNode.class
com/sforce/ws/wsdl/SoapBody.class
com/sforce/ws/wsdl/WsdlFactory.class
com/sforce/ws/wsdl/BindingOperation.class
com/sforce/ws/wsdl/SfdcApiType.class
com/sforce/ws/wsdl/Types.class
com/sforce/ws/ConnectorConfig$TeeInputStream.class
com/sforce/ws/bind/TypeMapper$PartialArrayException.class
com/sforce/ws/bind/TypeInfo.class
com/sforce/ws/bind/XMLizable.class
com/sforce/ws/bind/XmlObject.class
com/sforce/ws/bind/CalendarCodec.class
com/sforce/ws/bind/NameMapper.class
com/sforce/ws/bind/SoapHeaderObject.class
com/sforce/ws/bind/XmlTypeInfoProvider.class
com/sforce/ws/bind/XmlObjectWrapper.class
com/sforce/ws/bind/TypeMapper.class
com/sforce/ws/bind/DateCodec.class
com/sforce/ws/SessionRenewer$SessionRenewalHeader.class
com/sforce/ws/ConnectorConfig$TeeOutputStream.class
com/sforce/ws/SoapFaultException.class
com/sforce/ws/ConnectorConfig.class
META-INF/maven/
META-INF/maven/com.force.api/
META-INF/maven/com.force.api/force-wsc/
META-INF/maven/com.force.api/force-wsc/pom.xml
META-INF/maven/com.force.api/force-wsc/pom.properties

 
Justin Jones 35Justin Jones 35
I have the partner classes generated from the Partner WSDL.  But the partner WDSL doesn't have Connector or PartnerConnection in it.

I have the force-wsc-44.0.0.jar in my build path.  But I did a "jar -tf" on that to see what is in it and it doesn't have those either.

Are Connector and PartnerConnection supposed to come from the Partner WSDL?  Or are they in a separate jar I'm supposed to get from somehwere?

https://ifacetimeapp.com/