Cancelado

ChilKat Software use in w3c XML/Soap and create w3c xmlDsig

Skilled C# programmer with good expiriance of ChilKat Software/component

Area to know

ChilKat XML component

w3c XML /Soap

w3c xmlDsig

## Deliverables

This is a scenario that describes the problem

Two programmers get the same task and works on different parts of the project.

The first two programmers result is this:

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

<en:Envelope xmlns:en="[url removed, login to view]" en:encodingStyle="[url removed, login to view]">

<en:Header>

<en:Routing Filename="[url removed, login to view]" FromSD="SK" ID="SignedRouting" MessageType="PERSON" Receiver="PALASSO" Sender="PRIO" ToSD="SK">

<en:Transforms>

<en:Transform Type="Base64" Order="1"></en:Transform>

</en:Transforms>

</en:Routing>

<en:TrackAndTrace>

<en:Track>20120202-02.20.18.0857. PRIO IP. Sending message with Id:[url removed, login to view]</en:Track>

<en:Track>[url removed, login to view] PRIO FIF (FREE_PASSAGE).</en:Track>

</en:TrackAndTrace>

<Certificate Subject="CN=[url removed, login to view], O=Försvarsmakten, C=SE" Issuer="CN=TSA CA Class C 02, OU=TSA, O=Swedish National Defence, C=SE" Thumbprint="9A3C2FAC4203AF7AB3FF83F0C0DE52B7E2CA67E6" />

<Signature xmlns="[url removed, login to view]">

<SignedInfo>

<CanonicalizationMethod Algorithm="[url removed, login to view]" />

<SignatureMethod Algorithm="[url removed, login to view]" />

<Reference URI="#SignedRouting">

<Transforms>

<Transform Algorithm="[url removed, login to view]" />

<Transform Algorithm="[url removed, login to view]" />

</Transforms>

<DigestMethod Algorithm="[url removed, login to view]" />

<DigestValue>ARsNcysEVs6aLo74Y2rdno+aeYk=</DigestValue>

</Reference>

<Reference URI="#SignedBody">

<Transforms>

<Transform Algorithm="[url removed, login to view]" />

<Transform Algorithm="[url removed, login to view]" />

</Transforms>

<DigestMethod Algorithm="[url removed, login to view]" />

<DigestValue>OmwjooF6HmlZ3XWTPcHBU1+NL2M=</DigestValue>

</Reference>

</SignedInfo>

<SignatureValue>RqiDKOQ3ZC3RXnWjf4quHW10aJV02kw6p0m5DqGmND8T5Afp+ZEj2vCywuaMwzsCD7l87TJHbZq1zUdjGToM7zexw0X3OEttS0CAxlLymnpcH+b3yf18eODzOwSJ4uQg3zXbJND3XG57mIYjHLDODdyg0kiV/s56WL8ciCUf7ng=</SignatureValue>

</Signature>

</en:Header>

<en:Body ID="SignedBody"><![CDATA[QW5kZXJzQw==]]></en:Body>

</en:Envelope>

This is an implementation of both w3c soap standard and w3c xmlDsig.

The first question:

The soap programmer have used **en** as namespace for all the soap parts. (w3c uses soap as namespace in all examples, but this programmer used en anyway )

The xmldsig programmer have no namespace prefix because he claims that that is implicit because it is within the en:Header and that tag is bounded to the the w3c namespace.

No problem when the third programer uses ChilKat XML. He write c# code to parse the XML like this:

*[url removed, login to view] envelope = new [url removed, login to view]();

[url removed, login to view](orgmsg);

[url removed, login to view] header = new [url removed, login to view]();

header = [url removed, login to view]("**en:**Header");

[url removed, login to view] routing = new [url removed, login to view]();

routing = [url removed, login to view]("**en:**Routing");

WriteToLog(" header" + [url removed, login to view]() + [url removed, login to view]);

WriteToLog(" Routing" + [url removed, login to view]() + [url removed, login to view]);

WriteToLog(" Info" + [url removed, login to view]("Info") + [url removed, login to view]);

WriteToLog(" Filename" + [url removed, login to view]("Filename") + [url removed, login to view]);

if ([url removed, login to view]("Info") && [url removed, login to view]("Info") != "" )

{

[url removed, login to view]("msginfo", [url removed, login to view]("Info"));

}

else

if ([url removed, login to view]("Filename") && [url removed, login to view]("Filename") != "")

{

[url removed, login to view]("msginfo", [url removed, login to view]("Filename"));

}*

The problem is when the next programmer likes the w3c soap namespace that w3c has in all examples. He changes the xml to:

**

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

<soap:Envelope xmlns:en="[url removed, login to view]" soap:encodingStyle="[url removed, login to view]">

<soap:Header>

<soap:Routing Filename="[url removed, login to view]" FromSD="SK" ID="SignedRouting" MessageType="PERSON" Receiver="PALASSO" Sender="PRIO" ToSD="SK">

