I'm using Spring 2.5.6, Spring-ws 1.5.9, and Stripes 1.5.6.
I have a working webservice which was implementing using xml parsing etc. I'll not go into details about this, as I don't think this is the problem.
I'm working on a new ws and found this page quite useful: http://jeromebulanadi.wordpress.com/2010/02/25/basic-spring-web-service-tutorial-from-contract-to-security/
...so using the above as example to implement a new ws (the link contains an example with marshalling/unmarshalling of objects instead of doing all the xml yourself).
When connecting to the ws I get this error message (from a webservice template - also in Spring):
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
The call originates from my template and I'm calling like this:
GetSignalsByCprRequest request = new GetSignalsByCprRequest();
request.setCpr(new BigInteger(cpr));
GetSignalsByCprResponse response = (GetSignalsByCprResponse) getWebServiceTemplate().marshalSendAndReceive(request);
A larger stack trace is:
21-09-2011 11:16:35 INFO com.mydomain.ws.client.SignalsTemplateImpl - Entering getSignals(..) in SignalsTemplateImpl
--- ENTER TEMPLATE ---
21-09-2011 11:16:35 TRACE net.sourceforge.stripes.controller.StripesFilter - Intercepting request to URL: /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker selected locale: da_DK
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker did not pick a character encoding, using default: UTF-8
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
"--- ENTER TEMPLATE ---" is printed just above the request/response is created. The error happens in GetSignalsByCprResponse response = (GetSignalsByCprResponse) getWebServiceTemplate().marshalSendAndReceive(request);
I'm quite blank - I have no idea as where to go. I have a slight idea that either the soap message doesn't contain the namespace OR that Stripes catches the request - based on the stack trace... Stripes is using DynamicMappingFilter, thus mapping the url-pattern to /* - which might be the problem.
Any ideas or pointers is much appreciated!
Seems that your Stripes servlet is handling URL’s you want to be handled by the Spring-ws servlet that will handle your web service requests. You might want to check your <url-pattern> in your web.xml.
Related
I am using .net Graph SDK (Microsoft.Graph) version 3.21. I am following the below documentation link from Microsoft:
https://learn.microsoft.com/en-us/graph/api/range-clear?view=graph-rest-1.0&tabs=csharp
In this link, it is said that we can clear a range of cells and C# code to do so is given. When I try, I am getting error for the Clear
I am able to get Range, but the clear shows error.
Error CS1061 'IWorkbookWorksheetRangeRequestBuilder' does not contain a definition for 'Clear' and no accessible extension method 'Clear' accepting a first argument of type 'IWorkbookWorksheetRangeRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
Am I missing something? What else am I supposed to do?
Note:
All other Graph calls work. I am able to retrieve Range:
var range = await _graphServiceClient.Sites["root"].Drives[file.ParentReference.DriveId]
.Items[file.Id].Workbook.Worksheets["Sheet1"].Range().Request().GetAsync();
It seems a bug, not only Clear but also Delete/Format/Merge... are not contained. There is a similar issue. The methods work in Java but not C#, Filipowicz251 has commented it in Github.
You could call HTTP Request to clear range values without sdk.
POST https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/names/{name}/range/clear
Content-type: application/json
Content-length: 32
{
"applyTo": "applyTo-value"
}
Example here: https://vincentlauzon.com/2017/01/31/using-microsoft-graph-api-to-interact-with-azure-ad/
I am trying port to Dart this nice paper-datatable implementation using custom_element_apigen.
Some problems occurred and sought to find solutions according to my understanding (perhaps included more problems!).
However, still an error is thrown and not been able to move on. I need some help about how port to Dart!!! I will briefly describe the steps, errors and solutions that gave and a link to source code of the project test:
1) I following the steps, accord to https://github.com/dart-lang/custom-element-apigen. I had problems on Windows, but I got to resolve after (custom_element_apigen: gives an error importing paper-datatable to Dart)
2) apigen.yaml used with custom_element_apigen does not clear how to configuration.
I used the "trial-and-error" method until no more error occur. It was so:
files_to_generate:
- paper-datatable\paper-datatable.html
- paper-datatable\paper-datatable-column.html
- paper-datatable\paper-datatable-edit-dialog.html
- paper-datatable\paper-datatable-card.html
- paper-datatable\paper-datatable-styles.html
- paper-datatable\datatable-icons.html
files_to_load:
- package:polymer_elements/src/paper-material/paper-material.html
- package:polymer_elements/src/iron-ajax/iron-request.html
- package:polymer_elements/src/iron-ajax/iron-ajax.html
- package:polymer_elements/src/iron-form/iron-form.html
- package:polymer_elements/src/iron-meta/iron-meta.html
- package:polymer_elements/src/iron-icon/iron-icon.html
- package:polymer_elements/src/iron-iconset-svg/iron-iconset-svg.html
- package:polymer_elements/src/paper-ripple/paper-ripple.html
- package:polymer_elements/src/paper-checkbox/paper-checkbox.html
- package:polymer_elements/src/neon-animation/animations/opaque-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-in-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-out-animation.html
- package:polymer_elements/src/paper-tooltip/paper-tooltip.html
- package:polymer_elements/src/iron-resizable-behavior/iron-resizable-behavior.html
- package:polymer_interop/src/js/debug/src/lib/template/templatizer.html
Some paths imports were wrongs on paper-datatable*.(html and dart) files. p.e. : import 'packages\polymer_interop\src\js\debug\src\lib\template\templatizer.dart'; I changed to import 'package:polymer_interop/src/behaviors/templatize.dart';
on paper_datatable_column.dart.
I changed reserved Dart word default to defaultx on get defaultx => jsElement[r'default']; and set defaultx(value) { jsElement[r'default'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} instructions on paper_datatable_column.dart and paper_datatable_card.dart;
After the following erros were occuring in several polymer componentes. P.e.: Failed to execute 'registerElement' on 'Document': Registration failed for type 'iron-meta'. A type with that name is already registered.
I changed all paths into paper-datatable*.* files to get official package (pub.dartlang) of the polymer and polymer elements. P.e.: <link rel="import" href="paper_icon_button_nodart.html"> to <link rel="import" href="../../packages/polymer_elements/paper_icon_button_nodart.html">. The register problem does not occur more!
But now, the following problem is occuring and I don't know how to resolve it: On debug console appear the following message: Uncaught SyntaxError: Unexpected token =>. The web app works on browser, but the paper-datatable does not appear.
My complete test project (webstorm) is on https://github.com/supermuka/paper_datatable_port_dart_demo
Is there some wrong in how I used Dart custom_element_apigen (and apigen.yaml)? Did I some things wrong on paths changed? I also need to change some other source?
Thanks!
Most likely you just created a syntax error when editing the files. That being said there are options built in to do most of the things you manually did, and that also makes it easier to update in the future.
omit_imports: This is used on individual items in the files_to_generate section. It can be used to get rid of the templatizer import entirely, resolving issue #3. See example here.
name_substitutions: This is used on individual items in the files_to_generate section, and allows you to rename fields. You can use this to resolve issue #4, example here.
stubs_to_generate: This option allows you to generate stubs which actually import elements from a different package, this should resolve issue #5 you listed above. See example usage here.
Hopefully that helps, and applying those options will just resolve your issues.
I am getting below error message when I deploy application into Tomcat 7.
2016-02-11 11:52:30,200 DEBUG (localhost-startStop-1) [org.springframework.jndi.JndiLocatorDelegate] Converted JNDI name [java:comp/env/cloudenv] not found - trying original name [cloudenv]. javax.naming.NameNotFoundException: Name [cloudenv] is not bound in this Context. Unable to find [cloudenv].
I would like to know from where "cloudenv" is mention in the application. I could not find such string my application. I also could not find "java:comp/env/" string in my application. Please me know what am I missing to understand the above error.
Let me answer my own question!!! It is due to that I am using dynamic variable in application context. It is trying to search from 5 areas:-
[servletConfigInitParams]
[servletContextInitParams]
[jndiProperties]
[systemProperties]
[systemEnvironment]
For jndi, the default search variable is "java:comp/env/" + ${dynamic variable}
I have a ColdFusion 9 server which serves the following error on any ColdFusion page where the URL contains the characters .. after a / e.g. http://www.example.com/..cfm or http://www.example.com/..foo/bar.cfm :
String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.delete(AbstractStringBuilder.java:698)
at java.lang.StringBuffer.delete(StringBuffer.java:373)
at coldfusion.util.Utils.collapseDotDots(Utils.java:604)
at coldfusion.util.Utils.canonicalizeURI(Utils.java:558)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:39)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at com.seefusion.Filter.doFilter(Filter.java:49)
at com.seefusion.SeeFusion.doFilter(SeeFusion.java:1500)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
I haven't been able to reproduce this on every server I've tested, but it seems to occur on the majority. Looking at the error, it looks like it relates to part of ColdFusion rather than any ColdFusion code running on these sites. Can anyone shed any more light on this e.g. how to catch the error?
I was getting the above error and figured out that this can be handled by "Site-wide Error Handler" in ColdFusion Admin. I directed it to my 404.cfm.
Hope it helps.
Using Saxon-B, I'm trying to follow the javadoc and serially reuse an XsltTransformer object.
I'm thwarted by:
Error
XTDE1490: Cannot write more than one result document to the same URI, or write to a URI
that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared
2011-03-22 11:06:23,830 [main] ERROR btweb.compiler.CompileSite - Site compilation terminated with error.
btweb.compiler.CompilerException: Error running transform Cannot write more than one result document to the same URI, or write to a URI that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared
It's probably Saxon-B bug. You can find more information here. According to this site "Fixed in 8.9.0.4".