Please login or register to access secure site features.

Note: By continuing to use DevConnect Program Services you agree to our latest Registered Member Terms.

Sign in using DevConnect ID

Forgot password?

Trouble logging in?

Submit a ticket for Registration Support.

I have an SSO ID

?
sign in

Don't have a DevConnect or SSO ID ?

Create a DevConnect account or join the program.

register now
^
Forum Index » Web Services » AES SMS add AuthorizationCode   XML
 
Author Message
ThomasAndreasKocher



Joined: 19/10/2020 04:46:53
Messages: 5
Offline

AES SMS add AuthorizationCode mit submitRequest geeht nicht mehr ( gleich) win V71

Ich setzet folegnden Request ab


<submitRequestType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<modelFields>
<AuthorizationCode>
<Administered_Codes>3999993</Administered_Codes>
<Code>3999993</Code>
<COR>0</COR>
</AuthorizationCode>
</modelFields>
<operation>add</operation>
<objectname />
<qualifier>3999993</qualifier>
</submitRequestType>


Grht seit der Umstellung auf ACN8.1 genau gesagt R018x.01.0.890.0

Die Fehlermeldung ist


System.Exception
NmsModApiDotNet
System.Web.Services.Protocols.SoapException: Too few arguments to
function OSSIModel::submit(), 1 passed in
/opt/mvap/web/sms/include/AuthorizationCodeModel.class.php on line 174
and at least 2 expected
OuterXml:
Code: http://schemas.xmlsoap.org/soap/envelope/:Server

weiss jemand was fehlt
JohnBiggs



Joined: 20/06/2005 14:06:52
Messages: 862
Location: Thornton, CO
Offline

English translation.....
AES SMS add AuthorizationCode with submitRequest is no longer (same) win V71

I send the following request


<submitRequestType xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema">
<modelFields>
<AuthorizationCode>
<Administered_Codes> 3999993 </Administered_Codes>
<Code> 3999993 </Code>
<COR> 0 </COR>
</AuthorizationCode>
</modelFields>
<operation> add </operation>
<objectname />
<qualifier> 3999993 </qualifier>
</submitRequestType>


Since the changeover to ACN8.1, Grht has been R018x.01.0.890.0 to be precise

The error message is


System.Exception
NmsModApiDotNet
System.Web.Services.Protocols.SoapException: Too few arguments to
function OSSIModel :: submit (), 1 passed in
/opt/mvap/web/sms/include/AuthorizationCodeModel.class.php on line 174
and at least 2 expected
OuterXml:
Code: http://schemas.xmlsoap.org/soap/envelope/:Server

does someone know what's missing
[WWW]
JohnBiggs



Joined: 20/06/2005 14:06:52
Messages: 862
Location: Thornton, CO
Offline

I would start by utilizing the logging on AE Services and viewing the difference betwen a request handled successfully and one that your newer version of ACN8.1 is generating.

See this FAQ to enable SMS logging:
https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/support/faq/sms_web_services/index.gsp#40
[WWW]
ThomasAndreasKocher



Joined: 19/10/2020 04:46:53
Messages: 5
Offline

Thanks for the hint.

we truned on the loggs as in the FAQ link said.

But ther is a difference in tha mentioned authorizationCodeModelClass.php


function add( $qualifier )
{
// A safe way to add: use all 9's as the qualifier, and put the
new entry in slot 2
$key = substr( "9999999999", 0, strlen( $qualifier ) );

here comes the difference
V81: $this->m_form =new __AuthCodeFormModel( false );
V71: $this->m_form =& new __AuthCodeFormModel( false );

$this->m_form->set( "Code", 2, $this->get( "Code" ) );
$this->m_form->set( "COR", 2, $this->get( "COR" ) );
$result = $this->m_form->submit( "change authorization-code $key"
);
$this->m_lastError = $this->m_form->m_lastError;
return $result;
}

the sam chang is more often

so does sombody knows what we make wrong
 Filename ACM_71_AuthorizationCodeModel.class.php [Disk] Download
 Description acm 71 class
 Filesize 6 Kbytes
 Downloaded:  245 time(s)

 Filename ACM81_AuthorizationCodeModel.class.php [Disk] Download
 Description acm 81 class
 Filesize 6 Kbytes
 Downloaded:  237 time(s)