<soap:Transforms>

<soap:Transform Type="Base64" Order="1"></soap:Transform>

</soap:Transforms>

</soap:Routing>

<soap:TrackAndTrace>

<soap:Track>20120202-02.20.18.0857. PRIO IP. Sending message with Id:[url removed, login to view]</soap:Track>

<soap:Track>[url removed, login to view] PRIO FIF (FREE_PASSAGE).</soap:Track>

</soap:TrackAndTrace>

<Certificate Subject="CN=[url removed, login to view], O=Försvarsmakten, C=SE" Issuer="CN=TSA CA Class C 02, OU=TSA, O=Swedish National Defence, C=SE" Thumbprint="9A3C2FAC4203AF7AB3FF83F0C0DE52B7E2CA67E6" />

<Signature xmlns="[url removed, login to view]">

<SignedInfo>

<CanonicalizationMethod Algorithm="[url removed, login to view]" />

<SignatureMethod Algorithm="[url removed, login to view]" />

<Reference URI="#SignedRouting">

<Transforms>

<Transform Algorithm="[url removed, login to view]" />

<Transform Algorithm="[url removed, login to view]" />

</Transforms>

<DigestMethod Algorithm="[url removed, login to view]" />

<DigestValue>ARsNcysEVs6aLo74Y2rdno+aeYk=</DigestValue>

</Reference>

<Reference URI="#SignedBody">

<Transforms>

<Transform Algorithm="[url removed, login to view]" />

<Transform Algorithm="[url removed, login to view]" />

</Transforms>

<DigestMethod Algorithm="[url removed, login to view]" />

<DigestValue>OmwjooF6HmlZ3XWTPcHBU1+NL2M=</DigestValue>

</Reference>

</SignedInfo>

<SignatureValue>RqiDKOQ3ZC3RXnWjf4quHW10aJV02kw6p0m5DqGmND8T5Afp+ZEj2vCywuaMwzsCD7l87TJHbZq1zUdjGToM7zexw0X3OEttS0CAxlLymnpcH+b3yf18eODzOwSJ4uQg3zXbJND3XG57mIYjHLDODdyg0kiV/s56WL8ciCUf7ng=</SignatureValue>

</Signature>

</soap:Header>

<soap:Body ID="SignedBody"><![CDATA[QW5kZXJzQw==]]></soap:Body>

</soap:Envelope>**

The ChilKat c# code is not working. The XML is valid, but the w3c standard interpided in another way.

How can I awoid this to happend?? is there any way that ChilKat funktions will be "immune" for namespace prefix changes?

example *GetChildWithTag("en:tag"*) instead of *GetChildWithTag("soap:tag"*). i want to use *GetChildWithTag("tag"*)

The w3c xmlDsig part is NOT done with ChilKat. The programmer used the example from MicroSoft MSDN [url removed, login to view]

The programmer used [url removed, login to view] and the xmlDsig part of the xml was done in a couple of hours.

The example xml is small. The real xml is huge. It has size at minimum 200MB and up to 1GB. (The xml contains weather forcast images etc)

I like ChilKat and uses it for many purposes. The next question is if it is possible to create the w3c xmlDsig function by combinding already existing ChillKat components.

(even if the solution requires more code than the MicroSoft MSDN example it is preferabled )

If this is NOT possible, what is your suggestion to how to use MicroSoft MSDN example together with Chilkat in the most memory effiient way.

(ChilKat is used to create the XML/Soap structure and XML just do the xmlDsig part and places it in the XML)

What sould be done:

1. Create the w3cxml/soap without the xmlDsig

2. Create XmlDsig with ChilKat components or memory efficent use MicroSoft example

3. Do a simple testprogram the uses ChilKat to extract some data from the created XML regardless of namespace (soap: vs en:)

4. Do a simple testprogram that verifies the xmlDsig using Chilkat or in a efficient way uses MicroSoft

Testcases:

1. The xml created should have a soap body that is more than 200MB

2. The namespace should in the xml should be able to be changed from soap: to any other value (replace soap: to anything: in the XML with an editor) and the veryfy and tag extract testprogram should get the same result.

Habilidades: Programación en C#, Ingeniería, Microsoft, PHP, Gestión de proyectos, Arquitectura de software, Verificación de software, Windows Desktop

Ver más: chilkat soap, tsa class, xml task editor, xml programmers, what is data structure in c, what is data in data structure, what is an algorithm, what is algorithm in data structure, what is algorithm, what is a data structure in c, what c++ programmer should know, valid w3, uses of data structure, use of data structure, use of algorithm, use algorithm, us algorithm, type of data structure in c, the n and o, standard parts library, solution algorithm, simple algorithm examples in c, simple algorithm example, rsa security, question of data structure

Información del empleador:
( 87 comentarios ) Västerås, Sweden

ID de proyecto: #2707604