Fhir , slicing based on the value of an extension - hl7-fhir

is there a way to define a slicing based on the value of an extension on top of each element of a collection? example: Procedure.bodySite
<element id="Procedure.bodySite">
<path value="Procedure.bodySite" />
<slicing>
<discriminator>
<type value="value" />
<path value="bodySite.extension("http://a/ext").value" />
</discriminator>
<rules value="open" />
</slicing>
</element>
<element id="Procedure.bodySite.extension">
<path value="Procedure.bodySite.extension" />
<slicing>
<discriminator>
<type value="value" />
<path value="url" />
</discriminator>
<rules value="open" />
</slicing>
</element>
<element id="Procedure.bodySite.extension:myExtension">
<path value="Procedure.bodySite.extension" />
<sliceName value="myExtension" />
<type>
<code value="Extension" />
<profile value="http://a/ext" />
</type>
</element>
<element id="Procedure.bodySite:sliceBodySite">
<path value="Procedure.bodySite" />
<sliceName value="sliceBodySite" />
<max value="1" />
</element>
<element id="Procedure.bodySite:sliceBodySite.text">
<path value="Procedure.bodySite.extension" />
<fixedBoolean value="true" />
</element>
the result is : Unable to resolve discriminator in definitions: bodySite.extension('http://a/ext').value
so what is the problem here?

You can use .extension("url") as part of the path in a discriminator. So you can slice by value with a discriminator path of:
bodySite.extension("http://your/extension/url/here").value

Related

Jasper Report how to get a sibling node with parameter of another sibling?

