Disable SOAP Schema Validation, JAX-WS and JAXB, How? - validation

Out of the blue several previously working SOAP calls I do from Java code give "DefaultValidationEventHandler: [ERROR]: unexpected element...".
It is complaining about about the response object. A few things though; it had been working fine, I did not change the schema or the EJB, or the caller code, I do no have a scheme validation feature on the port, and the response looks just fine to me. It is the client side that is complaining. The server successfully executes the request without comment.
I think my Eclipse environment may be malfunction.
Is there a way to disable client side schema validation of the response from the service or port object?

I figured this out and it was Eclipse (Helios) as I suspected. It turns out that if anything is incorrect with the Java EE perspective and/or any enterprise projects, Eclipse will quietly stop rebuilding things.
I found this out when I deleted everything under build/classes, and then nothing would run. An unrelated project was pointed at a no longer valid server profile.
How this resulted in the behavior I saw is unknown. And it would still be nice to know how to disable validation. It is supposed to off by default, but that but is not.

Related

How to trouble shoot and resolve XrmToolBox Plugin Registration tool not connecting?

Seems like every other day XrmToolBox's Plugin Registration tool fails to connect. It's probably the most fickle tool I've ever used professionally (is this really the best tool for the job? yikes)
In years of working with it, I've not yet found a reliable way to get the tool to connect. Everything connects fine in the browser. But XrmToolBox randomly fails.
And I've never found or read online a reliable way to figure it out except restart your computer, throw salt over your shoulder, spin counter-clockwise once in your chair, try again later.
Anyone have a better way?
The server was unable to process the request due to an internal error.
For more information about the error, either turn on
IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute
or from the configuration behavior) on the server in
order to send the exception information back to the client, or turn on
tracing as per the Microsoft .NET Framework SDK documentation and
inspect the server trace logs.
That was the only error I got from XrmToolBox. But it led me to solving the problem. Followed this article to enable more detailed error log:
https://community.adxstudio.com/products/adxstudio-portals/documentation/developers-guide/knowledge-base/enable-detailed-errors-on-the-organization-service/
Tried again, and saw that indeed there was a meaningful error in the XrmToolBox logs.
TL;DR: Turn on better error logging in the on-premise CRM web.config! Then try again to get a more helpful error.

Can weblogic cache reponses to get requests?

I don't mean using coherence. I am looking for a way to avoid hitting my application to look something up that I've already looked up. When the client performs a GET on a resource I want it to hit the application the first time only and after that return a cached copy.
I think I can do this with apache and mod_mem_cache, but I was hoping there was a weblogic built in solution that I'm just not able to find.
Thanks.
I don't believe there's inbuilt features to do that across the entire app server, but if you want to do it programmatically, perhaps CacheFilter might work.

From jasmine-maven-plugin getting setOnopen Runtime exception

I am trying to implement jasmine-maven-plugin for my project.
In my project there are multiple separate web projects, I successfully integrate the above plugin in all of my web projects except one.
I have used HtmlUnit driver for all of my web projects but getting RuntimeException: Exception invoking setOnopen from WebSocket class for a particular web project, others are executing fine.
Instead of htmlunit if I use phantomjs driver then it is working seamlessly but for that I have to keep the phantomjs executable in my system PATH which is not go with the maven philosophy, I do not want to keep any separate executable in my system. Due to this I want to use htmlunit driver which is throwing the above setOnopen exception.
I did lots of google but not able to get any solution, if you have any insight on this issue please let me know. Thanks In advance.
If you want to avoid requiring phantomjs be installed separately you may want to take a look at these projects for some ideas:
https://github.com/qa/arquillian-phantom-binary
https://github.com/qa/arquillian-phantom-driver
And take a look at this forum discussion:
https://groups.google.com/forum/#!topic/phantomjs/yZj_ciH21pE
I've yet to have time to try this out myself but it sounds promising. Also, note that you don't need to have phantomjs on your system path. You can specify the location of the binary using the phantomjs.binary.path property. See the second example on this page which shows how to configure it using this property.
Hope that helps.

Enhydra 5 application on tomcat 7

I have an application using enhydra 5 framework running on a resin 2 server.
Moving this application to a tomcat 7 server is giving me issues.
I was able to get the application deployed on tomcat server, but the session data is lost between requests. I compared the values by debugging the application on tomcat and resin and found that the session values are available in resin.
Does anyone have any idea or provide me the link to get Enhydra source code.
It is a very old framework and was written in 2000.
I did a little digging and the best I could come up with was http://www.together.at/download which appears to be where this code migrated to but there is no sign of an accessible source repository or src bundles for old versions.
It sounds like there may be a configuration problem at work here. Something as simple as looking at the HTTP headers may shed some light on what is going wrong.
Another option I sometimes use when the source code isn't immediately to hand is JAD. The decompiled code isn't always the most readable but it is usually good enough to figure out what is going wrong.

Any way to use MvcMiniProfiler on windows application? Or is there a sister application?

So I've started using MvcMiniProfiler on our websites and quite like it. We have a Windows Application component/framework that is leveraged by the website and I was wondering if it was possible to use the profiler on that. I'm assuming not, but maybe there is a subcomponent of the code that could be used? I see that there is a way to configure where the results are stored (i.e. Sql Server) so maybe it is close to possible?
We have the following flow:
Website submits job to 'broker' then returns a 'come back later' page.
Broker runs and eventually data in the websites database gets updated by the broker.
Website displays the results.
I'd be great if there was a way I could get the entire workflow profiled. If there is no way/no intentions from the developers to make MvcMiniProfiler available to Windows applications, any recommendations for similar styled profilers?
You could get this working by using SqlServerStorage, there is very little in the code base that heavily depends on ASP.NET, in fact the SQL interceptor is generalized and so it the stack used to capture the traces.
I imagine that a few changes internally need to be made, eg: use Thread.SetData as opposed to HttpContext but they are pretty superficial.
The way you would get this going is by passing the "profiling identity" into the App and then continuing tracking there. Eventually when the user hits the site after it happens, it would show up as little "chiclets" on the left side.
A patch is totally welcome here but it is not something it does in its current version.
(note to future readers, this is probably going to be out of date at some point, if it is please suggest an edit)
Yes, there's a Windows porting of MiniProfiler: http://nootn.github.io/MiniProfiler.Windows/

Resources