I'm using veins 4.6 and trying to evaluate the change in emissions due to different routing protocols. By exploring SUMO site I have managed to set base for the experiment. For now I'm using veins demo application with minor configurations changes. Here is content of my erlangen.sumo.cfg file:
<?xml version="1.0" encoding="iso-8859-1"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.sf.net/xsd/sumoConfiguration.xsd">
<input>
<net-file value="erlangen.net.xml"/>
<route-files value="erlangen.rou.xml"/>
<additional-files value="erlangen.poly.xml"/>
</input>
<time>
<begin value="0"/>
<end value="400"/>
<step-length value="1"/>
</time>
<routing>
<routing-algorithm value="CHWrapper"/>
<device.rerouting.probability value="1"/>
</routing>
<emissions>
<device.emissions.probability value="1"/>
</emissions>
<report>
<no-step-log value="true"/>
</report>
<gui_only>
<start value="true"/>
</gui_only>
<output>
<fcd-output value="erlangen.fcd.xml"/>
<emission-output value="erlangen.emission.xml"/>
<tripinfo-output value="erlangen.trip_info.xml"/>
<vehroute-output value="erlangen.route_followed.xml"/>
<summary value="erlangen.summary.xml" />
</output>
</configuration>
Routes file (erlangen.rou.xml) content is as follows:
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="passenger" vClass="passenger" accel="2.6" decel="4.5" sigma="0.5" length="2.5" minGap="2.5"
maxSpeed="120" guiShape="passenger/sedan" color="1,0,0" emissionClass="HBEFA3/LDV_G_EU4">
<param key="has.emission.device" value="true"/>
<param key="has.rerouting.device" value="true"/>
<param key="device.fcd.probability" value="1"/>
</vType>
<flow id="flow0" type="passenger" from="3013106#1" to="29900564#1" begin="0" period="3" number="30" />
erlangen.net.xml is unchanged and in omnetpp.ini I have changed *.connectionManager.maxInterfDist from 2600m to 100m only.
Using these configurations I have ran the simulation using A* and CHWrapper algorithm but output of both is ditto copy. In below image it is visible that node 25 - 29 followed a different path after rerouting, but these are same in both cases.
Tripinfo results are given below, as discussed here "tripinfo_rerouteNo" clearly shows that nodes have been rerouted.
Now following is revolving in my mind:
Are routing algorithms applied successfully (set in erlangen.sumo.cfg) or in both cases default Dijkstra was used?
Routing algorithms applied successfully but results are same because network was not congested enough / don't have enough alternate paths to follow. So I should have change network, with multiple accident count etc.
I'm not getting how rerouting is working here.
I'm stuck here, any directions will be highly appreciated.
It is not easy to say from the outside which routing algorithm has been applied, but I would assume 2. is the correct solution. The different algorithms are basically different in the way they can handle dynamic changes to the edge weight vs. the calculation speed but in most cases they should give the same result. You might wish to try the scale option to increase traffic easily or set device.rerouting.period to a value like 10 (seconds) to enable periodic rerouting of the vehicles to see more effects. Also setting weights.random-factor to a large value can help.
One can verify using a sample network like following:
In my test case I set starting position of vehicles as left most edge bottom lane and destination was upper lane of same edge. No uTurn was implemented therefore vehicles had to pass through junction, and FCD for every algorithm was significantly different.
Related
I have an old axis 1 webservice here that is deployed via a MyWebService.jws file. It was called by an URL like this:
http://localhost:8080/WebApp/service/MyWebService.jws?method=coolMethod
Now I want to replace the jws-file deployment method and use a WSDD file instead, however I would like to keep the URL for the webservice access the same.
Naively I though that I could just replace the service's name with 'MyWebService.jws' like this:
<service name="MyWebService.jws" provider="java:RPC">
<parameter name="allowedMethods" value="*" />
<parameter name="scope" value="request"/>
<parameter name="typeMappingVersion" value="1.1"/>
<parameter name="className" value="MyWebServiceClass" />
</service>
Sadly that does not work as expected, because Axis recognizes the .jws inside the name and handles it like a .jws-file deployment, which now, after the .jws files have been removed obviously leads to this error message:
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.io.FileNotFoundException: /service/MyWebService.jws</faultstring>
Is there a way to stop axis from interpreting a webservice name like 'MyWebService.jws' as a .jws-file?
Ok, answering my own question: this is not possible in Axis, interpreting service names that end with '.jws' as .jws-Files is hardcoded.
In the end, I build myself my own Axis version that uses a different default-ending, allowing me to deploy the webservices as needed.
One of my pairs of Glass updated itself to XE 17.3 this morning, and now, any Voice Triggers I have defined that are used for more than one activity no longer work. On previous versions, (and I've tested my code on an XE 17.2 pair I have to make sure I didn't break anything today), if multiple activities were set to use the same Voice Trigger, the system would prompt you to select from a list upon hearing that voice trigger. This is expected behavior (in case two applications use the same trigger), and actually was quite useful for creating a sub-launcher for your application (which is what I was using it for...say main launch name -> get a list of activities to choose from within the app, all automatic and handled by the system).
Now, however, if my Voice Trigger is assigned to two or more activities within my manifest, it will show up in the list, but will never trigger when you say "OK Glass - [voice trigger]" (it does still work with taps, however). As I mentioned, I tested the exact same code on a pair running XE 17.2 and it worked fine. I also removed the trigger from all but one activity, and it works on 17.3 when you do that...so the problem is when you have more than one possible activity that handles a given voice trigger.
The way I have my manifest set up seems correct to me (and works on older versions of the firmware):
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
...
<!-- one of the activities. this is inside the application element, of course -->
<activity
android:name="com.someapp.MainActivity"
android:label="Option 1" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voiceinput_main" />
</activity>
<!-- another activity, again inside the application element, sharing the same trigger -->
<activity
android:name="com.someapp.AnotherActivity"
android:label="Option 2" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voiceinput_main" />
</activity>
And, this manifest works fine on XE 17.2. Anyone know of something that has changed in 17.3 that would break this, or see anything that looks wrong? I know that the <action android:name="android.intent.action.MAIN" /> line isn't necessary, but removing it doesn't fix the problem.
Thanks!
in my case, I change my voice trigger string "all in lower case" thing solved my problem, maybe you could give it a try, custom Voice trigger command XE17.31
This seems to only affect custom voice triggers. I'm seeing the same thing with an app I'm developing where I use "Debug ..." as a trigger to let me do a number of things to reset state or launch test actions.
If you change the trigger to an existing command listed here then it should start working again. If you're using the mechanism in the same way I am, you can probably just pick an obscure existing command to use for testing purposes (I'm using FIND_A_DOCTOR, which seems apropos for debugging purposes).
If you're simply using a custom command as part of normal flow, presumably it will either become an accepted command, or you'll have to switch to an existing command eventually, since the custom commands only work in debugging anyway.
At the momemet I am working on part of my application where I need to parse Relax NG schema and reproduce rules within file in C++ objects. I start with example code so I can explain better.
<!-- property.element -->
<define name="property.element">
<element name="property">
<attribute name="type" />
<interleave>
<zeroOrMore>
<ref name="resource.class" />
</zeroOrMore>
<ref name="literal.class" />
</interleave>
</element>
</define>
I want to create object where I can store information like:
[define] name,
element name,
attribute names,
allowed child elements with associated rules (zero or more, one or more).
Then I want to display all possible elements in my GUI where I can add only valid (in terms of Relax NG schema) elements to tree-like structure. For example - I can add only resource.class or literal.class to my property.element, every other possible element is greyed in my GUI when I have selected property.element node in GUI. I use Qt, so I load schema into QDomDocument to get access to DOM tree.
Such mechanism has to be universal i.e. no matter how elements are named, or how its structure is. In my draft I created simple class where I placed several members like: defined_name, element_name, required_attributes, optional_attributes. Currently I am stuck because I do not have any idea how to represent rules in C++ class. If I had constant set of objects on which I work I would hard-code every object, but my objects set is very likely to change drastically over time. Does anyone have any idea?
Convert the RNG file to XSD using TRANG, then convert the XSD to c++ using CodeSynthesis either XSD or XSDe). There are a bunch of samples with XSDe, so there might be one demonstrating how to validate the xml input with the schema rules.
http://www.thaiopensource.com/relaxng/trang.html
http://www.codesynthesis.com/products/xsde/
I'm using ant, ivy and nexus repo manager to build and store my artifacts. I managed to get everything working: dependency resolution and publishing. Until I hit a problem... (of course!).
I was publishing to a 'release' repo in nexus, which is locked to 'disable redeploy' (even if you change the setting to 'allow redeploy' (really lame UI there imo). You can imagine how pissed off I was getting when my changes weren't updating through the repo before I realised that this was happening.
Anyway, I now have to switch everything to use a 'Snapshot' repo in nexus. Problem is that this messes up my publish. I've tried a variety of things, including extensive googling, and haven't got anywhere whatsoever. The error I get is a bad PUT request, error code 400.
Can someone who has got this working please give me a pointer on what I'm missing.
Many thanks,
Alastair
fyi, here's my config:
Note that I have removed any attempts at getting snapshots to work as I didn't know what was actually (potentially) useful and what was complete guff. This is therefore the working release-only setup.
Also, please note that I've added the XXX-API ivy.xml for info only. I can't even get the xxx-common to publish (and that doesn't even have dependencies).
Ant task:
<target name="publish" depends="init-publish">
<property name="project.generated.ivy.file" value="${project.artifact.dir}/ivy.xml"/>
<property name="project.pom.file" value="${project.artifact.dir}/${project.handle}.pom"/>
<echo message="Artifact dir: ${project.artifact.dir}"/>
<ivy:deliver
deliverpattern="${project.generated.ivy.file}"
organisation="${project.organisation}"
module="${project.artifact}"
status="integration"
revision="${project.revision}"
pubrevision="${project.revision}" />
<ivy:resolve />
<ivy:makepom
ivyfile="${project.generated.ivy.file}"
pomfile="${project.pom.file}"/>
<ivy:publish
resolver="${ivy.omnicache.publisher}"
module="${project.artifact}"
organisation="${project.organisation}"
revision="${project.revision}"
pubrevision="${project.revision}"
pubdate="now"
overwrite="true"
publishivy="true"
status="integration"
artifactspattern="${project.artifact.dir}/[artifact]-[revision](-[classifier]).[ext]"
/>
</target>
Couple of ivy files to give an idea of internal dependencies:
XXX-Common project:
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
organisation="com.myorg.xxx"
module="xxx_common"
status="integration"
revision="1.0">
</info>
<publications>
<artifact name="xxx_common" type="jar" ext="jar"/>
<artifact name="xxx_common" type="pom" ext="pom"/>
</publications>
<dependencies>
</dependencies>
</ivy-module>
XXX-API project:
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
organisation="com.myorg.xxx"
module="xxx_api"
status="integration"
revision="1.0">
</info>
<publications>
<artifact name="xxx_api" type="jar" ext="jar"/>
<artifact name="xxx_api" type="pom" ext="pom"/>
</publications>
<dependencies>
<dependency org="com.myorg.xxx" name="xxx_common" rev="1.0" transitive="true" />
</dependencies>
</ivy-module>
IVY Settings.xml:
<ivysettings>
<properties file="${ivy.project.dir}/project.properties" />
<settings
defaultResolver="chain"
defaultConflictManager="all" />
<credentials host="${ivy.credentials.host}" realm="Sonatype Nexus Repository Manager" username="${ivy.credentials.username}" passwd="${ivy.credentials.passwd}" />
<caches>
<cache name="ivy.cache" basedir="${ivy.cache.dir}" />
</caches>
<resolvers>
<ibiblio name="xxx_publisher" m2compatible="true" root="${ivy.xxx.publish.url}" />
<chain name="chain">
<url name="xxx">
<ivy pattern="${ivy.xxx.repo.url}/com/myorg/xxx/[module]/[revision]/ivy-[revision].xml" />
<artifact pattern="${ivy.xxx.repo.url}/com/myorg/xxx/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="xxx" m2compatible="true" root="${ivy.xxx.repo.url}"/>
<ibiblio name="public" m2compatible="true" root="${ivy.master.repo.url}" />
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
</chain>
</resolvers>
</ivysettings>
w00h00t.
(There's something cathartic about asking the world for help. Usually you fix the problem much faster, even without a response).
Anyway, for the interested it came down to a couple of things:
a) the addition of -SNAPSHOT to all revisions. This involved forking a second ivy.xml -> ivy.SNAPSHOT.xml and referencing that explicitly in the ivy ant tasks.
b) given that this is a manual addition I had to go through my entire tree of build files and provide parallel paths for release and snapshot flows. This, in my opinion, is lame. But, as I guess we're extremely unlikely to invent any other type of flow, this probably won't bloat, and 2 parallel flows is where it will stay.
c) I specified various hints to ivy to check for updates to the snapshots. e.g. checkUpdated="true" and changePattern=".*-SNAPSHOT" on the resolver. And the addition of
<modules org="myorg" name=*" resolveMode="dynamic" />
Still, it'd be nice if there had been automatic integration with snapshot stuff. A bit of (optional) cleverness on the part of ivy. Let's face it, maven repos like nexus ARE really useful and I'm certainly using ivy only to get round maven's crappy build process. I like using nexus.
Anyway. If anyone ever wants to question further on this, feel free.
I'm not sure if this would help with the problem of having 2 sets of configurations, but at least the build.xml would be a little bit simpler.
You can define the revision attribute on the info element in ivy.xml as ${project.revision}.
You can then omit the revision="${project.revision}" attributes on ivy elements in build.xml.
See my answer on this another question for example:
https://stackoverflow.com/a/8853823/1148030
It should be noted, the only necessary step is to include the '-SNAPSHOT' to revision when publishing to Nexus. The other steps listed in the answer are optional/improvements. To pull the published item down, you need to add '-SNAPSHOT' to the revision as well.
An error was discovered processing the <wsse:Security> header
This is a WS-Security question btw...
I can't see anything wrong with my WS endpoint (apart from the fact that it's running in a TIBCO BW engine!). Does someone have any 'prior' with this kind of error? I realise that the WS-Security Header could be broken anywhere presumably to get this error but, there's GOT to be a 90% percentile on some kind of common error.
Here's the secured SOAP - the client is standalone java (WSS4J 1.5.0) performing signing only at this stage.
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-20237898">
<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="#id-18414151">
<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>DvjhvAtEVxwntL/RjMCNhId57cg=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
YbOB3FRduCr5rutpIvch9sDZfZToy3pjm+Kyl/Oqz6cAPqMVKqvKBb4P7ebnzP/3SVjm+PfLqlE5
BGgcT3Vz93apyg+eY1rAIYUs7K1Zt9F5ejMmij6HQpQTGpyM9BUXJi1x5bt9GuMtD0SK939bIIE2
ZUyZ0jPJp/wUhMonskw=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-15734641">
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-3852606">
<ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=Mark Hesketh,OU=asdf,O=DVA,L=Canberra,ST=ACT,C=AU</ds:X509IssuerName>
<ds:X509SerialNumber>1231310305</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
<soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-18414151">
<message xmlns="http://www.tibco.com/schemas/CertificateWork/Resources/Schema.xsd" text="Sample msg with SHA1 signature"/>
</soapenv:Body>
</soapenv:Envelope>
Wow... if you're still having this problem, you have more patience than I... but just in case, here's my thoughts:
http://schemas.xmlsoap.org/specs/ws-security/ws-security.htm#ws-security__toc6201567 - suggests that this is a problem reading the tag.
One thing that sticks out to me is that I don't see a reference connecting the signature to the key info. Certainly, I would assume that the KeyInfo element is describing the certificate that used a private key to make the SignatureValue, but I don't see a peice of the XML that is telling the software that. I don't think including the KeyInfo is enough, there may have to be a link to it.
If not that, I'd double check this against the schema, and maybe an independant schema verifying source. An error at the header level makes me think format rather than content.
That's my first guess at this one, and it's just a guess without getting hands on with your system and trying a bunch of different things. If that doesn't work, this my general logical chain for this type of error:
Format - the XML correct according to the schema?
Signature - the signature needs three things: data, a key, a set of algorithms for making it. Check all three - is the data correct, is the key correct, are the algorithms appropriate for the key and for how the message will be handled? Also, are the key and data items referenced properly and being found by your library?
External sources of info - in this case, your key info references a certificate that presumably is pulled from somewhere else - like an LDAP cert store. So.. can your code get to that external source, is the source of data running and network accessible from where you are running the code? etc.
If PKI -- Certificate Validation/Trust - what does the system have to do behind the scenes to trust the signer? OCSP checks? Lookup in LDAP? Chain to trusted root? etc. Is the trust algorithm working properly and does it have everything it needs - ie, access to OCSP responder, properly configured certificate store, etc.
I reorder these steps based upon my guess on what the error means. The errors are not so intuitive -- so I often go through all these steps just in case my interpretation of the error is wrong. Besides, I may then prevent a problem later...
Check your SOAPAction in the Header. The value in the WSDL must be the same as in the call. A wrong value can cause an InvalidSecurity error.
In Java you can get the message as text with
soapMessage.getSOAPPart().getEnvelope();
Here you can check the values and settings.