Occasional Contributor II
Posts: 10
Registered: ‎04-01-2013

ClearPass Guest SOAP interface



I'm trying to use the ClearPass SOAP interface but am running into a few issues.


I am coding in VB.NET and have imported the Service Referance from my ClearPass Guest as


I am able to use the Referance in my VB project and followed the guide to setting up a basic command.  Using Ping as an example i am getting an error complaining about "GET" used instead of "POST".  


Does anyone have any ideas?


VB Code


  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click



        Dim client AsGuestManagerWebServiceClient = NewGuestManagerWebServiceClient

        client.ClientCredentials.UserName.UserName = "CaptivePortal"

        client.ClientCredentials.UserName.Password = "xxx"



        Dim PingRequest As New EmptyType()

        Dim PingResponse As New ResultType()

        ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf CertificateValidationCallBack)

        PingResponse = client.Ping(PingRequest)





    Function CertificateValidationCallBack( _

ByVal sender AsObject, _

ByVal certificate As X509Certificate, _

ByVal chain As X509Chain, _

ByVal sslPolicyErrors As SslPolicyErrors _

) AsBoolean







<?xml version="1.0" encoding="utf-8" ?>



        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />





              <binding name="GuestManagerSoapBinding" closeTimeout="00:01:00"

                       openTimeout="00:01:00" receiveTimeout="00:10:00"


                       allowCookies="false" bypassProxyOnLocal="false"


                       maxBufferSize="65536" maxBufferPoolSize="534288"

                       messageEncoding="Text" textEncoding="utf-8"



                <security mode="TransportCredentialOnly">

                  <transport clientCredentialType="Basic"


                             realm="" />

                  <message clientCredentialType="UserName" algorithmSuite="Default" />




                <binding name="GuestManagerSoapBinding1" />




            <endpoint address=""

                binding="basicHttpBinding" bindingConfiguration="GuestManagerSoapBinding"

                contract="GuestManager.GuestManagerWebService" name="GuestManagerWebServicePort" />





Error on ClearPass Guest is:


Invalid SOAP request: HTTP method 'GET' is not POST
Script:    /guest/soap_service.php
Function:  NwaSoapServiceMain
Arguments: array (
  'soap_action' => '',
Details:   array (
  'headers' => array (
    'CONTENT_TYPE' => 'text/xml; charset=utf-8',
    'HTTPS' => 'on',
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
    'HTTP_CONNECTION' => 'Keep-Alive',
    'HTTP_HOST' => '',
    'HTTP_SOAPACTION' => '',
    'HTTP_USER_AGENT' => '',
    'HTTP_VSDEBUGGERCAUSALITYDATA' => 'uIDPo+RJgjmioWlGhettZ7ao/0QAAAAAaKv3ioWXQ0KCdRf4d8032IGcwbYuOQxFuyE8923pqb0ACQAA',
    'PHP_SELF' => '/guest/soap_service.php',
    'QUERY_STRING' => '',
    'REMOTE_ADDR' => '',
    'REMOTE_PORT' => '51038',
    'REQUEST_TIME' => 1383766304,


Does anyone have any ideas?




Posts: 765
Registered: ‎03-25-2009

Re: ClearPass Guest SOAP interface

Did you ever get this issue fixed Eric?

Koen (ACMX #351 | ACDX #547 | ACCP)

-- Found something helpful, important, or cool? Click the Kudos Star in a post.
-- Problem Solved? Click "Accept as Solution" in a post.
Contributor I
Posts: 29
Registered: ‎08-02-2013

Re: ClearPass Guest SOAP interface

Hi, noticed this post and have a similar problem (?). I just dipping my toes in the water here and my code is not half as fancy as the sample above - I'm using powershell. However, I end up with the same error message "Invalid SOAP request: HTTP method 'GET' is not POST" . If someone can spot my (obvious) mistake, I would really appreciate your input!




$user = "user"
$pass = "password"
$pair = "$($user):$($pass)"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$basicAuthValue = "Basic $base64"
$headers = @{ Authorization = $basicAuthValue }

Invoke-WebRequest "http://server_ip/guest/soap_guestmanager.php" -Headers $headers -ContentType "text/xml" -InFile C:\Temp\xmlin.txt -OutFile c:\Temp\xmlout.txt -Method Post

Search Airheads
Showing results for 
Search instead for 
Did you mean: