Before using SOAPUI I wrote a small test client of my own, and included a username and password in the definition of the client object;
$uname = \"ABCDE\";
$pword = \"12345\";
$client = new SoapClient('http://xyz/abcWSDL.wsdl',array('trace'=>1,'exceptions'=>1, 'login'=>$uname,'password'=>$pword));
then....
$res = $client->function($params);
Within the Server I was able to validate these values using;
$uname = \"ABCDE\";
$pword = \"12345\";
if(($_SERVER['PHP_AUTH_PW']!= $pword\n || $_SERVER['PHP_AUTH_USER'] != $uname)\n || !$_SERVER['PHP_AUTH_USER'])\n {\n header('WWW-Authenticate: Basic realm=\"Test auth\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Auth Failed';\n exit;\n}\t\t\t\t\t\t\t\t\t\t\t
Using SOAPUI I have set the Authorization to BASIC - together with a Username and Password, tried 'Pre-emptive auth' at both settings - but don't see the values in the SERVER object that is received, nor in the http Header.
Is there another setting somewhere in SOAP UI that will let me do what my own client code does?
Thanks in Advance
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"218","kudosSumWeight":0,"repliesCount":0,"postTime":"2020-01-03T08:59:24.335-08:00","lastPublishTime":"2020-01-03T08:59:24.335-08:00","metrics":{"__typename":"MessageMetrics","views":9903},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzEtZ3JyeWo3\"}":{"__typename":"AssociatedImage","url":"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzEtZ3JyeWo3","height":20,"width":20,"mimeType":"image/png"},"Rank:rank:31":{"__typename":"Rank","id":"rank:31","position":6,"name":"Champion Level 1","color":"00537C","icon":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzEtZ3JyeWo3\"}"},"rankStyle":"OUTLINE"},"User:user:21756":{"__typename":"User","id":"user:21756","uid":21756,"login":"AlexKaras","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2013-07-19T01:15:21.000-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/images/dS0yMTc1Ni00aTg4NzJBNDUwNjM4MzlDQkE"},"rank":{"__ref":"Rank:rank:31"},"entityType":"USER","eventPath":"community:nwkab66374/user:21756"},"ModerationData:moderation_data:195106":{"__typename":"ModerationData","id":"moderation_data:195106","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:195106":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:21756"},"id":"message:195106","entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:194860/message:195106","revisionNum":1,"uid":195106,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumTopicMessage:message:194860"},"conversation":{"__ref":"Conversation:conversation:194860"},"subject":"Re: SOAP UI - Basic Authentication - where do I find it in Server Code?","moderationData":{"__ref":"ModerationData:moderation_data:195106"},"body":"
Hi,
\n\n
Not sure if I got the question...
\nAuthentication is usually handled by web server itself and you, as a user (developer or regular one) should be either granted or denied access.
\nYou should be able to see login/password credentials in the request. For Basic Authentication they are passed in the request header, for SOAP, depending on the implementation, they can be passed in the Header section of SOAP Envelope (passed in the body of request).
\nDepending on the implementation, you might be able to get an access to the login credentials on the server side in tested application's code, but I am not sure why you would need this for tests.
\n\n
Could you provide more details about your test and what you'd like to be able to do?
\n","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"208","kudosSumWeight":0,"repliesCount":0,"postTime":"2019-12-23T03:30:48.088-08:00","lastPublishTime":"2019-12-23T03:30:48.088-08:00","metrics":{"__typename":"MessageMetrics","views":10189},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR\"}":{"__typename":"AssociatedImage","url":"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR","height":64,"width":64,"mimeType":"image/png"},"Rank:rank:29":{"__typename":"Rank","id":"rank:29","position":1,"name":"Alumni","color":"949494","icon":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR\"}"},"rankStyle":"OUTLINE"},"User:user:75488":{"__typename":"User","id":"user:75488","uid":75488,"login":"sonya_m","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2017-08-01T02:17:03.003-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/images/dS03NTQ4OC0xMjkzNWk1OTVFMTM2QUYyNkZDNkQ5"},"rank":{"__ref":"Rank:rank:29"},"entityType":"USER","eventPath":"community:nwkab66374/user:75488"},"ModerationData:moderation_data:195104":{"__typename":"ModerationData","id":"moderation_data:195104","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:195104":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:75488"},"id":"message:195104","entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:194860/message:195104","revisionNum":1,"uid":195104,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumTopicMessage:message:194860"},"conversation":{"__ref":"Conversation:conversation:194860"},"subject":"Re: SOAP UI - Basic Authentication - where do I find it in Server Code?","moderationData":{"__ref":"ModerationData:moderation_data:195104"},"body":"
Hi Community, can you please help PhilAJ52? avidCoder , nmrao , AlexKaras ?
\nThank you.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"106","kudosSumWeight":0,"repliesCount":0,"postTime":"2019-12-23T02:38:02.557-08:00","lastPublishTime":"2019-12-23T02:38:02.557-08:00","metrics":{"__typename":"MessageMetrics","views":10329},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"QueryVariables:MessageSolutions":{"__typename":"QueryVariables","id":"MessageSolutions","value":{"first":10,"constraints":{"topicId":{"eq":"message:194860"},"solution":{"eq":true}},"sorts":{"postTime":{"direction":"ASC"}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":false,"useBody":true,"useKudosCount":false,"useTimeToRead":false,"useMedia":true,"useRepliesCount":false,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":true,"useTags":false,"useUserHoverCard":false,"useNodeHoverCard":false,"usePreviewSubjectModal":false,"useMessageStatus":false}},"CachedAsset:text:en_US-components/messages/EscalatedMessageBanner-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/EscalatedMessageBanner-1749759144459","value":{"escalationMessage":"Escalated to Salesforce by {username} on {date}","viewDetails":"View Details","modalTitle":"Case Details","escalatedBy":"Escalated by: ","escalatedOn":"Escalated on: ","caseNumber":"Case Number: ","status":"Status: ","lastUpdateDate":"Last Update: ","automaticEscalation":"automatic escalation","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-components/users/UserLink-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/users/UserLink-1749759144459","value":{"authorName":"View Profile: {author}","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/users/UserRank-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserRank-1749759144459","value":{"rankName":"{rankName}","userRank":"Author rank {rankName}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageTime-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageTime-1749759144459","value":{"postTime":"Published: {time}","lastPublishTime":"Last Update: {time}","conversation.lastPostingActivityTime":"Last posting activity time: {time}","conversation.lastPostTime":"Last post time: {time}","moderationData.rejectTime":"Rejected time: {time}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolvedBadge-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolvedBadge-1749759144459","value":{"solved":"Solved"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSubject-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSubject-1749759144459","value":{"noSubject":"(no subject)"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageBody-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageBody-1749759144459","value":{"showMessageBody":"Show More","mentionsErrorTitle":"{mentionsType, select, board {Board} user {User} message {Message} other {}} No Longer Available","mentionsErrorMessage":"The {mentionsType} you are trying to view has been removed from the community.","videoProcessing":"Video is being processed. Please try again in a few minutes.","bannerTitle":"Video provider requires cookies to play the video. Accept to continue or {url} it directly on the provider's site.","buttonTitle":"Accept","urlText":"watch"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageCustomFields-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageCustomFields-1749759144459","value":{"CustomField.default.label":"Value of {name}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageReplyButton-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageReplyButton-1749759144459","value":{"repliesCount":"{count}","title":"Reply","title@board:BLOG@message:root":"Comment","title@board:TKB@message:root":"Comment","title@board:IDEA@message:root":"Comment","title@board:OCCASION@message:root":"Comment"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolutionList-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolutionList-1749759144459","value":{"emptyDescription":"No has been message solutions yet"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageListMenu-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageListMenu-1749759144459","value":{"postTimeAsc":"Oldest","postTimeDesc":"Newest","kudosSumWeightAsc":"Least Liked","kudosSumWeightDesc":"Most Liked","sortTitle":"Sort By","sortedBy.item":" { itemName, select, postTimeAsc {Oldest} postTimeDesc {Newest} kudosSumWeightAsc {Least Liked} kudosSumWeightDesc {Most Liked} other {}}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1749759144459","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/common/Pager/PagerLoadMore-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/common/Pager/PagerLoadMore-1749759144459","value":{"loadMore":"Show More"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageView/MessageViewInline-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageView/MessageViewInline-1749759144459","value":{"bylineAuthor":"{bylineAuthor}","bylineBoard":"{bylineBoard}","anonymous":"Anonymous","place":"Place {bylineBoard}","gotoParent":"Go to parent {name}"},"localOverride":false},"ForumReplyMessage:message:195326":{"__typename":"ForumReplyMessage","uid":195326,"id":"message:195326","entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:194860/message:195326","revisionNum":1,"author":{"__ref":"User:user:86954"},"readOnly":false},"ModerationData:moderation_data:195327":{"__typename":"ModerationData","id":"moderation_data:195327","status":"APPROVED","rejectReason":null},"AcceptedSolutionMessage:message:195327":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:87092"},"id":"message:195327","entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:194860/message:195327","revisionNum":1,"uid":195327,"depth":6,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumReplyMessage:message:195326"},"conversation":{"__ref":"Conversation:conversation:194860"},"subject":"Re: SOAP UI - Basic Authentication - where do I find it in Server Code?","moderationData":{"__ref":"ModerationData:moderation_data:195327"},"body":"I have to use a domain value, not sure if that matters for you. And you've tried \"Authenticate pre-emptively\" instead of \"Use global preference\"?
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"147","postTime":"2020-01-03T11:18:08.905-08:00","lastPublishTime":"2020-01-03T11:18:08.905-08:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":8364},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"customFields":[]},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1749759144459","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1749759144459","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/common/ExternalLinkWarningModal-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/common/ExternalLinkWarningModal-1749759144459","value":{"title":"Leaving the Community","description":"You're about to leave this site and navigate to an external domain. Are you sure you want to continue?","action.submit":"Continue","action.cancel":"Go Back"},"localOverride":false},"CachedAsset:text:en_US-components/tags/TagView/TagViewChip-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/tags/TagView/TagViewChip-1749759144459","value":{"tagLabelName":"Tag name {tagName}"},"localOverride":false}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"autoScroll":"true","topicRepliesSort":"postTimeDesc","boardId":"soapui_os","messageSubject":"soap-ui---basic-authentication---where-do-i-find-it-in-server-code","messageId":"194860"},"buildId":"3XH0qYWYCnEYycuN5W4S8","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"smartbear","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_messages_TopicWithThreadedReplyListWidget","components_messages_MessageListForNodeByRecentActivityWidget","components_messages_RelatedContentWidget","components_customComponent_CustomComponent","components_messages_MessageView_MessageViewStandard","components_messages_ThreadedReplyList","components_messages_EscalatedMessageBanner","shared_client_components_common_List_UnstyledList","components_messages_MessageView","shared_client_components_common_Pager_PagerLoadMore","components_messages_MessageView_MessageViewInline","components_customComponent_CustomComponentContent_TemplateContent","shared_client_components_common_List_UnwrappedList","components_tags_TagView","components_tags_TagView_TagViewChip"],"appGip":true,"scriptLoader":[]}