MichaelHerman2



Joined: 09/01/2014 12:11:50
Messages: 96
Offline

The "add" operation is no longer officially supported for "authorization-code". That is, you cannot issue an "add authorization-code" command directly from the CM SAT, and SMS is intended to extended a subset of the commands available from the SAT.

However, there is a known issue, and the issue you're seeing should be fixed in release 8.1.3.1. 8.1.3.1 is targeted to be available by the end of this month (February 2021)
ThomasAndreasKocher



Joined: 19/10/2020 04:46:53
Messages: 5
Offline

Thanks for the hint.

--However, there is a known issue, and the issue you're seeing should be fixed in release 8.1.3.1. 8.1.3.1 is targeted to be available by the --end of this month (February 2021)

do you know which issue this is an can i follow this issue some how

ThomasAndreasKocher



Joined: 19/10/2020 04:46:53
Messages: 5
Offline

The "add" operation is no longer officially supported for "authorization-code". That is, you cannot issue an "add authorization-code" command directly from the CM SAT, and SMS is intended to extended a subset of the commands available from the SAT.


wher di you see that it is no more supprted ?
MichaelHerman2



Joined: 09/01/2014 12:11:50
Messages: 96
Offline

By logging into the CM SAT and attempting "add authorization-code". As far as I know, that command doesn't exist/is not supported on the CM SAT any longer (I tested on R8). SMS supports a subset of the commands that are supported via the CM SAT.
ThomasAndreasKocher



Joined: 19/10/2020 04:46:53
Messages: 5
Offline

i know that on the CM SAT Terminal there is only the change authorization-code wich is working properly the AE Webservice uses for adding a new authorization-code the change from the SAT CM Terminal you cen see that at the AuthorizationCodeModel.class.php file

Which is also attached to this Issue


<?php

require_once "OSSIModel.class.php" ;


class __AuthCodeFormModel extends OSSIModel
{

function __AuthCodeFormModel( $asList=false )
{
Message::Trace("Internal __AuthCodeFormModel CTOR");
parent::OSSIModel( "authorization-code", $asList );
$this->_initSchema();
}

function operations() { return array( "list", "display", "change" ); }

// Convert attribute label to attribute name.
// Replace spaces and dashes with underscores, and strip off period (.), colon(:) and
// question mark (?)
function _initSchema()
{
// The code-count field only applies to display, not list
if ( ! $this->isList() )
$this->_makeField( 0x0004ff00, 1, 7, 1, "Administered Codes", "", "Read-Only" );
$this->_makeField( 0x0001ff00, 255, 7, 1, "Code", "" );
// The COR fid is different in the list operation than for the display/change operations!
$corFid = ( $this->isList() ? 0x0002ff00 : 0x802bff00 );
$this->_makeField( $corFid, 255, 1, 1, "COR", "" );
}

}

