Ionic Capacitor Deep links (appUrlOpen) event running multiple times 10+ - ionic-framework

I'm building an app where I have deep links to open app and run a specific function based on the url.
But the event triggers multiple times and run same function after that I have 10+ alerts which needs to be confirmed.
This is from running app on real device with livereload
Here is my code as React Component
import { useEffect } from "react";
import { App, URLOpenListenerEvent } from "#capacitor/app";
import { useCamera } from "src/hooks";
const AppUrlListener: React.FC<any> = () => {
const { startActionApprovalProcess } = useCamera();
useEffect(() => {
App.addListener("appUrlOpen", (event: URLOpenListenerEvent) => {
let actionUrl: string | null = event.url.replace("myrecheck", "https");
startActionApprovalProcess(actionUrl);
actionUrl = null;
});
App.addListener("appStateChange", event => {
console.log("appStateChange:", JSON.stringify(event));
});
}, [startActionApprovalProcess]);
return null;
};
export default AppUrlListener;
I'm importing it on App.tsx (Firebase Notifications Listener too which runs multiple times again) like a normal component
<AppUrlListener />
<NotificationsListener />
And here are my console logs
First I'm moving from app to the browser state changes
Then open app from deep link and runs the event from which comes origin logs
Then comes apps new state
And then again logs from my function
VM3:207 result App.addListener (#8693379)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693383)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693385)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693387)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693389)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693391)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693393)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693395)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693402)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693404)
index.tsx:16 appStateChange: {"isActive":false}
VM3:207 result App.addListener (#8693378)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693382)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693384)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693386)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693388)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693390)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693392)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693394)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693401)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693403)
qr-decode.ts:12 url origin https://my.recheck.io
VM3:207 result App.addListener (#8693379)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693383)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693385)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693387)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693389)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693391)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693393)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693395)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693402)
index.tsx:16 appStateChange: {"isActive":true}
VM3:207 result App.addListener (#8693404)
index.tsx:16 appStateChange: {"isActive":true}
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693412)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693413)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693414)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693415)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693416)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693417)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693418)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693419)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693420)
qr-decode.ts:17 Success new apiUrl: https://my.recheck.io
VM3:233 native App.getInfo (#8693421)
VM3:207 result App.getInfo (#8693412)
VM3:207 result App.getInfo (#8693413)
VM3:207 result App.getInfo (#8693414)
VM3:207 result App.getInfo (#8693415)
VM3:207 result App.getInfo (#8693416)
VM3:207 result App.getInfo (#8693417)
VM3:207 result App.getInfo (#8693418)
VM3:207 result App.getInfo (#8693419)
VM3:207 result App.getInfo (#8693420)
VM3:207 result App.getInfo (#8693421)
Ionic:
Ionic CLI : 6.17.0 (/Users/byurhanbeyzat/.nvm/versions/node/v16.3.0/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/react 5.7.0
Capacitor:
Capacitor CLI : 3.1.2
#capacitor/android : 3.2.2
#capacitor/core : 3.2.2
#capacitor/ios : 3.2.2
Utility:
cordova-res : not installed globally
native-run (update available: 1.4.1) : 1.4.0
System:
NodeJS : v16.3.0 (/Users/byurhanbeyzat/.nvm/versions/node/v16.3.0/bin/node)
npm : 7.21.1
OS : macOS Big Sur

Late answer, but for people arriving here from Google:
This useEffect is probably running multiple times. Adding the same listener 10+ times to the same event.
You'll need a Cleanup function to remove the duplicate listeners
useEffect(() => {
// add listeners are here
// Below function will be executed similar to the old `componentWillUnmount` function on classes
return () => {
App.removeAllListeners();
}
});

Related

Soap request signing

Hello fellow developers,
I have no experience working on soap, saml and xml signing,
I am trying to generate this structure and then add 2 signature tags to it.
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header xmlns:a="http://www.w3.org/2005/08/addressing">
<a:MessageID></a:MessageID>
<a:To env:mustUnderstand="true"></a:To>
<a:Action env:mustUnderstand="true">urn:hl7-org:v3:PRPA_IN201305UV02:CrossGatewayPatientDiscovery</a:Action>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp wsu:Id="timestamp_ID">
<wsu:Created>2022-10-13T18:18:17.763Z</wsu:Created>
<wsu:Expires>2023-10-13T18:23:17.763Z</wsu:Expires>
</wsu:Timestamp>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="assertion_ID" IssueInstant="2022-10-13T18:18:17.763Z" Version="2.0">
<saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName"></saml2:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#assertion_ID">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue></SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate></X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName"></saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
<saml2:SubjectConfirmationData>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyValue>
<RSAKeyValue>
<Modulus></Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</saml2:SubjectConfirmationData>
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2022-10-13T18:15:17.763Z" NotOnOrAfter="2022-10-13T18:23:17.763Z">
<saml2:AudienceRestriction>
<saml2:Audience></saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AuthnStatement AuthnInstant="2022-10-13T17:55:17.743Z" SessionIndex="1234567890">
<saml2:SubjectLocality Address="10.1.1.144" DNSName="localhost"/>
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:subject-id">
<saml2:AttributeValue>John Doe</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization">
<saml2:AttributeValue>Dr. John M Doe, MD Practice</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization-id">
<saml2:AttributeValue></saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:nhin:names:saml:homeCommunityId">
<saml2:AttributeValue></saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:subject:role">
<saml2:AttributeValue>
<Role xmlns="urn:hl7-org:v3" code="112247003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Medical doctor" xsi:type="CE"/>
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse">
<saml2:AttributeValue>
<PurposeOfUse xmlns="urn:hl7-org:v3" code="TREATMENT" codeSystem="2.16.840.1.113883.3.18.7.1" codeSystemName="nhin-purpose" displayName="Treatment" xsi:type="CE"/>
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:resource:resource-id">
<saml2:AttributeValue></saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#timestamp_ID">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue></SignatureValue>
<KeyInfo>
<wsse:SecurityTokenReference xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
<wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">assertion_ID</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</KeyInfo>
</Signature>
</wsse:Security>
</env:Header>
<env:Body>
<PRPA_IN201305UV02 xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0">
<id extension="126627497759" root="1.3.6.1.4.1.52618.1.3"/>
<creationTime value="20221013181817"/>
<interactionId extension="PRPA_IN201305UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="P"/>
<processingModeCode code="T"/>
<acceptAckCode code="AL"/>
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id root="0.0.0"/>
<telecom value="https://RH-Windows-TMP-b994dba9f85ba908.elb.us-east-1.amazonaws.com:4437/"/>
<asAgent classCode="AGNT">
<representedOrganization classCode="ORG" determinerCode="INSTANCE">
<id root=""/>
</representedOrganization>
</asAgent>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id root="1.3.6.1.4.1.52618.1.2"/>
<asAgent classCode="AGNT">
<representedOrganization classCode="ORG" determinerCode="INSTANCE">
<id root="1.3.6.1.4.1.52618.1"/>
</representedOrganization>
</asAgent>
</device>
</sender>
<controlActProcess classCode="CACT" moodCode="EVN">
<code code="PRPA_TE201305UV02" codeSystem="2.16.840.1.113883.1.6"/>
<authorOrPerformer typeCode="AUT">
<assignedDevice classCode="ASSIGNED">
<id root="1.3.6.1.4.1.52618.1.1"/>
</assignedDevice>
</authorOrPerformer>
<queryByParameter>
<queryId extension="126627497760" root="1.3.6.1.4.1.52618.1.3.1"/>
<statusCode code="new"/>
<responseModalityCode code="R"/>
<responsePriorityCode code="I"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>LivingSubject.administrativeGender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value=""/>
<semanticsText>LivingSubject.birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="" root="1.3.6.1.4.1.52618.1.1"/>
<semanticsText>LivingSubject.id</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value>
<given></given>
<family>TEST</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<patientAddress>
<value>
<streetAddressLine>Home Dr</streetAddressLine>
<city>Charlotte</city>
<state>NC</state>
<postalCode></postalCode>
<country>US</country>
</value>
<semanticsText>Patient.addr</semanticsText>
</patientAddress>
</parameterList>
</queryByParameter>
</controlActProcess>
</PRPA_IN201305UV02>
</env:Body>
</env:Envelope>
I am using rhino javascript and below is the code
//////////////////////////////////////////////////////////////////////////////////
// Generate our dynamic message values
//
var timestampId = UUIDGenerator.getUUID();
var assertionId = UUIDGenerator.getUUID();
var createdTimestamp = new Date().toISOString();
var expiresTimestamp = new Date((new Date()).getTime() + 10000*10).toISOString();
var samlenvelope="<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">"+
"<env:Header xmlns:a=\"http://www.w3.org/2005/08/addressing\">"+
"<a:MessageID>urn:uuid:32886a29-98ad-4284-b00e-3fe4ded10d16</a:MessageID>"+
"<a:To env:mustUnderstand=\"true\"></a:To>"+
"<a:Action env:mustUnderstand=\"true\">urn:hl7-org:v3:PRPA_IN201305UV02:CrossGatewayPatientDiscovery</a:Action>"+
"<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"+
"<wsu:Timestamp wsu:Id=\"timestamp_ID\">"+
"<wsu:Created>2022-10-13T18:18:17.763Z</wsu:Created>"+
"<wsu:Expires>2023-10-13T18:23:17.763Z</wsu:Expires>"+
"</wsu:Timestamp>"+
"<saml2:Assertion xmlns:saml2=\"urn:oasis:names:tc:SAML:2.0:assertion\" xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ID=\"assertion_ID\" IssueInstant=\"2022-10-13T18:18:17.763Z\" Version=\"2.0\">"+
"<saml2:Issuer Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName\"></saml2:Issuer>"+
"<saml2:Subject>"+
"<saml2:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName\"></saml2:NameID>"+
"<saml2:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:holder-of-key\">"+
"<saml2:SubjectConfirmationData>"+
"<KeyInfo xmlns=\"http://www.w3.org/2000/09/xmldsig#\">"+
"<KeyValue>"+
"<RSAKeyValue>"+
"<Modulus></Modulus>"+
"<Exponent>AQAB</Exponent>"+
"</RSAKeyValue>"+
"</KeyValue>"+
"</KeyInfo>"+
"</saml2:SubjectConfirmationData>"+
"</saml2:SubjectConfirmation>"+
"</saml2:Subject>"+
"<saml2:Conditions NotBefore=\"2022-10-13T18:15:17.763Z\" NotOnOrAfter=\"2022-10-13T18:23:17.763Z\">"+
"</saml2:Conditions>"+
"<saml2:AuthnStatement AuthnInstant=\"2022-10-13T17:55:17.743Z\" SessionIndex=\"1234567890\">"+
"<saml2:SubjectLocality Address=\"10.1.1.144\" DNSName=\"localhost\"/>"+
"<saml2:AuthnContext>"+
"<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>"+
"</saml2:AuthnContext>"+
"</saml2:AuthnStatement>"+
"<saml2:AttributeStatement>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xspa:1.0:subject:subject-id\">"+
"<saml2:AttributeValue>John Doe</saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xspa:1.0:subject:organization\">"+
"<saml2:AttributeValue>Dr. John M Doe, MD Practice</saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xspa:1.0:subject:organization-id\">"+
"<saml2:AttributeValue></saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:nhin:names:saml:homeCommunityId\">"+
"<saml2:AttributeValue></saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xacml:2.0:subject:role\">"+
"<saml2:AttributeValue>"+
"<Role xmlns=\"urn:hl7-org:v3\" code=\"112247003\" codeSystem=\"2.16.840.1.113883.6.96\" codeSystemName=\"SNOMED CT\" displayName=\"Medical doctor\" xsi:type=\"CE\"/>"+
"</saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xspa:1.0:subject:purposeofuse\">"+
"<saml2:AttributeValue>"+
"<PurposeOfUse xmlns=\"urn:hl7-org:v3\" code=\"TREATMENT\" codeSystem=\"2.16.840.1.113883.3.18.7.1\" codeSystemName=\"nhin-purpose\" displayName=\"Treatment\" xsi:type=\"CE\"/>"+
"</saml2:AttributeValue>"+
"</saml2:Attribute>"+
"<saml2:Attribute Name=\"urn:oasis:names:tc:xacml:2.0:resource:resource-id\">"+
"<saml2:AttributeValue></saml2:AttributeValue>"+
"</saml2:Attribute>"+
"</saml2:AttributeStatement>"+
"</saml2:Assertion>"+
"</wsse:Security>"+
"</env:Header>"+
"<env:Body>"+
"<PRPA_IN201305UV02 xmlns=\"urn:hl7-org:v3\" ITSVersion=\"XML_1.0\">"+
"<id extension=\"126627497759\" root=\"1.3.6.1.4.1.52618.1.3\"/>"+
"<creationTime value=\"20221013181817\"/>"+
"<interactionId extension=\"PRPA_IN201305UV02\" root=\"2.16.840.1.113883.1.6\"/>"+
"<processingCode code=\"P\"/>"+
"<processingModeCode code=\"T\"/>"+
"<acceptAckCode code=\"AL\"/>"+
"<receiver typeCode=\"RCV\">"+
"<device classCode=\"DEV\" determinerCode=\"INSTANCE\">"+
"<id root=\"0.0.0\"/>"+
"<telecom value=\"https://RH-Windows-TMP-b994dba9f85ba908.elb.us-east-1.amazonaws.com:4437/\"/>"+
"<asAgent classCode=\"AGNT\">"+
"<representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">"+
"<id root=\"\"/>"+
"</representedOrganization>"+
"</asAgent>"+
"</device>"+
"</receiver>"+
"<sender typeCode=\"SND\">"+
"<device classCode=\"DEV\" determinerCode=\"INSTANCE\">"+
"<id root=\"1.3.6.1.4.1.52618.1.2\"/>"+
"<asAgent classCode=\"AGNT\">"+
"<representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">"+
"<id root=\"1.3.6.1.4.1.52618.1\"/>"+
"</representedOrganization>"+
"</asAgent>"+
"</device>"+
"</sender>"+
"<controlActProcess classCode=\"CACT\" moodCode=\"EVN\">"+
"<code code=\"PRPA_TE201305UV02\" codeSystem=\"2.16.840.1.113883.1.6\"/>"+
"<authorOrPerformer typeCode=\"AUT\">"+
"<assignedDevice classCode=\"ASSIGNED\">"+
"<id root=\"1.3.6.1.4.1.52618.1.1\"/>"+
"</assignedDevice>"+
"</authorOrPerformer>"+
"<queryByParameter>"+
"<queryId extension=\"\" root=\"1.3.6.1.4.1.52618.1.3.1\"/>"+
"<statusCode code=\"new\"/>"+
"<responseModalityCode code=\"R\"/>"+
"<responsePriorityCode code=\"I\"/>"+
"<parameterList>"+
"<livingSubjectAdministrativeGender>"+
"<value code=\"M\"/>"+
"<semanticsText>LivingSubject.administrativeGender</semanticsText>"+
"</livingSubjectAdministrativeGender>"+
"<livingSubjectBirthTime>"+
"<value value=\"\"/>"+
"<semanticsText>LivingSubject.birthTime</semanticsText>"+
"</livingSubjectBirthTime>"+
"<livingSubjectId>"+
"<value extension=\"\" root=\"1.3.6.1.4.1.52618.1.1\"/>"+
"<semanticsText>LivingSubject.id</semanticsText>"+
"</livingSubjectId>"+
"<livingSubjectName>"+
"<value>"+
"<given></given>"+
"<family>TEST</family>"+
"</value>"+
"<semanticsText>LivingSubject.name</semanticsText>"+
"</livingSubjectName>"+
"<patientAddress>"+
"<value>"+
"<streetAddressLine>Home Dr</streetAddressLine>"+
"<city>Charlotte</city>"+
"<state>NC</state>"+
"<postalCode></postalCode>"+
"<country>US</country>"+
"</value>"+
"<semanticsText>Patient.addr</semanticsText>"+
"</patientAddress>"+
"</parameterList>"+
"</queryByParameter>"+
"</controlActProcess>"+
"</PRPA_IN201305UV02>"+
"</env:Body>"+
"</env:Envelope>"+;
var samlString = new java.lang.String(samlenvelope);
////////////////////////////////////////////////////////////////////////////////////
// Build our XML DOM for signature
//
var documentBuilderFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
var document = documentBuilderFactory.newDocumentBuilder().parse(new java.io.ByteArrayInputStream(samlString.getBytes("utf-8")));
////////////////////////////////////////////////////////////////////////////////////
// Configure Digital Signature utilities for required crypto operations
//
var xmlDsigFactory = javax.xml.crypto.dsig.XMLSignatureFactory.getInstance("DOM");
var parameterSpec = new javax.xml.crypto.dsig.spec.ExcC14NParameterSpec();
var reference = xmlDsigFactory.newReference
(
"#assertion_ID",
xmlDsigFactory.newDigestMethod(javax.xml.crypto.dsig.DigestMethod.SHA1, null),
java.util.Collections.singletonList(xmlDsigFactory.newTransform("http://www.w3.org/2001/10/xml-exc-c14n#", parameterSpec)),
null, //type
null //id
)
var signedInfo = xmlDsigFactory.newSignedInfo
(
xmlDsigFactory.newCanonicalizationMethod
(
javax.xml.crypto.dsig.CanonicalizationMethod.EXCLUSIVE,
parameterSpec
),
xmlDsigFactory.newSignatureMethod(javax.xml.crypto.dsig.SignatureMethod.RSA_SHA1, null),
java.util.Collections.singletonList(reference)
)
var reference1 = xmlDsigFactory.newReference
(
"#timestamp_ID",
xmlDsigFactory.newDigestMethod(javax.xml.crypto.dsig.DigestMethod.SHA1, null),
java.util.Collections.singletonList(xmlDsigFactory.newTransform("http://www.w3.org/2001/10/xml-exc-c14n#", parameterSpec)),
null, //type
null //id
)
var signedInfo1 = xmlDsigFactory.newSignedInfo
(
xmlDsigFactory.newCanonicalizationMethod
(
javax.xml.crypto.dsig.CanonicalizationMethod.EXCLUSIVE,
parameterSpec
),
xmlDsigFactory.newSignatureMethod(javax.xml.crypto.dsig.SignatureMethod.RSA_SHA1, null),
java.util.Collections.singletonList(reference1)
)
//////////////////////////////////////////////////////
// Fetch our certificate and key
//
var certificate;
try
{
var inputStream = new java.io.FileInputStream("test.crt");
var certificateFactory = java.security.cert.CertificateFactory.getInstance("X.509");
certificate = certificateFactory.generateCertificate(inputStream);
}
finally
{
if (inputStream != null)
inputStream.close();
}
var privateKey;
var keyFactory = java.security.KeyFactory.getInstance("RSA");
var keySpec = new java.security.spec.PKCS8EncodedKeySpec(java.nio.file.Files.readAllBytes(new java.io.File("private_key.der").toPath()));
privateKey = keyFactory.generatePrivate(keySpec);
////////////////////////////////////////////////////////
// Generate the KeyInfo for our signature
//
var keyInfoFactory = xmlDsigFactory.getKeyInfoFactory();
var x509Content = new java.util.ArrayList();
x509Content.add(certificate);
var x509Data = keyInfoFactory.newX509Data(x509Content);
var keyInfo = keyInfoFactory.newKeyInfo(java.util.Collections.singletonList(x509Data));
var signature = xmlDsigFactory.newXMLSignature(signedInfo, keyInfo);
var dsc = new javax.xml.crypto.dsig.dom.DOMSignContext(privateKey, document.getDocumentElement());
var rootEl = document.getDocumentElement();
rootEl.setIdAttribute("ID",true);
signature.sign(dsc);
var signature1 = xmlDsigFactory.newXMLSignature(signedInfo1, keyInfo1);
var dsc = new javax.xml.crypto.dsig.dom.DOMSignContext(privateKey, document.getDocumentElement());
signature1.sign(dsc);
/*
var newEle=document.createElement("Transform");
newEle.setAttribute('Algorithm', 'http://www.w3.org/2000/09/xmldsig#enveloped-signature');
document.getElementsByTagName("Transforms").item(0).appendChild(newEle);*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Define any formatting preferences get the signed document as a string
//
var transformerFactory = javax.xml.transform.TransformerFactory.newInstance();
var transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
var stringWriter = new java.io.StringWriter();
transformer.transform(new javax.xml.transform.dom.DOMSource(document), new javax.xml.transform.stream.StreamResult(stringWriter));
channelMap.put("soapMessage", stringWriter.toString());
when I run the code I get this error
Wrapped org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to
reference a node in a context where it does not exist.
Will appreciate your help

App crash after successfully changed wallpaper

hi i'm a beginner in flutter, here i'm trying to make a wallpaper application. my application can run and change the wallpaper, my problem is why does my application crash after success?
_saving() async {
await _askPermissions();
var response = await Dio().get(
widget.imgData,
options: Options(responseType: ResponseType.bytes),
);
final result = await ImageGallerySaver.saveImage(
Uint8List.fromList(response.data), name: 'images');
print(result['filePath']);
var path = await FlutterAbsolutePath.getAbsolutePath(result['filePath']);
print(path);
String out;
try {
out = await WallpaperManager.setWallpaperFromFile(
path, WallpaperManager.HOME_SCREEN);
} on PlatformException {
out = 'Failed to get wallpaper.';
}
}
i am getting this log
D/EGL_emulation(26450): app_time_stats: avg=1550.15ms min=19.34ms max=12037.74ms count=8
I/System.out(26450): ImageGallerySaverPlugin 80
I/flutter (26450): content://media/external/images/media/90
I/flutter (26450): /data/user/0/realfz.flutter.xeed.xeed/cache/IMG_1645634589898.png
E/FA (26450): Missing google_app_id. Firebase Analytics disabled.
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51db690: maj 2 min 0 rcv 2
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51de750: maj 2 min 0 rcv 2
D/HostConnection(26450): createUnique: call
D/HostConnection(26450): HostConnection::get() New Host Connection established 0x7d36c51df950, tid 27786
D/HostConnection(26450): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation(26450): eglMakeCurrent: 0x7d36c51de750: ver 2 0 (tinfo 0x7d38ea0a7200) (first time)
I/Choreographer(26450): Skipped 49 frames! The application may be doing too much work on its main thread.
D/HostConnection(26450): createUnique: call
D/HostConnection(26450): HostConnection::get() New Host Connection established 0x7d36c51e36d0, tid 27785
D/HostConnection(26450): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation(26450): eglMakeCurrent: 0x7d36c51db690: ver 2 0 (tinfo 0x7d38ea0a7100) (first time)
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51e30d0: maj 2 min 0 rcv 2
I/Choreographer(26450): Skipped 109 frames! The application may be doing too much work on its main thread.
I/OpenGLRenderer(26450): Davey! duration=2649ms; Flags=1, FrameTimelineVsyncId=113284, IntendedVsync=47817620015088, Vsync=47818436681722, InputEventId=0, HandleInputStart=47818446770100, AnimationStart=47818446842400, PerformTraversalsStart=47818446945100, DrawStart=47820247194700, FrameDeadline=47817636681754, FrameInterval=47818446237700, FrameStartTime=16666666, SyncQueued=47820248422100, SyncStart=47820248873100, IssueDrawCommandsStart=47820249153600, SwapBuffers=47820251098700, FrameCompleted=47820270211800, DequeueBufferDuration=10092300, QueueBufferDuration=2055700, GpuCompleted=47820259923000, SwapBuffersCompleted=47820270211800, DisplayPresentTime=8589934592,
sorry

MuleSoft REST API invoking SOAP Service

I invoke a SOAP Service that calls data from a DB using a REST Service, when I call the GET function it returns all null values and the Anypoint Studio Console returns this answer:
INFO 2020-11-19 08:51:40,897 [[MuleRuntime].uber.03: [userstory12_soap].getCustomerByLastName.BLOCKING #393df87f] [processor: ; event: bb2e3fd0-2a76-11eb-9a6c-86c5a63076bd] org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean: Creating Service {http://client.internal.soap.mule.org/}ProxyService from class org.mule.soap.internal.client.CxfClientFactory$ProxyService
I do not know why is it not working, since I compared my flows with those of a colleague and they are exactly the same (except for some minor variations in variable names). Any input in solving this would be great! Find below screenshot of my flows and XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mule xmlns:wsc="http://www.mulesoft.org/schema/mule/wsc" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit-soap="http://www.mulesoft.org/schema/mule/apikit-soap" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/apikit-soap http://www.mulesoft.org/schema/mule/apikit-soap/current/mule-apikit-soap.xsd http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/wsc http://www.mulesoft.org/schema/mule/wsc/current/mule-wsc.xsd">
<http:listener-config name="api-httpListenerConfig">
<http:listener-connection host="0.0.0.0" port="8087"/>
</http:listener-config>
<apikit-soap:config httpStatusVarName="httpStatus" name="soapkit-config" port="us12SOAP" service="us12" wsdlLocation="SOAPUS12.wsdl"/>
<db:config name="Database_Config" doc:name="Database Config" doc:id="176ab101-fa7d-4ee9-aca3-5c0bf9fe8c77" >
<db:mssql-connection host="localhost" port="1433" user="sa" password="Gecegu0722#" databaseName="EAIS_Training" />
</db:config>
<wsc:config name="Web_Service_Consumer_Config" doc:name="Web Service Consumer Config" doc:id="0665000a-d19d-4801-a118-2315417e9290" >
<wsc:connection wsdlLocation="api\SOAPUS12.wsdl" service="us12" port="us12SOAP" address="http://localhost:8087/us12/us12SOAP/" >
<wsc:web-service-security actor="http://schemas.xmlsoap.org/soap/actor/next" />
</wsc:connection>
</wsc:config>
<flow name="api-main">
<http:listener config-ref="api-httpListenerConfig" path="/us12/us12SOAP">
<http:response statusCode="#[attributes.protocolHeaders.httpStatus default 200]">
<http:body>#[payload]</http:body>
<http:headers>#[attributes.protocolHeaders default {}]</http:headers>
</http:response>
<http:error-response statusCode="#[attributes.protocolHeaders.httpStatus default 500]">
<http:body>#[payload]</http:body>
<http:headers>#[attributes.protocolHeaders default {}]</http:headers>
</http:error-response>
</http:listener>
<apikit-soap:router config-ref="soapkit-config">
<apikit-soap:attributes><![CDATA[#[%dw 2.0
output application/java
---
{
headers: attributes.headers,
method: attributes.method,
queryString: attributes.queryString
}]]]></apikit-soap:attributes>
</apikit-soap:router>
</flow>
<flow name="getCustomerDB:\soapkit-config">
<db:select doc:name="Select" doc:id="75cdc0ea-04b6-429f-a022-9152c14d1dd9" config-ref="Database_Config">
<db:sql ><![CDATA[SELECT * FROM customer_aux WHERE last_name = :last_name]]></db:sql>
<db:input-parameters ><![CDATA[#[output application/java
ns ns0 http://www.example.org/us12/
---
{
last_name: payload.body.ns0#getCustomerDB.last_name
}]]]></db:input-parameters>
</db:select>
<ee:transform>
<ee:message>
<ee:set-payload><![CDATA[output application/java
ns ns0 http://www.example.org/us12/
---
{
body: {
ns0#getCustomerDBResponse: {
id: payload.id,
first_name: payload.first_name,
last_name: payload.last_name,
birth_date: payload.age,
street: payload.street,
city: payload.city,
country: payload.country,
phone: payload.phone
}
} write "application/xml"
}
]]></ee:set-payload>
</ee:message>
</ee:transform>
</flow>
<flow name="getCustomerByLastName" doc:id="0b351b65-af46-414b-9ac6-ccf02812e2d2" >
<http:listener doc:name="Listener" doc:id="72239ecd-26b9-4a81-90a0-6a486e396eb8" config-ref="api-httpListenerConfig" path="/getCustomerByLastName"/>
<wsc:consume operation="getCustomerDB" doc:name="Consume" doc:id="d29f381b-d054-4a03-8255-f953ce6996ed" config-ref="Web_Service_Consumer_Config">
<wsc:message >
<wsc:body ><![CDATA[#[output application/xml
ns ns0 http://www.example.org/us12
---
{
ns0#getCustomerDB: {
last_name: attributes.queryParams.last_name
}
}]]]></wsc:body>
</wsc:message>
</wsc:consume>
<ee:transform doc:name="Transform Message" doc:id="8a2b6eb1-d798-4f73-a25b-a74f54eeb8ce" >
<ee:message >
<ee:set-payload ><![CDATA[output application/json
ns ns0 http://www.example.org/us12/
import * from dw::core::Strings
---
{
id: payload.body.ns0#getCustomerDBResponse.id default 0,
firstName: capitalize(payload.body.ns0#getCustomerDBResponse.first_name) default "",
lastName: capitalize(payload.body.ns0#getCustomerDBResponse.last_name) default "",
age: payload.body.ns0#getCustomerDBResponse.birth_date default "",
street: capitalize(payload.body.ns0#getCustomerDBResponse.street) default "",
city: capitalize(payload.body.ns0#getCustomerDBResponse.city) default "",
country: capitalize(payload.body.ns0#getCustomerDBResponse.country) default "",
phone: payload.body.ns0#getCustomerDBResponse.phone default 0
}
]]></ee:set-payload>
</ee:message>
</ee:transform>
</flow>
</mule>

Marklogic REST API wildcard search

I need to create a paginated search for json documents in one collection.
Document structure:
{
"Id": "OBJ-0000",
"Title": "sample text",
"Visible": true
}
I created element range indexes on fields Id, Title and Visible, and search options xml configuration:
<?xml version="1.0" encoding="UTF-8"?>
<search:options xmlns:search="http://marklogic.com/appservices/search">
<search:constraint name="id">
<search:range facet="false" type="xs:string">
<search:json-property>Id</search:json-property>
</search:range>
</search:constraint>
<search:constraint name="title">
<search:range facet="false" type="xs:string">
<search:json-property>Title</search:json-property>
</search:range>
</search:constraint>
<search:constraint name="visible">
<search:value type="boolean">
<search:json-property>Visible</search:json-property>
</search:value>
</search:constraint>
<search:operator name="sort">
<search:state name="idAsc">
<search:sort-order direction="ascending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
<search:state name="idDesc">
<search:sort-order direction="descending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
<search:state name="titleAsc">
<search:sort-order direction="ascending">
<search:json-property>Title</search:json-property>
</search:sort-order>
<search:sort-order direction="descending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
<search:state name="titleDesc">
<search:sort-order direction="descending">
<search:json-property>Title</search:json-property>
</search:sort-order>
<search:sort-order direction="descending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
<search:state name="isvisibleAsc">
<search:sort-order direction="ascending">
<search:json-property>Visible</search:json-property>
</search:sort-order>
<search:sort-order direction="descending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
<search:state name="isvisibleDesc">
<search:sort-order direction="descending">
<search:json-property>Visible</search:json-property>
</search:sort-order>
<search:sort-order direction="descending">
<search:json-property>Id</search:json-property>
</search:sort-order>
</search:state>
</search:operator>
<search:return-results>true</search:return-results>
<search:return-metrics>false</search:return-metrics>
<search:transform-results apply="raw">
</search:transform-results>
<search:debug>false</search:debug>
</search:options>
After, I created POST request with reference to options file:
LATEST/search?format=json&pageLength=20&start=1&options=objectSearch
with structured query:
{
"query": {
"operator-state": {
"operator-name": "sort",
"state-name": "TitleAsc"
},
"and-query": {
"term-query": { "text": "*exam*" }
}
}
}
and it works. But, however, when I make a query with the parameter start=1, in "total" I get more results than it really does, but if I specified start=20 for example, "total" is calculated correctly. This happens only when I use the search parameters with the wildcard (*) in the first place in the search term and term contains more than 3 characters.
How I can fix this issue?
From the documentation :
https://docs.marklogic.com/search:search
The output of search:search returns a element, which in turn contains a total attribute. The value of the total attribute is an estimate, based on the index resolution of the query, and it is not filtered for accuracy. The accuracy of the index resolution depends on the index configuration of the database, on the query, and on the data being searched.
This means that you will only receive an accurate total when all of the necessary indexes are turned on for your query.
Using the recommended Wildcard Index settings here should help you get accurate totals : https://docs.marklogic.com/guide/search-dev/wildcard#id_14163
From your comment above, you appear to be missing a word lexicon in the codepoint collation.

How can I create a user for ASP.Net/Umbraco SQL Membership from iPhone and WCF?

So I have been struggling for days now, trying to simply create a new user with a WCF Service using Umbraco's Membership Provider. Can someone tell me if I'm out of my mind, if this is impossible to do, or if I'm overlooking something I need to add to my WCF Service to allow this to work. My WCF script is embedded into my website on IIS 7.5 using .NET Framework 4.0.
I can currently return my JSON strings from WCF, such as validation of input. And I will be using this from an iPhone App.
But as soon as everything validates, and I try to run the following lines...
MembershipCreateStatus status;
MembershipUser newUser = Membership.CreateUser(email, pw1, email, "n", "n", false, out status);
if (newUser != null)
{
string newUserGuid = System.Guid.NewGuid().ToString("N");
MemberProfile mp = MemberProfile.GetUserProfile(email);
mp.AuthGuid = newUserGuid;
mp.FirstName = fname;
mp.LastName = lname;
mp.Birthday = bDay;
mp.DisplayRealName = intName;
mp.DisplayBirthday = intBirthday;
mp.Save();
Roles.AddUserToRole(email, "Client");
return #"Valid:User Added";
}else
return #"Error:Invalid:Error Occurred";
}
I get the following error...
The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'. See server logs for more details. The exception stack trace is:
at
umbraco.cms.businesslogic.member.Member.GetMemberFromLoginName(String
loginName) at
umbraco.providers.members.UmbracoMembershipProvider.CreateUser(String
username, String password, String
email, String passwordQuestion, String
passwordAnswer, Boolean isApproved,
Object providerUserKey,
MembershipCreateStatus& status) at
System.Web.Security.Membership.CreateUser(String
username, String password, String
email, String passwordQuestion, String
passwordAnswer, Boolean isApproved,
Object providerUserKey,
MembershipCreateStatus& status) at
System.Web.Security.Membership.CreateUser(String
username, String password, String
email, String passwordQuestion, String
passwordAnswer, Boolean isApproved,
MembershipCreateStatus& status) at
MyDll.Web.AUsers.RegisterUser(String
email, String pw1, String pw2, String
fname, String lname, Int32 intName,
String birthdate, Int32 intBirthday)
at MyDll.Web.get.Users.Register(String
email, String p1, String p2, String
fname, String lname, String
displayname, String birthdate, String
displaybirth) at
SyncInvokeRegister(Object , Object[] ,
Object[] ) at
System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object
instance, Object[] inputs, Object[]&
outputs) at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)
My Web Config section looks like this...
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="jsonBinding" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="MyDll.Users">
<endpoint address="/get/Users.svc" behaviorConfiguration="jsonBehavior"
binding="webHttpBinding" bindingConfiguration="jsonBinding"
name="UsersService" contract="MyDll.Web.get.Users" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="jsonBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Any help whatesoever would be GREATLY appreciated. And if I could buy you a beer or 10, I would.
Thanks!
In umbraco Member.cs, there is
HttpContext.Current.Trace.Warn("No member with loginname: " + loginName + " Exists");
So you got such error.
In web.config under system.serviceModel add:
<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”/>
on your service class
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
For more information, please see
http://msdn.microsoft.com/en-us/library/aa702682.aspx
http://our.umbraco.org/forum/developers/api-questions/18465-Access-Umbraco-Content-from-WCF-Service