X3D Seems To Only Run Through Half The Loop - x3d

I have a java program that outputs through JAXB an X3D file. Here is the current output.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<X3D version="1.0" profile="Full">
<head>
<meta name="Sim3DAnimator" content="jaxbtext.x3d"/>
</head>
<Scene>
<WorldInfo info="by Patrick R. Aquilone" title="Testing Simu 3D Animator"/>
<DirectionalLight ambientIntensity="1.0" intensity="1.0"/>
<Viewpoint orientation="0.0 0.0 0.0 90.0" position="0.0 10.0 100.0" description="SIM3D"/>
<Transform>
<Transform scale="1 1 1" translation="0.000000 0.000000 0.000000" DEF="person">
<Transform rotation="0 1 0 0.000000">
<Transform rotation="0 0 1 0.000000">
<Transform rotation="1 0 0 0.000000">
<Transform>
<MetadataString value="test"/>
<Transform scale="1 1 1" translation="0.000000 25.200000 0.000000">
<Shape>
<Sphere radius="8.0"/>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
</Shape>
</Transform>
<Transform rotation="0 0 1 1.570800" scale="1 1 1" translation="0.000000 13.200000 0.000000">
<Shape>
<Cylinder height="16.0" radius="1.0"/>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
</Shape>
</Transform>
<Transform scale="1 1 1" translation="0.000000 13.200000 0.000000">
<Shape>
<Cylinder height="16.0" radius="1.0"/>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
</Shape>
</Transform>
<Transform scale="1 1 1" translation="9.600000 3.000000 0.000000">
<MetadataString value="test-right-arm"/>
<Transform translation="0.000000 10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 0.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Cylinder height="21.0" radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 -10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
</Transform>
<Transform scale="1 1 1" translation="-9.600000 3.000000 0.000000">
<MetadataString value="test-left-arm"/>
<Transform translation="0.000000 10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 0.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Cylinder height="21.0" radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 -10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
</Transform>
<Transform scale="1 1 1" translation="5.000000 -24.000000 0.000000">
<MetadataString value="test-right-leg"/>
<Transform translation="0.000000 10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 0.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Cylinder height="21.0" radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 -10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
</Transform>
<Transform scale="1 1 1" translation="-5.000000 -24.000000 0.000000">
<MetadataString value="test-left-leg"/>
<Transform translation="0.000000 10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 0.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Cylinder height="21.0" radius="2.5"/>
</Shape>
</Transform>
<Transform translation="0.000000 -10.500000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="2.5"/>
</Shape>
</Transform>
</Transform>
<Transform scale="1 1 1" translation="0.000000 0.000000 0.000000">
<MetadataString value="test-torso"/>
<Transform translation="0.000000 12.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="5.0"/>
</Shape>
</Transform>
<Transform translation="0.000000 0.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Cylinder height="24.0" radius="5.0"/>
</Shape>
</Transform>
<Transform translation="0.000000 -12.000000 0.000000">
<Shape>
<Appearance>
<Material ambientIntensity="0.5" diffuseColor="0.500000 0.500000 0.500000"/>
</Appearance>
<Sphere radius="5.0"/>
</Shape>
</Transform>
</Transform>
</Transform>
</Transform>
</Transform>
</Transform>
<PositionInterpolator keyValue=" 0 0 0 10 0 0 20 0 0 30 0 0 40 0 0 50 0 0 60 0 0 70 0 0 80 0 0 90 0 0 100 0 0 90 0 0 80 0 0 70 0 0 60 0 0 50 0 0 40 0 0 30 0 0 20 0 0 10 0 0" key=" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19" DEF="person-position"/>
<TimeSensor cycleInterval="1.0" loop="true" DEF="person-time"/>
<ROUTE fromNode="person-time" fromField="fraction_changed" toNode="person-position" toField="set_fraction"/>
<ROUTE fromNode="person-position" fromField="value_changed" toNode="person" toField="set_translation"/>
</Transform>
</Transform>
</Scene>
</X3D>
My problem is that you can see that the interpolation accounts for 20 points but when it runs it only runs through half of them and then snaps back to the beginning. I don't understand why it stops at the 10th interval. I know I missed something but what?
BTW, I am new so anything you see that I can fix, go ahead and let me know.
Thanks in advance.

fraction_changed outputs values between 0 and 1. The key of PositionInterpolator has integer values starting from 0 to 20. This means that only the first (0) and second (1) value will be active whenever the TimeSensor starts/ends. Basically your transform will be translated 5 times to (0,0,0) and 5 times to (10, 0, 0) alternatively.
To achieve what you want you have to change the array of keys to something like:
key [0 0.05 0.10 0.15 .... 0.95 1]
or route person-time.time to person-position.set_fraction. This will go through all the key values once.
It should work this way.

