[xml] Help required : xmlC14NDocDumpMemory
- From: AndrewHartley <andrew hartley bcs org uk>
- To: xml gnome org
- Subject: [xml] Help required : xmlC14NDocDumpMemory
- Date: Fri, 4 Jul 2008 02:48:18 -0700 (PDT)
When I call xmlC14NDocDumpMemory as below I get a -1 return value, and
pOutput is still NULL. Can someone please advise me on where I am going
wrong. The XML Document I am reading is below.
[code]
xmlChar* pOutput = NULL;
xmlDocPtr pXmlDoc = xmlReadMemory( pszXml, (int)strlen( pszXml ),
_T("xml"), NULL, 0 );
xmlChar* inclusive_ns_prefixes[] = {(xmlChar*)"soapenv", NULL};
xmlXPathContextPtr ctx = xmlXPathNewContext(pXmlDoc);
xmlXPathRegisterNs(ctx, (const xmlChar*)"ns1", (const
xmlChar*)"http://www.ros.ie/schemas/service/" );
xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression((const
xmlChar*)"//ns1:Operation", ctx);
xmlNodeSetPtr nodes = xpathObj->nodesetval;
result = xmlC14NDocDumpMemory( pXmlDoc, nodes, 1, inclusive_ns_prefixes,
0, &pOutput );
[/code]
[code]
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns1:Operation Id="MsgOperation" soapenv:mustUnderstand="0"
xsi:type="xsd:string" xmlns:ns1="http://www.ros.ie/schemas/service/"
xmlns:xsi="http://w
ww.w3.org/2001/XMLSchema-instance">CT1/File</ns1:Operation>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
<wsse:BinarySecurityToken EncodingType="wsse:Base64Binary"
Id="X509Token" ValueType="wsse:X509v3">
MIIEETCCAvmgAwIBAgIQG3tCyCCfRVdMcF685SAEYDANBgkqhkiG9w0BAQUFADBo
MQswCQYDVQQGEwJJRTEeMBwGA1UEChMVUmV2ZW51ZSBDb21taXNzaW9uZXJzMSAw
HgYDVQQLExdSZXZlbnVlIE9uLUxpbmUgU2VydmljZTEXMBUGA1UEAxM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oyzUrO9WG49/56c+e4v39bzBQ2Rmn8A1as7h3ljsAhzbVjVhExUZr2jB
m9FiIWXujNDYHisl+mPni5uQ1WIEMR2HxsfSxkxlRnYfbLt1OvujnDPMtjIhwR9G
QY0fKiinhJIX2IA5PMd3dNPHSMNQCHuECQ+GhvVmeQBTa5ie2w==
</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#MsgOperation">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue></ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#MsgBody">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue></ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference URI="#X509Token"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature></wsse:Security> </soapenv:Header>
<soapenv:Body Id="MsgBody"><Ct1 currency="E" formversion="7" language="E"
product="91" xsi:schemaLocation="http://www.ros.ie/schemas/ct1/v7
schema.xsd" xmlns="http://www.ros.ie/schemas/ct1/v7/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Company>
<CompanyDetails OA1="01/01/2008" OA2="31/12/2008" companyname="IrishTest"
referencenumber="6564826E"/>
<Indicate branch="false" closecompany="false" companyassociates="false"
companychanges="false" groupmember="false" periodchanged="false"
repairpriorloan="false"/>
<ExpressionOfDoubt expofdoubt="false"/>
<AdditionalNotes addnotes="false"/>
</Company>
<TradeIncome>
<ManufacturingTradingResults OM1="0" OM2="0"/>
<ManufacturingCapitalAllowances manufacturingpropertyincentive="false"/>
<ManufacturingTradingLosses ManUITFChanges="false"/>
<TradingResults OB1="0" OD1="0"/>
<NonManufacturingCapitalAllowances
nonmanufacturingpropertyincentive="false"/>
<TradingLosses NonManUITFChanges="false"/>
<ExceptedTrade ExcepTradUITFChanges="false" OD2="0"/>
<ShippingIncome OBO="0" OD7="0"/>
<ShipTradingLosses ShipIncomeUITFChanges="false"
UnallowedExpenditure="false"/>
<TonnageTax chartered75intonnage="false" tonnagetaxelected="false"
tonnagetaxgroupelect="false"/>
<ShortLeaseAssets taxationshortleaseassets="false"/>
</TradeIncome>
<RentalIncome>
<LandAndProperty OB2="0" OD5="0" rentedresidentialpremises="false"/>
<CapitalAllowances capallowpropertyincentive="false"
offsetexcesscapallow="false"/>
</RentalIncome>
<InvestmentIncome>
<InterestInState OD3="0" OD6="0"/>
<OtherIncome OD4="0" OD8="0"/>
<Foreign OF5="0"/>
<ForeignLifeOffshore foreignlife="false" offshore="false"
offshoreproducts="false"/>
<ForeignDeposits foreignbankdeposits="false"/>
<DividendWithholdingTax divwithtax="false"/>
</InvestmentIncome>
<CapitalGains>
<AssetsDisposed agrilanddispconn="false" commpremisesdispconn="false"
otherassetsdispconn="false" respremisesdispconn="false"
sharesquoteddispconn="false" sharesunquoteddispconn="false"/>
<Acquisitions armslength="false" chargeableatlower="0"/>
<ChargeableAssetsAcquired assetsacquired="false"/>
</CapitalGains>
<CapitalGainsOnLand>
<AssetsDisposed commpremisesdispconn="false" devlanddispconn="false"
otherassetsdispconn="false" respremisesdispconn="false"
sharesdispconn="false" sharesunquoteddispconn="false"/>
<Acquisitions armslength="false"/>
</CapitalGainsOnLand>
<DeductionsReliefs>
<ReliefsCT OR3="0"/>
<Credits researchdevcredit="false" taxexemptprofits="false"/>
</DeductionsReliefs>
<Surcharges>
<SurchargesSection440 OV1="0" OV2="0"/>
</Surcharges>
<LtdCpyLess250>
<Income accperiodfrom="01/01/2008" accperiodto="31/12/2008" govrecips="0"
otherinc="0" salesandrecip="0"/>
<tradaccitemless250 grosstp="0"/>
<expdeductless250 cntrctrs="0" swscosts="0"/>
<balcapless250 blocredit="0" sharefunds="0"/>
</LtdCpyLess250>
<AdjustLess250>
<AdjustProfComp netprofacct="0"/>
</AdjustLess250>
<AccountDetails>
<AccTurnDetails alrsubmit="false" lessquarterm="true"/>
</AccountDetails>
<AccountNotes>
<AuditRepOpinion adverseop="false" disclaimop="false" empofmatter="false"
qualifiedop="false"/>
<Change chngother="false" ntsdeprec="false" ntsstocks="false"
prpdevelop="false"/>
<PriorYear pradjust="false"/>
<ChangeAct activities="false"/>
<Exceptional excepitem="false"/>
<ExtraNotes notesbox=""/>
</AccountNotes>
<CalculationSummary>
<Section1085Restriction indicaterestriction="false"/>
<NoticeOfAssessment shortnoarequested="false"/>
</CalculationSummary>
</Ct1> </soapenv:Body>
</soapenv:Envelope>
[/code]
--
View this message in context:
http://www.nabble.com/Help-required-%3A-xmlC14NDocDumpMemory-tp18276343p18276343.html
Sent from the Gnome - Lib - Xml - General mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]