I know that there are REST APIs for OpenAM for some functions like self service, authentication etc.., But I'm not able to find the right apis for adding remote identity provider etc..,
Either I'm missing something or there is no such REST apis for OpenAM due to some reason. The reason could be they are not planning on it, or it's not yet there in the current release.
Is there any way I can register the SAML IDPs in OpenAM without using OpenAM admin console or ssoadm command?
Pointers to the right code components will also be much appreciated.
In Access Manager 5 (OpenAM 14) you can manage SAML entities using the REST APIs. To create a new hosted SAMLv2 IdP you will need something like this:
curl -X POST \
'http://idp.example.com:8080/openam/json/realm-config/federation/entityproviders/saml2?_action=create' \
-H 'content-type: application/json' \
-H 'iplanetdirectorypro: <ADMIN_SESSION_ID>' \
-d '{
"_id": "http://idp.example.com:8080/openam",
"metadata": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<EntityDescriptor entityID=\"http://idp.example.com:8080/openam\" xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\">\n <IDPSSODescriptor WantAuthnRequestsSigned=\"false\" protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\">\n <KeyDescriptor use=\"signing\">\n <ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\n <ds:X509Data>\n <ds:X509Certificate>MIIDaDCCAlCgAwIBAgIDcB/YMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVLMRAwDgYDVQQIEwdCcmlzdG9sMRAwDgYDVQQHEwdCcmlzdG9sMRIwEAYDVQQKEwlGb3JnZVJvY2sxDzANBgNVBAsTBk9wZW5BTTENMAsGA1UEAxMEdGVzdDAeFw0xNjAzMTgxMTU2MjhaFw0yNjAzMTYxMTU2MjhaMGUxCzAJBgNVBAYTAlVLMRAwDgYDVQQIEwdCcmlzdG9sMRAwDgYDVQQHEwdCcmlzdG9sMRIwEAYDVQQKEwlGb3JnZVJvY2sxDzANBgNVBAsTBk9wZW5BTTENMAsGA1UEAxMEdGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKNbl89eP6B8kZATNSPe3+OZ3esLx31hjX+dakHtPwXCAaCKqJFwjwKdxyRuPdsVG+8Dbk3PGhk26aJrSE93EpxeqmQqxNPMeD+N0/8pjkuVYWwPIQ/ts2iTiWOVn7wzlE4ASfvupqOR5pjuYMWNo/pd4L7QNjUCKoAt9H11HMyiP+6roo/EYgX4AH7OAhfUMncYsopWhkW/ze9z8wTXc8BAEgDmt8zFCez1CtqJB/MlSBUGDgk8oHYDsHKmx05baBaOBQ8LRGP5SULSbRtu34eLFootBIn0FvUZSnwTiSpbaHHRgWrMOVm07oSLWBuO3h/bj38zBuuqqVsAK8YuyoECAwEAAaMhMB8wHQYDVR0OBBYEFHxfAbr6PQ5Xgc+jVx+AGTPnnpWZMA0GCSqGSIb3DQEBCwUAA4IBAQAZBMJ29/2idv1ztC6ArHtB4kw/nHHwthXFwtWAN7sRPB8tLW7fD8aJ43RQr5107Bg1Lgkmt+FZxpafqUC/mukjIzGzbW0COMSOTcWUGss+HxK6M6Fl9aOzKJMct1uOSpPFgjItcGqydGZXR2FH93vXWoAotUwtZ119IixIdxpOJwYJg0HFn+GEfpU1PmiLfq2/uwqJ0hGCNfNcm9puagzhQrcDFOnolxjnYPSfSkU5wxlGo99yE5eJwoHXXU7csaZVttmx7sPj1lUENogXUM6JMqzSyEIm1XCOCL8rZJkZ781W5CwZhuJTNzV31sBREs8FaaCeksu7Y48BmkUqw6E9</ds:X509Certificate>\n </ds:X509Data>\n </ds:KeyInfo>\n </KeyDescriptor>\n <ArtifactResolutionService index=\"0\" isDefault=\"true\" Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/ArtifactResolver/metaAlias/idp\"/>\n <SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"http://idp.example.com:8080/openam/IDPSloRedirect/metaAlias/idp\" ResponseLocation=\"http://idp.example.com:8080/openam/IDPSloRedirect/metaAlias/idp\"/>\n <SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"http://idp.example.com:8080/openam/IDPSloPOST/metaAlias/idp\" ResponseLocation=\"http://idp.example.com:8080/openam/IDPSloPOST/metaAlias/idp\"/>\n <SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/IDPSloSoap/metaAlias/idp\"/>\n <ManageNameIDService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"http://idp.example.com:8080/openam/IDPMniRedirect/metaAlias/idp\" ResponseLocation=\"http://idp.example.com:8080/openam/IDPMniRedirect/metaAlias/idp\"/>\n <ManageNameIDService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"http://idp.example.com:8080/openam/IDPMniPOST/metaAlias/idp\" ResponseLocation=\"http://idp.example.com:8080/openam/IDPMniPOST/metaAlias/idp\"/>\n <ManageNameIDService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/IDPMniSoap/metaAlias/idp\"/>\n <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos</NameIDFormat>\n <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</NameIDFormat>\n <SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"http://idp.example.com:8080/openam/SSORedirect/metaAlias/idp\"/>\n <SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"http://idp.example.com:8080/openam/SSOPOST/metaAlias/idp\"/>\n <SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/SSOSoap/metaAlias/idp\"/>\n <NameIDMappingService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/NIMSoap/metaAlias/idp\"/>\n <AssertionIDRequestService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:SOAP\" Location=\"http://idp.example.com:8080/openam/AIDReqSoap/IDPRole/metaAlias/idp\"/>\n <AssertionIDRequestService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:URI\" Location=\"http://idp.example.com:8080/openam/AIDReqUri/IDPRole/metaAlias/idp\"/>\n </IDPSSODescriptor>\n</EntityDescriptor>\n\n",
"entityConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<EntityConfig entityID=\"http://idp.example.com:8080/openam\" hosted=\"true\" xmlns=\"urn:sun:fm:SAML:2.0:entityconfig\">\n <IDPSSOConfig metaAlias=\"/idp\">\n <Attribute name=\"description\">\n <Value/>\n </Attribute>\n <Attribute name=\"signingCertAlias\">\n <Value>test</Value>\n </Attribute>\n <Attribute name=\"encryptionCertAlias\">\n <Value/>\n </Attribute>\n <Attribute name=\"basicAuthOn\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"basicAuthUser\">\n <Value/>\n </Attribute>\n <Attribute name=\"basicAuthPassword\">\n <Value/>\n </Attribute>\n <Attribute name=\"autofedEnabled\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"autofedAttribute\">\n <Value/>\n </Attribute>\n <Attribute name=\"assertionEffectiveTime\">\n <Value>600</Value>\n </Attribute>\n <Attribute name=\"idpAuthncontextMapper\">\n <Value>com.sun.identity.saml2.plugins.DefaultIDPAuthnContextMapper</Value>\n </Attribute>\n <Attribute name=\"idpAuthncontextClassrefMapping\">\n <Value>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport|0||default</Value>\n </Attribute>\n <Attribute name=\"idpAccountMapper\">\n <Value>com.sun.identity.saml2.plugins.DefaultIDPAccountMapper</Value>\n </Attribute>\n <Attribute name=\"idpDisableNameIDPersistence\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"idpAttributeMapper\">\n <Value>com.sun.identity.saml2.plugins.DefaultIDPAttributeMapper</Value>\n </Attribute>\n <Attribute name=\"assertionIDRequestMapper\">\n <Value>com.sun.identity.saml2.plugins.DefaultAssertionIDRequestMapper</Value>\n </Attribute>\n <Attribute name=\"nameIDFormatMap\">\n <Value>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress=mail</Value>\n <Value>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName=</Value>\n <Value>urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName=</Value>\n <Value>urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos=</Value>\n <Value>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified=</Value>\n </Attribute>\n <Attribute name=\"idpECPSessionMapper\">\n <Value>com.sun.identity.saml2.plugins.DefaultIDPECPSessionMapper</Value>\n </Attribute>\n <Attribute name=\"attributeMap\"/>\n <Attribute name=\"wantNameIDEncrypted\">\n <Value/>\n </Attribute>\n <Attribute name=\"wantArtifactResolveSigned\">\n <Value/>\n </Attribute>\n <Attribute name=\"wantLogoutRequestSigned\">\n <Value/>\n </Attribute>\n <Attribute name=\"wantLogoutResponseSigned\">\n <Value/>\n </Attribute>\n <Attribute name=\"wantMNIRequestSigned\">\n <Value/>\n </Attribute>\n <Attribute name=\"wantMNIResponseSigned\">\n <Value/>\n </Attribute>\n <Attribute name=\"cotlist\">\n <Value>test</Value>\n </Attribute>\n <Attribute name=\"discoveryBootstrappingEnabled\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"assertionCacheEnabled\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"assertionNotBeforeTimeSkew\">\n <Value>600</Value>\n </Attribute>\n <Attribute name=\"saeAppSecretList\"/>\n <Attribute name=\"saeIDPUrl\">\n <Value>http://idp.example.com:8080/openam/idpsaehandler/metaAlias/idp</Value>\n </Attribute>\n <Attribute name=\"AuthUrl\">\n <Value/>\n </Attribute>\n <Attribute name=\"appLogoutUrl\">\n <Value/>\n </Attribute>\n <Attribute name=\"idpSessionSyncEnabled\">\n <Value>false</Value>\n </Attribute>\n <Attribute name=\"relayStateUrlList\"/>\n </IDPSSOConfig>\n</EntityConfig>\n\n",
"_type": {
"_id": "saml2",
"name": "Entity Descriptor ",
"collection": true
}
}'
Related
I am trying to build FetchXML equivalent of SQL query, I am quite new in using FetchXML:
SELECT o.opportunityid,c1.accountid
FROM dbo.opportunity o
LEFT JOIN dbo.account c1 on o.customerid = c1.accountid and o.customeridtype = 1
into
<fetch mapping="logical" version="1.0">
<entity name="opportunity">
<attribute name="opportunityid" />
<link-entity name="account" from="accountid" to="customerid" alias="A1" link-type="outer" >
<filter type="and" >
<condition attribute="customeridtype" operator="eq" value="1" />
</filter>
<attribute name="accountid" />
</link-entity>
but this is throwing error saying that attribute "customeridtype" doesn't exist in entity "account". that attribute is from opportunity entity as in SQL query. How can I fix this?
I just fired this in one of my Dynamics instance and gave correct result
<fetch>
<entity name="opportunity" >
<attribute name="opportunityid" />
<attribute name="customeridtype" />
<filter type="and" >
<condition attribute="customeridtype" operator="eq" value="1" />
</filter>
<link-entity name="account" from="accountid" to="customerid" link-type="outer" alias="Account" >
<attribute name="accountid" alias="AccountId" />
</link-entity>
</entity>
</fetch>
Take out the filter from inside link-entity xml node to outside entity node.
You can try XrmToolBox fetchxml builder or Kingswaysoft sql2fetchxml online tool.
<fetch mapping="logical" version="1.0">
<entity name="opportunity">
<attribute name="opportunityid" />
<filter type="and" >
<condition attribute="customeridtype" operator="eq" value="1" />
</filter>
<link-entity name="account" from="accountid" to="customerid" alias="A1" link-type="outer" >
<attribute name="accountid" />
</link-entity>
From the Watson Dialog document, it indicates the configuration setups for connecting with NLC. But it is hard to understand how this works without a running sample application. Most of examples can be googled are without such settings. I were trying to find some examples which using the indicated setups from 'classifier' settings and 'INTENT:{xxxxxx}' settings etc. per docuemnt . It will be great if someone could help on this, very appreciated.
Here is an example using the demo NLC training data. Save that text to a CSV file.
Create your NLC service. Name of the service doesn't matter.
Once created, click the "Access Beta Toolkit". You will need to login again, and allow the toolkit access to the NLC service.
Click the "Upload training data" button. Select your CSV file you saved earlier. If it works, you will see your intents + questions. If it fails, most common issue is not giving it a csv file extension.
Click "Create classifier". Name is not important.
Clicking training data/classifiers to see if it has finished compiling. It can take some time to complete.
Once the classifier finishes compiling it should show you the classifier id value. Example: 3d84bfx43-nlc-10356
Copy the text below to an XML file. Where you see CLASSIFIER_ID_GOES_HERE change to your classifier id.
<?xml version="1.0" encoding="UTF-8"?>
<dialog xsi:noNamespaceSchemaLocation="WatsonDialogDocument_1.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<flow>
<folder label="Main">
<output>
<prompt selectionType="RANDOM">
<item>Enter your weather related question.</item>
</prompt>
<getUserInput>
<search ref="folder_200143"/>
<default>
<output>
<prompt selectionType="RANDOM">
<item>I couldn't determine what you are asking about.</item>
</prompt>
</output>
</default>
</getUserInput>
</output>
</folder>
<folder label="Library">
<folder label="NLC Intents" id="folder_200143">
<input isAutoLearnCandidate="false" isRelatedNodeCandidate="true">
<grammar>
<item>conditions</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>I believe you are asking about conditions. </item>
</prompt>
</output>
</input>
<input>
<grammar>
<item>temperature</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>I believe you are asking about temperture. </item>
</prompt>
</output>
</input>
</folder>
</folder>
<folder label="Global"/>
<folder label="Concepts"/>
</flow>
<constants>
<var_folder name="Home"/>
</constants>
<variables>
<var_folder name="Home">
<var name="CLASSIFIER_CLASS_0" type="TEXT" description="auto-created"/>
<var name="CLASSIFIER_CONF_0" type="TEXT" description="auto-created"/>
<var name="CLASSIFIER_CLASS_1" type="TEXT" description="auto-created"/>
<var name="CLASSIFIER_CONF_1" type="TEXT" description="auto-created"/>
</var_folder>
</variables>
<settings>
<setting name="AUTOLEARN" type="USER">false</setting>
<setting name="LANGUAGE" type="USER">en-US</setting>
<setting name="RESPONSETIME" type="USER">-2</setting>
<setting name="MAXAUTOLEARNITEMS" type="USER">4</setting>
<setting name="NUMAUTOSETRELATED" type="USER">0</setting>
<setting name="TIMEZONEID" type="USER">Australia/Sydney</setting>
<setting name="AUTOSETRELATEDNODEID" type="USER">0</setting>
<setting name="INPUTMASKTYPE" type="USER">0</setting>
<setting name="CONCEPTMATCHING" type="USER">0</setting>
<setting name="DNR_NODE_ID">-15</setting>
<setting name="MULTISENT">0</setting>
<setting name="USE_CONCEPTS">3</setting>
<setting name="ENTITIES_SCOPE">3</setting>
<setting name="USER_LOGGING">2</setting>
<setting name="USE_TRANSLATIONS">3</setting>
<setting name="USE_STOP_WORDS">3</setting>
<setting name="USE_SPELLING_CORRECTIONS">3</setting>
<setting name="USE_AUTOMATIC_STOPWORDS_DETECTION">0</setting>
<setting name="PLATFORM_VERSION">10.1</setting>
<setting name="UI_COLOUR"></setting>
<setting name="PARENT_ACCOUNT"></setting>
<setting name="AL_NONE_LABEL">None of the above</setting>
<setting name="CLS_SEARCH_MODE">0</setting>
<setting name="CLS_MODEL">0</setting>
<setting name="CLS_ENDPOINT"></setting>
<setting name="CLS_USERNAME"></setting>
<setting name="CLS_PASSWORD"></setting>
<setting name="CLS_MODELNAME">CLASSIFIER_ID_GOES_HERE</setting>
<setting name="CLS_ADVANCED_SETTINGS">false</setting>
<setting name="CLS_MAXNBEST">3</setting>
<setting name="CLS_USE_OFFTOPIC">false</setting>
<setting name="DEFAULT_DNR_RETURN_POINT_CANDIDATE">-1</setting>
</settings>
<specialSettings>
<specialSetting label="DNR Join Statement">
<variations/>
</specialSetting>
<specialSetting label="AutoLearn Statement">
<variations/>
</specialSetting>
</specialSettings>
</dialog>
Upload that file to your dialog service and test it.
I have below FetchXML query used to create report in Business Intelligent Development Studio.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="incident">
<attribute name="ticketnumber" />
<attribute name="createdon" />
<attribute name="statuscode" />
<attribute name="incidentid" />
<attribute name="caseorigincode" />
<attribute name="new_statussla" />
<attribute name="ownerid" />
<attribute name="new_caseaging" />
<attribute name="casetypecode" />
<order attribute="ticketnumber" descending="false" />
<filter type="and">
<condition attribute="createdon" operator="on-or-after" value="#Startdate" />
<condition attribute="createdon" operator="on-or-before" value="#Enddate" />
<condition attribute="caseorigincode" operator="ne" value="3" />
</filter>
<link-entity name="systemuser" from="systemuserid" to="owninguser" visible="false" link-type="outer" alias="a_cf39b8fda77b421483a1af5e511c39ca">
<attribute name="new_region" />
<attribute name="businessunitid" />
</link-entity>
</entity>
</fetch>
I do converting this query to SQL query like below.
SELECT a.ticketnumber, a.createdon, a.statuscode,
a.incidentid, a.caseorigincode, a.new_statussla,
a.ownerid, a.new_caseaging, a.casetypecode,
b.new_region, b.businessunitid
FROM FilteredIncident a, FilteredSystemUser b
WHERE a.ownerid = b.systemuserid
AND createdon >= #StartDate
AND creaedon <= #EndDate
AND caseorigincode != '3'
My Question, is my SQL Query correct ? Eventhough I can execute it.
Well out of need I just created this. FetchXML to SQL Convertor free on GitHub!
A work in progress, but will give a usable output. Do Try! https://github.com/abtevrythng/FetchXML-to-SQL
here is the generated output for your fetchXML:
SELECT incident.ticketnumber, incident.createdon, incident.statuscode, incident.incidentid, incident.caseorigincode, incident.new_statussla, incident.ownerid, incident.new_caseaging, incident.casetypecode, systemuser.new_region, systemuser.businessunitid
FROM incident
LEFT OUTER JOIN systemuser ON incident.systemuserid = systemuser.owninguser
WHERE incident.createdon TBD '#Startdate' AND incident.createdon TBD '#Enddate' AND incident.caseorigincode != '3'
I'm designing Watson dialog to support following scenario: user to select intent 1,2, or 3. When user select intent 2, Watson will ask user to specify either option 1 or 2 or alternatively other valid intents.
Following is my current dialog file:
<?xml version="1.0" encoding="UTF-8"?>
<dialog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WatsonDialogDocument_1.0.xsd">
<flow>
<folder label="Main" id="Main">
<output id="start">
<prompt selectionType="RANDOM">
<item>DIALOG START - asking for user input</item>
</prompt>
<goto ref="processUserInput_start"/>
</output>
<getUserInput id="processUserInput_start">
<search ref="library_supported-intents"/>
<default>
<output>
<prompt selectionType="RANDOM">
<item>I am sorry, I did not understand your intents. Please choose intent1, intent2, or intent3.</item>
</prompt>
</output>
</default>
</getUserInput>
<getUserInput id="processUserInput_intent2">
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>option1</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 2 with option 1</item>
</prompt>
</output>
<goto ref="processUserInput_start"/>
</input>
<input>
<grammar>
<item>option2</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 2 with option 2</item>
</prompt>
</output>
<goto ref="processUserInput_start"/>
</input>
<output>
<prompt selectionType="RANDOM">
<item>Sorry, I can only understand option1 and option2 for intent2. Try again</item>
</prompt>
<goto ref="processUserInput_intent2"/>
</output>
</getUserInput>
</folder>
<folder label="Library" id="Library">
<folder label="Main Input" id="library_supported-intents">
<input>
<grammar>
<item>intent1</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 1</item>
</prompt>
</output>
</input>
<input>
<grammar>
<item>intent2</item>
</grammar>
<goto ref="intent2-detail"/>
</input>
<input>
<grammar>
<item>intent3</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 3</item>
</prompt>
</output>
</input>
</folder>
<folder label="Intent 2 Input" id="library_intent2">
<output id="intent2-detail">
<prompt selectionType="RANDOM">
<item>OK. I need further info to execute intent 2. Choose option1 or option2</item>
</prompt>
<goto ref="processUserInput_intent2"/>
</output>
</folder>
</folder>
<folder label="Concepts" id="Concepts"></folder>
</flow>
</dialog>
Unfortunately, I could not get appropriate invalid dialog message being displayed - e.g. Watson shows invalid option instead of invalid intent message, as following:
How should I structure recovery dialog flow to achieve above scenario?
try to put the goto inside the output node
<input>
<grammar>
<item>option1</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 2 with option 1</item>
</prompt>
<goto ref="processUserInput_start"/>
</output>
</input>
This biztalk Orch was working perfectly before I touched it. I did two things:
Modified the schema below adding 3 key, type and c_date
Modified my message transform so that those 3 additional parameters were mapped to the destination schema.
<?xml version="1.0" encoding="utf-16"?>
<schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns3="http://schemas.datacontract.org/2004/07/System.Data" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo" version="1.0" xmlns="http://www.w3.org/2001/XMLSchema">
<import schemaLocation=".\sqlBinding_System_x2eData.xsd" namespace="http://schemas.datacontract.org/2004/07/System.Data" />
<annotation>
<appinfo>
<fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Procedure.dbo</fileNameHint>
<references xmlns="http://schemas.microsoft.com/BizTalk/2003">
<reference targetNamespace="http://schemas.datacontract.org/2004/07/System.Data" />
</references>
</appinfo>
</annotation>
<element name="Vendor_Receive_IPN_Message_sp">
<annotation>
<documentation>
<doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/Vendor_Receive_IPN_Message_sp</doc:action>
</documentation>
</annotation>
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="1" name="data" nillable="true" type="string" />
<element minOccurs="0" maxOccurs="1" name="key" nillable="true" type="string" />
<element minOccurs="0" maxOccurs="1" name="type" nillable="true" type="string" />
<element minOccurs="0" maxOccurs="1" name="c_date" nillable="true" type="dateTime" />
</sequence>
</complexType>
</element>
<element name="Vendor_Receive_IPN_Message_spResponse">
<annotation>
<documentation>
<doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/Vendor_Receive_IPN_Message_sp/response</doc:action>
</documentation>
</annotation>
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="1" name="Vendor_Receive_IPN_Message_spResult" nillable="true" type="ns3:ArrayOfDataSet" />
<element minOccurs="1" maxOccurs="1" name="ReturnValue" type="int" />
</sequence>
</complexType>
</element>
</schema>
I'm getting this error:
The adapter failed to transmit message going to send port "SendPort IPN Message to SQL" with
URL "mssql://myserver:1433//mydb?". It will be retransmitted after
the retry interval specified for this Send Port.
Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException:
The start element with name "key" and namespace
"http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo" was unexpected.
Please ensure that your input XML conforms to the schema for the operation.
What step am I missing?
When you add nodes to a SP schema, they have to be
In the same order as in the procedure (is #key the second param, or did you put it before #data?).
Use the same spelling and casing as the procedure (is it called #key or #Key in the procedure?).
Use an XSD data type that corresponds to the datatype the procedure expects (is #key a (N)VARCHAR or (N)CHAR?).
The error you're getting indicates either 1 or 2 isn't correct. Show us your procedure definition to be sure. You could also regenerate the schema for the procedure in a separate (throw away) project and compare it with your changes.