Related

Join XML columns from SQL Server 2016+

I have a TABLE_A with an XML column mycategoryXML which contains this XML:
<mainxml>
<category id="1" ftype="1"/>
<category id="2" ftype="1"/>
<category id="3" ftype="1"/>
</mainxml>
I also have another TABLE_B with a XML column called mymappedids
<mapids>
<ids>
<myid id="1" name="Category Name1"/>
<myid id="2" name="Category Name2"/>
<myid id="3" name="Category Name3"/>
<myid id="4" name="Category Name4"/>
<myid id="5" name="Category Name5"/>
<myid id="6" name="Category Name6"/>
<myid id="7" name="Category Name7"/>
<myid id="8" name="Category Name8"/>
<myid id="9" name="Category Name9"/>
</ids>
</mapids>
Is it possible to select all Category nodes from TABLE_A and also the correct names for each category from table_B, so I ultimately get the follow result:
id | categoryid | categoryname
---+------------+-------------
1 | 1 | categoryname1
2 | 2 | categoryname2
3 | 3 | categoryname3
with one query from SQL Server?
There are several approaches but you did not tell us enough about your background.
Especially unclear: How is the connection between these two tables a and b?
You might try something along this:
A mockup scenario to simulate your issue (please provide this yourself in your next question):
DECLARE #tblA TABLE(aId INT,Xml1 XML);
DECLARE #tblB TABLE(bId INT,Xml2 XML);
INSERT INTO #tblA(aId,Xml1) VALUES
(100
,N'<mainxml>
<category id="1" ftype="1"/>
<category id="2" ftype="1"/>
<category id="3" ftype="1"/>
</mainxml>');
INSERT INTO #tblB(bId,Xml2) VALUES
(200
,N'<mapids>
<ids>
<myid id="1" name="Category Name1"/>
<myid id="2" name="Category Name2"/>
<myid id="3" name="Category Name3"/>
<myid id="4" name="Category Name4"/>
<myid id="5" name="Category Name5"/>
<myid id="6" name="Category Name6"/>
<myid id="7" name="Category Name7"/>
<myid id="8" name="Category Name8"/>
<myid id="9" name="Category Name9"/>
</ids>
</mapids>');
--The query
SELECT a.aId
,aXmlValues.*
,(SELECT Xml2.value('(/mapids
/ids
/myid[#id=sql:column("aXmlValues.CategoryId")]
/#name)[1]','nvarchar(max)')
FROM #tblB b
WHERE bID=200 /*however you find this...*/) AS CategoryName
FROM #tblA a
CROSS APPLY a.Xml1.nodes('/mainxml/category') aXml(c)
CROSS APPLY(SELECT aXml.c.value('#id','int') AS CategoryId
,aXml.c.value('#ftype','int') AS CategoryType) aXmlValues;
The idea in short:
We use APPLY ... .nodes() to get the categories of table "a" in separate rows (a derived set).
now we can use APPLY again. This is a trick to get the XML's value into the result set as a normal column.
This column can be placed into XQuery against table "b" using sql:column().
I assume you likely want something like this:
DECLARE #XML1 xml = '<mainxml>
<category id="1" ftype="1"/>
<category id="2" ftype="1"/>
<category id="3" ftype="1"/>
</mainxml>';
DECLARE #XML2 xml = '<mapids>
<ids>
<myid id="1" name="Category Name1"/>
<myid id="2" name="Category Name2"/>
<myid id="3" name="Category Name3"/>
<myid id="4" name="Category Name4"/>
<myid id="5" name="Category Name5"/>
<myid id="6" name="Category Name6"/>
<myid id="7" name="Category Name7"/>
<myid id="8" name="Category Name8"/>
<myid id="9" name="Category Name9"/>
</ids>
</mapids>';
SELECT X1.c.value('#id','int') AS id,
X2.mi.value('#id','int') AS categoryid, --Seem silly to have this value twice
X2.mi.value('#name','varchar(30)') AS categoryname
FROM (VALUES(#XML1)) V1(X)
CROSS APPLY (VALUES(#XML2)) V2(X)
CROSS APPLY V1.X.nodes('/mainxml/category')X1(c)
CROSS APPLY V2.X.nodes('/mapids/ids/myid')X2(mi)
WHERE X1.c.value('#id','int') = X2.mi.value('#id','int');

How to increase performance for linked server to ms-Access?

how to make better performence for sql server linked server to ms access database?
a select query takes longer then sql equal table and original query in ms-access.
the query does not cache so its about the same time after running many times.
profiler:
linked server: 2 reads, 1079 CPU, 2584 duration.
sql table: 5956 reads, 32 CPU, 1379 duration.
why there is so little reads?, more CPU?
execution Plan:
linkedSserver:
<Statements>
<StmtSimple StatementCompId="1" **StatementEstRows**="10000" StatementId="1" StatementOptmLevel="FULL" CardinalityEstimationModelVersion="120" StatementSubTreeCost="3.36333" StatementText="select X from XXX" StatementType="SELECT" QueryHash="0x866F5A3CDCB9B9E0" QueryPlanHash="0x8FFAA09874A2CFDF" RetrievedFromCache="true">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan DegreeOfParallelism="0" NonParallelPlanReason="NoParallelPlansInDesktopOrExpressEdition" CachedPlanSize="24" CompileTime="115" CompileCPU="105" CompileMemory="112">
<MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="838814" EstimatedPagesCached="52425" EstimatedAvailableDegreeOfParallelism="1" />
<RelOp AvgRowSize="23" EstimateCPU="3.36333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" **EstimateRows**="10000" LogicalOp="Remote Scan" NodeId="0" Parallel="false" PhysicalOp="Remote Scan" EstimatedTotalSubtreeCost="3.36333">
<OutputList>
<ColumnReference Server="[MyLinkedServer]" Table="[XXX]" Column="X" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" **ActualRows**="100000" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<RemoteScan RemoteSource="MyPath\Ari1.Mdb" RemoteObject="XXX" />
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
sql table:
<Statements>
<StmtSimple StatementCompId="1" **StatementEstRows**="100000" StatementId="1" StatementOptmLevel="TRIVIAL" CardinalityEstimationModelVersion="120" StatementSubTreeCost="4.52143" StatementText="select X from XXX" StatementType="SELECT" QueryHash="0xFF5860851E080CA1" QueryPlanHash="0xAC44A8F064D60D2E" RetrievedFromCache="true">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan DegreeOfParallelism="0" NonParallelPlanReason="NoParallelPlansInDesktopOrExpressEdition" CachedPlanSize="16" CompileTime="0" CompileCPU="0" CompileMemory="104">
<MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="838814" EstimatedPagesCached="52425" EstimatedAvailableDegreeOfParallelism="1" />
<RelOp AvgRowSize="23" EstimateCPU="0.110079" EstimateIO="4.41135" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" **EstimateRows**="100000" LogicalOp="Table Scan" NodeId="0" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="4.52143" TableCardinality="100000">
<OutputList>
<ColumnReference Database="[DBName]" Schema="[dbo]" Table="[XXX]" Column="X" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" **ActualRows**="100000" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[DBName]" Schema="[dbo]" Table="[XXX]" Column="X" />
</DefinedValue>
</DefinedValues>
<Object Database="[DBName]" Schema="[dbo]" Table="[XXX]" IndexKind="Heap" Storage="RowStore" />
</TableScan>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
why Estimated values are constant?

XSD for two complex types

I am using File adapter (SOA 11.1.1.1.7) to read the content of a file and the file looks like this
a|b|c|d|e
a|b|c|d|e
a|b|c|d|e
a|b|c|d|e
a|b|c|d|e
Total no of rows 5
For reading this , I need to create a xsd.My problem lies in the last line (
Total no of rows 5). Guys could you please help me in creating the xsd.My current xsd looks like this..which is not working. Please help
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/File_Outbound_Ref"
targetNamespace="http://TargetNamespace.com/File_Outbound_Ref"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="US-ASCII"
nxsd:hasHeader="true"
nxsd:headerLines="1"
nxsd:headerLinesTerminatedBy="${eol}"
>
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Data_Details" type="tns:DataReport" nxsd:style="array" />
<xsd:element name="Trailor_Details" type="tns:Trailor_Record" nxsd:style="array" nxsd:cellSeparatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="DataReport">
<xsd:sequence>
<xsd:element name="a" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy=""" />
<xsd:element name="b" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy=""" />
<xsd:element name="c" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy=""" />
<xsd:element name="d" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy=""" />
<xsd:element name="e" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Trailor_Record"> <xsd:sequence>
<xsd:element name="Row_Count" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
In Read file action, under "Configure Operation" we have "Remove Trailer" option and enable it and mention the number of row. So in your case you need one last row to remove so mention 1.

How To Generate SAML2Response Specified By Destination

I am very new to SAML and am very confused at this point. I am using Kentor to generate a Saml2Response, but it is not looking anything like my relying party is expecting. They are specifically looking for the certificate to be embedded in the response.
I need to generate this.
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" ID="_09f6a725ecf844128a5f7ef8cc1e7620"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_09f6a725ecf844128a5f7ef8cc1e7620" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>[removed]</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
</saml2p:Status>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_cadd3488f62c6d3b9933fdb56d9e8ddc"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">[removed]</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_cadd3488f62c6d3b9933fdb56d9e8ddc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>CN=, O=, C=US</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" NameQualifier="com.sms">0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData NotBefore="2013-12-11T03:47:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z" />
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2013-12-11T03:52:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" />
<saml2:AuthnStatement AuthnInstant="2013-12-11T03:52:21.770Z" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute Name="AppData" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
What I am getting from Kentor is this:
<?xml version="1.0"?>
<saml2p:Response
Destination="https://[destinationUrl]"
ID="ide5470d1f5a9a48d1822f71ea5a5363f2"
IssueInstant="2015-05-28T13:35:44Z"
Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
ritterim.com
</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="#ide5470d1f5a9a48d1822f71ea5a5363f2">
<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>7YmTpqZR6Ba4/eDrEqQt7BGit0A=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
</SignatureValue>
</Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion ID="_77b39d8e-bcc4-48c2-b6c7-fe6e87414461"
IssueInstant="2015-05-28T13:35:44Z" Version="2.0"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Issuer>ritterim.com</saml2:Issuer>
<saml2:Subject>
<saml2:NameID>0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
</saml2:Subject>
<saml2:Conditions NotOnOrAfter="2015-05-28T13:37:44Z"/>
<saml2:AttributeStatement>
<saml2:Attribute Name="AppData">
<saml2:AttributeValue>A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
Any help would be appreciated, as I'm not even sure I'm in the right arena.
I'll answer by commenting on the differences in the responses.
There's no encoding in the xml declaration. Probably won't matter.
Issuer, which is optional is added.
I assume you've removed the SignatureValue from the AuthServices response.
AuthServices currently does not include the KeyInfo in the signature (it's optional)
AuthServices does not sign the assertion, only the response.
XML namespaces declarations are put in one place by AuthServices and not repeated all over.
There's no Format on the Subject NameId (it's optional)
There's no NameQualifier on the Subject NameId (it's optional)
There's no NameFormat on the Attribute (it's optional)
There's no xml type (xsi:string) on the AttributeValue (it's optional)
Basically Kentor.AuthServices leaves out a bunch of optional stuff, but otherwise the messages are equivalent.
You'll have to provide more details on what things are causing problems to get help on those.

SQL Server xml.modify delete method

I have a problem with removing an attribute from a node.
Example:
DECLARE #processID int
SET #processID = 8
DECLARE #xml XML
SET #xml =
'<Process id="10" name="Test 1">
<Shapes>
<Shape id="1" name="Shape 1" subProcessID="8">
</Shape>
<Shape id="2" name="Shape 2" subProcessID="9">
</Shape>
</Shapes>
<Lines />
</Process>'
SET #xml.modify('delete (/Process/Shapes/Shape/#subProcessID[/Process/Shapes/Shape/#subProcessID = sql:variable("#processID")])')
SELECT #xml
Gives the result:
<Process id="10" name="Test 1">
<Shapes>
<Shape id="1" name="Shape 1" />
<Shape id="2" name="Shape 2" />
</Shapes>
<Lines />
</Process>
What I would like is:
<Process id="10" name="Test 1">
<Shapes>
<Shape id="1" name="Shape 1" />
<Shape id="2" name="Shape 2" subProcessID="9" />
</Shapes>
<Lines />
</Process>
What is the syntax to achieve this?
As the OP is gone but he left the solution in a comment let me add that as an answer:
DECLARE #processID int
SET #processID = 8
DECLARE #xml XML
SET #xml =
'<Process id="10" name="Test 1">
<Shapes>
<Shape id="1" name="Shape 1" subProcessID="8">
</Shape>
<Shape id="2" name="Shape 2" subProcessID="9">
</Shape>
</Shapes>
<Lines />
</Process>'
SET #xml.modify('delete (/Process/Shapes/Shape[#subProcessID = sql:variable("#processID")]/#subProcessID)')
SELECT #xml
Here is a working sqlfiddle for that.

Resources