// The interface wrapper class
// TODO: In future, shouldn't have to be OSSIModel-derived, but for now, this is the only
// way it's seen as accessible to SMS.
class AuthorizationCodeModel extends OSSIModel
{

var $m_form;
var $m_bNotFoundError = false;
function AuthorizationCodeModel( $asList=false )
{
Message::Trace("AuthorizationCode Model CTOR");
parent::OSSIModel( "authorization-code", $asList ); // Never seen by OSSI

// Note: we defer instantiation of the form model until the operation is known!
$this->m_form =new __AuthCodeFormModel();
$this->_initSchema();
}

function operations() { return array( "list", "display", "add", "change", "remove" ); }

function _initSchema()
{
// Note: FIDs below aren't actually used -- the ones in the form model are!
// And we treat these like scalars!
$this->_makeField( 0x0004ff00, 1, 7, 1, "Administered Codes", "", "Read-Only" );
$this->_makeField( 0x0001ff00, 1, 7, 1, "Code", "" );
$this->_makeField( 0x0002ff00, 1, 1, 1, "COR", "" );
}

// OPERATION OVERRIDES

// List operation
function query( $aParams = null, $fields=null, $cmdName="list" )
{
// This is a pass-thru to the form model
$this->m_form =new __AuthCodeFormModel( true ); // true == create as list model
$result = $this->m_form->query( $aParams, $fields, $cmdName );
// This model results now should reference the form model
$this->m_data =& $this->m_form->m_data;
$this->m_lastError =& $this->m_form->m_lastError;
return $result;
}

// Display operation
function retrieve( $qualifier, $fields=null, $cmdName="display" )
{
$this->m_form =new __AuthCodeFormModel( false ); // true == create as scalar model
$result = $this->m_form->retrieve( $qualifier, "*", $cmdName );
// MUST now check -- did we retrieve the requested qualifier?
if ( $result )
{
if ( $this->m_form->get( "Code", 1 ) != $qualifier )
{
$this->m_lastError = array( "1 00000000 0000 Authorization Code \"$qualifier\" not found." );
$this->m_bNotFoundError = true;
$result = false;
}
else
{
// That's the one. Assign our fields as scalars
$this->set( "Code", $qualifier );
$this->set( "COR", $this->m_form->get( "COR", 1 ) );
}
}
else
{
$this->m_lastError = $this->m_form->m_lastError;
}
return $result;
}

// add, change, remove
function submit( $cmd, $keyfield, $fields=null )
{
// The first word identifies the command. the second word will be the qualifier
list( $op, $obj, $qualifier, $rest ) = explode( " ", $cmd, 4 );
// The only field of consequence is COR.
// The fields-parameter parsing algorithm in the "submit" operation should be generalized for use
// here. For now, do parsing specific to this operation:

// Save Code, COR before attempting display
$COR = $this->get( "COR" );
$code = $this->get( "Code" );
if ( ! isset( $code ) ) $code = $qualifier;

$bExists = true; // assume qualifier exists until...
$retrieveOk = $this->retrieve( $qualifier );
if ( ! $retrieveOk )
{
if ( $this->m_bNotFoundError )
{
$bExists = false; // ok, retrieve didn't find the code
}
else
{
return false; // another blocking error occurred, lastError contains the explanation
}
}

// Restore COR, Code
$this->set( "Code", $code );
$this->set( "COR", $COR );

// For Add, Change note that this usage means you could change the code from that specified
// by the qualifier, assuming this is valid on the switch
switch( $op )
{
case 'add':
if ( ! $bExists )
{
return $this->add( $qualifier );
}
// Otherwise, it's an error
$this->m_lastError = array( "1 00000000 0000 Code $qualifier already exists. Unable to add." );
break;
case 'remove':
// Remove means we blank Code and COR
$this->set( "Code", " " );
$this->set( "COR", " " );
// fall through to change...
case 'change':
if ( $bExists )
return $this->change( $qualifier );
// But if it wasn't found, then that's an error, lastError is already set.
break;
default:
$this->m_lastError = array( "1 00000000 0000 Invalid Operation \"$op\"" );
}
Message::Trace( "Ok, we're returning without executing!" );
return false; // if any chance of success, we already returned above.
}


function add( $qualifier )
{
// A safe way to add: use all 9's as the qualifier, and put the new entry in slot 2
$key = substr( "9999999999", 0, strlen( $qualifier ) );
$this->m_form =new __AuthCodeFormModel( false );
$this->m_form->set( "Code", 2, $this->get( "Code" ) );
$this->m_form->set( "COR", 2, $this->get( "COR" ) );
$result = $this->m_form->submit( "change authorization-code $key" );
$this->m_lastError = $this->m_form->m_lastError;
return $result;
}

function change( $qualifier )
{
$this->m_form =new __AuthCodeFormModel( false );
$this->m_form->set( "Code", 1, $this->get( "Code" ) );
$this->m_form->set( "COR", 1, $this->get( "COR" ) );
$result = $this->m_form->submit( "change authorization-code $qualifier" );
$this->m_lastError = $this->m_form->m_lastError;
return $result;
}

}

?>


the funktion add call there the change on the SAT Terminal

$result = $this->m_form->submit( "change authorization-code $key" );

as much as i know has there is no add off the authorization code at leats since Version 6.3



This message was edited 1 time. Last update was at 05/02/2021 12:50:41

 
 
Go to: