we have some internal code that processes web service calls but assumes the namespace prefix is "sch" for a particular namespace defined in our wsdl.
Is the sch prefix part of the wsdl contract? Must all client calls use the sch prefix as defined in the wsdl for the specified namespace?
I would have thought that the namespace prefix can be anything in the client call as long as it matches to the correct namespace specified in the client call? I'm I right or wrong?
Thanks
I would have thought that the namespace prefix can be anything in the
client call as long as it matches to the correct namespace specified
in the client call? I'm I right or wrong?
Yes your're right, the namespace prefix could be declared anything as long as it points to the correct namespace.
Is the sch prefix part of the wsdl contract? Must all client calls use the sch prefix as defined in the wsdl for the specified namespace?
Atleast for the case of Java, Yes, all clients must use the "sch" prefix as defined in the wsdl.
In java javax.xml.soap class has SOAPFactory class which has a method createName which takes the prefix name as an argument with targetnamespace.
This method is used when client sends some input to the webservice. You can see the foolowing link:
SOAP Factory API
I would have thought that the namespace prefix can be anything in the client call as long as it matches to the correct namespace specified in the client call? I'm I right or wrong?
yes you are right.
Related
As of HTL 1.4, it is possible to access a resource if you know its path by using data-sly-use, e.g.: data-sly-use.item="/content/my_nodes/node1"
However, if one does not have the path to the resource, but only the node's jcr:uuid (automatically generated through use of mix:referenceable), is there any way that one can look up the resource with a similar HTL statement?
There is no such convenience, at the moment. However, the HTL specification does not exclude this and you should be able to write your own UseProvider implementation. You can have a look at the ResourceUseProvider for inspiration.
I'm using CommonsXsdSchemaCollection to configure validation and WSDL generation but the default URI resolver doesn't support my use case. I need to load an XSD with import statements where the schema location is a symbolic URL and the linked schemas are actually on the classpath. A URI resolver which can understand catalog files would be ideal, but couldn't find any, so I resorted to writing a modified version of CommonsXsdSchemaCollection.ClasspathUriResolver (CommonsXsdSchemaCollection's inner class which defines its default resolver) with the capability to rewrite URLs.
Are there more straightforward ways to do the job?
Thanks,
Gianluca
I have a default package in my struts.xml file with namespace "/". This package is extended by another package called global which has namespace "/global".
I would like it so that users who make a request to:
http://someserver:port/webAppRoot/
Are redirected to the default-action-ref in the global package (instead of the default package). I understand the default-action-ref must be declared in the default package, because it has namespace "/" which is exactly the namespace of the incoming request.
Is my only option to put the default action in the default package?
You can put default-action-ref to any package, but only one per package
The default action features should be set up so that there is only one default action per namespace. If you have multiple packages declaring a default action with the same namespace, there is no guarantee which action will be the default.
In the name attribute you specify the action name in this package that will be called if the real name of the action is not found.
The default action is inherited if your package extends a package that has already defined default-action-ref.
Is it possible to customize Dropwizrd's healthcheck output so that, e.g.: /health for healthchecks instead of /healthcheck and some output like {“status”: 200}.
I realise I could simply write a new resource that does what ever I need, I was just wondering if there is a more standard way to do this.
From what I have read on the 0.7.1 source code it's not possible to change the resource URI for healthchecks unfortunately, I highly doubt you can change the healthcheck format. I also remember people complaining about not being able to add REST resources to admin page, only servlets. Maybe on 0.8.0?
Here are the details of what I've tracked so far on the source code. Maybe I have misread or misunderstood something, so somebody could fix it.
Metrics has actually written AdminServlet to add healtcheck servlet in a way that it checks the servlet config whether the URI is defined or not.
this.healthcheckUri = getParam(config.getInitParameter(HEALTHCHECK_URI_PARAM_KEY), DEFAULT_HEALTHCHECK_URI);
But dropwizard doesn't provide a way to inject this configuration in any way on AbstractServerFactory.
handler.addServlet(new NonblockingServletHolder(new AdminServlet()), "/*");
NonblockingServletHolder is the one which is providing the config to AdminServlet but is created by AbstractServerFactory with empty constructor and provides no way to change the config.
I've thought of and tried to access the ServletHolder from the Environment object on Application.run method but the admin servlets are not created until after run method is run.
environment.getAdminContext().getServletHandler().getServlets()[0].setInitParameter("healthcheck-uri", "/health");
Something like this in your run() function will help you control the URI of your healthchecks:
environment.servlets().addServlet(
"HealthCheckServlet",
new HealthCheckServlet(environment.healthChecks())
).addMapping("/health");
If you want to actually control what's returned you need to write your own resource file. Fetch all the healthchecks from the registery, run them and return whatever aggregated value you want based on their results.
BizTalk produced namespace default prefix as NS0. Is there a way to override it to generate something different without utilizing an XSLT (it's an overhead when the schema changes, XSLT has to be updated as well)? Something like
<pidx:Invoice>
and not
<ns0:Invoice>
This should be simple (after all it's just a namespace prefix), but clients are parsing document instead of using it as an XML with namespace, and having no expected namespace prefix causes them grief.
Thank you.
No, there's not.
A kludgey answer is to convert the XML to a string and search/replace.
You can do this. I had to do this when calling a Google API, which requires specific namespace prefixes.
The method is to use the Imports property at the <Schema> level in your XSD. Using the Imports dialog you can define specific prefixes on each namespace.
You will have to break up your schema into at least two separate XSD's so you can import one into the other and redefine the prefix at that time.