I am working on a new Jaspert Report. It should print all data of a xml text.
The xml text looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<invoice:invoiceMessage>
<invoice>
<invoiceIdentification></invoiceIdentification>
<seller>
<address>
<name></name>
<city></city>
<cityCode></cityCode>
</address>
</seller>
</invoice>
</invoice:invoiceMessage>
And the Jasper Report looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 7.1.0.final using JasperReports Library version 6.4.3 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="main_report_xml1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="24a4119c-6e8f-4411-bbb5-c069ab379330">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<property name="ireport.jasperserver.url" value="http://10.100.10.236/jasperserver-pro/"/>
<property name="ireport.jasperserver.user" value="reko"/>
<property name="ireport.jasperserver.reportUnit" value="/Reko/main_report_xml1"/>
<subDataset name="pageHeader" uuid="cf87fcbb-cbcd-4c3b-bf87-3cf147854adb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<queryString language="xPath">
<![CDATA[//seller/address]]]>
</queryString>
<field name="name" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="name"/>
<fieldDescription><![CDATA[name]]></fieldDescription>
</field>
<field name="streetAdressOne" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="streetAdressOne"/>
<fieldDescription><![CDATA[streetAdressOne]]></fieldDescription>
</field>
<field name="cityCode" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="cityCode"/>
<fieldDescription><![CDATA[cityCode]]></fieldDescription>
</field>
<field name="city" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="city"/>
<fieldDescription><![CDATA[city]]></fieldDescription>
</field>
</subDataset>
<parameter name="xmlString" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[xmlText]]></defaultValueExpression>
</parameter>
<parameter name="XML_INPUT_STREAM" class="java.io.InputStream">
<defaultValueExpression><![CDATA[new java.io.ByteArrayInputStream($P{xmlString}.getBytes("ISO-8859-1"))]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/invoiceMessage/invoice[invoiceIdentification/entityIdentification=9000009029]]]>
</queryString>
<field name="value" class="java.lang.String">
<fieldDescription><![CDATA[creationDateTime]]></fieldDescription>
</field>
<pageHeader>
<band height="38"/>
</pageHeader>
<columnHeader>
<band height="31" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="488" splitType="Stretch">
<componentElement>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="21" width="552" height="30" isRemoveLineWhenBlank="true" uuid="fc7d22c7-8c60-4ecb-974f-c842becc4bf7"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="pageHeader" uuid="1e20fa2b-bb3a-475f-b721-5a13d3c374eb">
<datasetParameter name="XML_DATE_PATTERN">
<datasetParameterExpression><![CDATA[$P{XML_DATE_PATTERN}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_NUMBER_PATTERN">
<datasetParameterExpression><![CDATA[$P{XML_NUMBER_PATTERN}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_LOCALE">
<datasetParameterExpression><![CDATA[$P{XML_LOCALE}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_TIME_ZONE">
<datasetParameterExpression><![CDATA[$P{XML_TIME_ZONE}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//*[entityIdentification=9000009029]/parent::*/seller")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="30">
<textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="552" height="15" uuid="eac696b9-e20f-48a3-b70d-b186f5e649d6"/>
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
</jasperReport>
My question is:
What should my dataSourceExpression in the componentElement be, so I can get the data out of it?
I also have some data in the invoice node that I need to show and thats why i set it like this in the query string. And I need to filter by the parameter that is stored inside of invoiceIdentification node.

how to delete all the line items from the file after the first one

I need to delete all the line items <LineItem> from the file which does not suffice with this requirements:
elements in Line Item : <LineItemNumber V="00000000000000000010" /> and <PurchaseOrderNumber V="0100230946|00010" /> have to be matched, another words in integer Line Item Number would be 10 and Purchase order number after pipe line | would be 10. we need to have only one those line Items which are matching this requirement. Sorry, i'm really bad at describing.
<Transmission>
<InterchangeUsageIndicator V="T" />
<Groups>
<Group>
<GroupSenderID V="CCC" />
<TotalNumberOfShipmentsInGroup V="000005" />
<Documents>
<Document>
<DocumentHeader>
<InvoiceChargeType V="T" />
<DocumentType V="ORDER" />
<DocumentProcessingCode C="00" />
<BOLNumber V="BOL2309460180582136" />
<AlternateQuantities>
<AlternateQuantity Quantity="12.0" UOM="PK" UOMType="SQ" Characteristic="" />
</AlternateQuantities>
<Buyer Name="" Q="ZP" ID="COUSPO001">
<AlternateIDs />
</Buyer>
<Seller Name="" Q="2" ID="CNTR">
<AlternateIDs />
</Seller>
<Parties>
<Party PartyType="SF">
<Name V="SHA" />
<LocationID Q="" ID="" />
<AlternateLocationIDs>
<LocationID Q="" ID="SHA" />
</AlternateLocationIDs>
<City V="Shanghai" />
<Country V="CN" />
<LocationPurpose V="" />
</Party>
<Party PartyType="ST">
<Name V="LEB" />
<LocationID Q="" ID="" />
<AlternateLocationIDs>
<LocationID Q="" ID="LEB" />
</AlternateLocationIDs>
<City V="Lebanon" />
<Country V="TN" />
<LocationPurpose V="" />
</Party>
<Party PartyType="VN">
<Name V="YANGZHOU BAOYI SHOES" />
<LocationID Q="" ID="4100000423" />
<AlternateLocationIDs />
<City V="JIANGSU" />
<Country V="CN" />
<LocationPurpose V="" />
</Party>
</Parties>
<DateReferences>
<DR Type="D" Q="ETA" Date="2019-12-19" />
<DR Type="D" Q="EST" Date="2019-11-28" />
</DateReferences>
<ReservedReferences>
<RR Type="R" Q="K6" V="86|SEAL230946" />
<RR Type="R" Q="V3" V="VYG230946|BKG230946" />
</ReservedReferences>
</DocumentHeader>
<Vessel VesselName="VSL230946" VesselNumber="" VesselCountryOfRegistration="" VesselRegistrationNumber="" />
<Equipments>
<Equipment Initial="CNTR" Number="230946" Length="0" Type="" TotalContainerVolume="52.06" />
</Equipments>
<LineItems>
<LineItem>
<LineItemNumber V="00000000000000000010" />
<LineItemType C="LI" />
<TransportationServiceCode Code="" />
<PurchaseOrderNumber V="0100230946|00010" />
<AdditionalReferenceNumber V="" />
<DescriptionMarksAndNumbers>
<CommodityCode Q="" C="M9160" />
<BuyerProductID V="" />
</DescriptionMarksAndNumbers>
<BilledRatedAsQuantity V="0.0" UOM="PA" />
<LadingQuantity V="0.0" UOM="PA" />
<LineItemTotalAmount V="0.0" />
<LineItemWeight V="0.00" />
<LineItemVolume V="0.00" />
</LineItem>
<LineItem>
<LineItemNumber V="00000000000000900001" /> //this one would not work,because it is 900001
<LineItemType C="LI" />
<LineItemSubType C="SCH" />
<TransportationServiceCode Code="" />
<PurchaseOrderNumber V="0100230946|00010" />
<AdditionalReferenceNumber V="" />
<DescriptionMarksAndNumbers>
<CommodityCode Q="" C="M9160" />
<BuyerProductID V="" />
</DescriptionMarksAndNumbers>
<BilledRatedAsQuantity V="24.0" UOM="PA" />
<LadingQuantity V="24.0" UOM="PA" />
<LineItemTotalAmount V="0.0" />
<UserDefinedReferences>
<UDR Type="U" Q="CR" V="22859470896|001|0001" Description="" />
<UDR Type="U" Q="S6" V="|3|20" Description="" />
<UDR Type="U" Q="19" V="M9160|USDS|0001" Description="" />
</UserDefinedReferences>
<LineItemWeight V="2959.54" />
<LineItemVolume V="104.12" />
</LineItem>
<LineItem>
<LineItemNumber V="00000000000000900002" />
<LineItemType C="LI" />
<LineItemSubType C="SCH" />
<TransportationServiceCode Code="" />
<PurchaseOrderNumber V="0100230946|00010" />
<AdditionalReferenceNumber V="" />
<DescriptionMarksAndNumbers>
<CommodityCode Q="" C="M9160" />
<BuyerProductID V="" />
</DescriptionMarksAndNumbers>
<BilledRatedAsQuantity V="24.0" UOM="PA" />
<LadingQuantity V="24.0" UOM="PA" />
<LineItemTotalAmount V="0.0" />
<UserDefinedReferences>
<UDR Type="U" Q="CR" V="22859470902|001|0002" Description="" />
<UDR Type="U" Q="S6" V="|3.5|20" Description="" />
<UDR Type="U" Q="19" V="M9160|USDS|0001" Description="" />
</UserDefinedReferences>
<LineItemWeight V="2959.54" />
<LineItemVolume V="104.12" />
</LineItem>
I tried to start on LINQ: this is where I got so far:
try {
var xDoc = XDocument.Parse(msg.Body);
var xDocument = xDoc.Root.XPathSelectElement("Groups/Group/Documents/Document");
var xLineItems = xDocument.XPathSelectElements("LineItems/LineItem");
var poNumbers = xLineItems.Select(e => (string)e.Element("PurchaseOrderNumber").Attribute("V")).Distinct();
foreach (var poNumber in poNumbers) {
}
msg.Body = xDoc.ToString();
I believe you would like to Delete all LineItem where LineItemNumber!=10 and PurchaseOrderNumber after the Pipe NOT equals 10. You could use Linq to filter the elements that match the purpose and use the Remove method to deletes the selected nodes.
var xDoc = XDocument.Parse(xml);
xDoc.Descendants("LineItem")
.Where(x=> Convert.ToInt32(x.Element("LineItemNumber").Attribute("V").Value)!=10
&& Convert.ToInt32(x.Element("PurchaseOrderNumber").Attribute("V").Value.Split('|')[1])!=10
).Remove();
var result = xDoc.ToString();

Passing a bearer token in a 'Web Test' without Visual Studio?

I want to import a ".webtest" in Azure's Application Insights availability feature. I dont have a test edition of Visual Studio, but this MSDN article suggests using Fiddler as another option to creating web tests.
I need to perform 2 requests on a REST API:
Request a bearer token from the connect/token endpoint.
Perform a GET at api/resources with the bearer token (retrieved from the above request) in the header.
It's a typical client credentials OAuth 2 flow.
I cannot seem to figure out how to do this with Fiddler. Basically I need to extract a value from the response body of request 1 and use it as the header value in request 2.
This is what the web test looks like without passing the token:
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
Assuming this comes back as the following example you can use a regex extraction to get it.
{"token_type":"Bearer","scope":"user_impersonation","expires_in":"3600 ... "access_token":"{{TOKEN}}", ...}
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
To compliment James Davis's answer, if you need to login to https://yourapp.com/auth/login by posting the JSON:
{
user: 'youruser',
password: 'yourpassword'
}
first base64 encode the json:
> echo "{user: 'youruser', password: 'yourpassword'}" | base64
e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K
Then pass this base64 value in a StringHttpBody tag
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="login-healthcheck" Id="e91b6e1d-3fa0-475f-a18b-b694b463589c" Owner="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
<Items>
<Request Method="POST" Guid="ef9d1d00-5663-476a-a3cb-ccf49c4d2229" Version="1.1" Url="https://yourapp.com/auth/login" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Content-Type" Value="application/json" />
</Headers>
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<StringHttpBody ContentType="application/json" InsertByteOrderMark="False">e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K</StringHttpBody>
</Request>
<Request Method="GET" Guid="d566422f-af74-47bf-90aa-0c66db6ef567" Version="1.1" Url="https://yourapp.com/api/v1/healthcheck" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</WebTest>
Worked for me on Azure Application Insights Availability checking

Where can i find VMARGS in IBM WAS 8.5

I have installed IBM WAS 8.5 During startup I can see in the console
<?xml version="1.0" ?>
<verbosegc xmlns="http://www.ibm.com/j9/verbosegc" version="R26_Java626_SR2_20120322_1722_B106210_CMPRSS">
<initialized id="1" timestamp="2016-07-26T11:55:01.392">
<attribute name="gcPolicy" value="-Xgcpolicy:gencon" />
<attribute name="maxHeapSize" value="0x60000000" />
<attribute name="initialHeapSize" value="0x60000000" />
<attribute name="compressedRefs" value="true" />
<attribute name="compressedRefsDisplacement" value="0x0" />
<attribute name="compressedRefsShift" value="0x0" />
<attribute name="pageSize" value="0x1000" />
<attribute name="requestedPageSize" value="0x1000" />
<attribute name="gcthreads" value="12" />
<attribute name="numaNodes" value="0" />
<system>
<attribute name="physicalMemory" value="17100500992" />
<attribute name="numCPUs" value="12" />
<attribute name="architecture" value="amd64" />
<attribute name="os" value="Windows 7" />
<attribute name="osVersion" value="6.1" />
</system>
<vmargs>
<vmarg name="-Xoptionsfile=C:\Program Files (x86)\IBM\WebSphere\AppServer\java\jre\bin\compressedrefs\options.default" />
<vmarg name="-Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword..." />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/MethodType" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/MethodHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/CollectHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ConstructorHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ConvertHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ArgumentConversionHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/AsTypeHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ExplicitCastHandle" />
<vmarg name="-Xlockword:noLockword=ja
….rest is removed for brevity.
Where these vmargs are set and in which file ? I need to edit one of vmarg.
Thanks Scott.I got in to an issue like below.
There is missing ‘=’ i.e equal sign between the key and value
…..
<vmarg name="-Djava.security.auth.login.config=C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS/properties/wsjaas...." />
<vmarg name="-Djava.security.policyC:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS/properties/server.policy" /> <vmarg name="-Dsun.java.command=com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runt..." />
<vmarg name="-Dsun.java.launcher=SUN_STANDARD" />
<vmarg name="_port_library" value="000007FEF4267A40" />
<vmarg name="_bfu_java" value="000007FEF4268FD8" />
<vmarg name="_org.apache.harmony.vmi.portlib" value="00000000002C0930" />
</vmargs>
</initialized>
Insufficient Java 2 security permissions to start the process!
java.security.policy = null
CodeSource for bootstrap.jar = ProtectionDomain
CodeSource=CodeSource, url=file:/C:/Program%20Files%20(x86)/IBM/WebSphere/AppServer/lib/bootstrap.jar, <no certificates>
ClassLoader=sun.misc.Launcher$AppClassLoader#c630ab9f
<no principals>
The file you're looking for is server.xml. You can find this inside your configuration folder, at the following location.
C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS\config\cells\<CELL_NAME>\nodes\<NODE_NAME>\servers\<SERVER_NAME>\server.xml
Open up server.xml using a text editor, and find the 'jvmEntries' id. It should like the example given below.
<jvmEntries xmi:id="JavaVirtualMachine_1183122130078" verboseModeClass="false" verboseModeGarbageCollection="true" verboseModeJNI="false" initialHeapSize="1280" maximumHeapSize="2048" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="-Xdisableexplicitgc -Djava.awt.headless=true">
</jvmEntries>
Your JVM arguments should be listed under the genericJvmArguments section. Modify the values and start the server.
Additional note: As you have installed WAS to the 'Program Files (x86)' folder, you will need an account with administrator privileges to run the server.

How to validate against schema for namespace, not complete document?

I have a document like this:
<d:block xmlns:d="D" xmlns:b="B" xmlns="default" name="popover">
<d:description>...</d:description>
<d:sample>
<b:popover>
...some b:stuff...
</b:popover>
</d:sample>
</d:block>
Schema for this document looks like:
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<element name="block" ns="D">
<attribute name="name"/>
<element name="description">
<text/>
</element>
<element name="sample">
<ref name="anything"/>
</element>
</element>
</start>
<define name="anything">
<element>
<anyName>
<except>
<nsName ns="D"/>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="anything"/>
</choice>
</zeroOrMore>
</element>
</define>
</grammar>
"Anything" literally means anything but D-namespaced.
And I want to create another schema for B namespace to use it against any arbitrary XML containing B:namespace.
How to create Schema for the namespace, not for the complete document?
Can't get this.
A kind of schema like that should work. You just have to define the elements for B namespace in the define element named BElements.
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="anythingOrB"/>
</start>
<define name="anythingOrB">
<choice>
<ref name="BElements"/>
<ref name="anythingExceptB"/>
</choice>
</define>
<define name="anythingExceptB">
<element>
<anyName>
<except>
<nsName ns="B"/>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="anythingOrB"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="BElements">
<choice>
<element name="elt1" ns="B">
<empty/>
</element>
<element name="elt2" ns="B">
<empty/>
</element>
</choice>
</define>
</grammar>

Resources