Axis2 service.xml description - deployment

Is there a description of all the possible elements of the service.xml file, an XSD file or the list of all s available?

Related

Eclipse plugin to automatically generate a template TLD file

Is there and Eclipse plugin to automatically generate a template TLD file (.tld) when writing custom tags?
Thanks to nitind answer :
Eclipse:
You can create one using the New XML File wizard; the DTD and schema files for tag libraries should be in the built-in catalog.
If you're building .tag files, you won't need one.

Wildfly10: Configuring deployment runtime name with XML

Can I set the runtime name of a deployment by configuring a XML file inside .war file?
besides the file name of the .war, is there a way to configure the name and runtime name of a deployment using XML?
You can do it in jboss-web.xml and place that in WEB-INF. Here is sample.
<?xml version="1.0"?> <jboss-web><context-root>Hello</context-root></jboss-web>
Read more here Changing Context Root

How to add a DTD to XML Catalog in Eclipse?

I try to add a DTD created by myself to the XML Catalog in Eclipse.
Which values do I have to enter into the fields?
Where do I have to locate the DTD in best case?
I have multiple Java projects in my Eclipse IDE. So what would be the best practice to make the DTD accessible for all projects?
I tried to use Window-->Preferences-->XML-->XML Catalog-->Add to get a catalog entry under User Specified Entries.
Currently it looks like this:
Entry element: System
Location: cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
URI: platform:/resource/cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
Key type: System ID
Key: dataset file:////services/utils/test-db/src/main/resources/cc_dataset.dtd
Referencing the DTD in the XML file, Eclipse complains:
No grammar constraints (DTD or XML Schema) referenced in the document.
and
The file cannot be validated as the XML definition "C:\develop\Projects\...\ws\services\utils\test-db\src\main\resources\globaltestdata\cc\cc_dataset.dtd (The system can't find the specified file)" that is specified as describing the syntax of the file cannot be located.
(I have partially translated from German into English.)
How do I have to make the XML Catalog entry that the DTD can be referenced (in best case over all projects in Eclipse IDE) to validate the XML file when using
<!DOCTYPE dataset SYSTEM "cc_dataset.dtd">
in it.
Where should be to DTD located (in the filesystem) to make it best accessible?
I changed my XMLC atalog entry:
Entry element: System
Location: cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
URI: platform:/resource/cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
Key type: System ID
Key: ccdataset
The reference in the XML file:
<!DOCTYPE dataset SYSTEM "ccdataset">
Eclipse's reaction:
The file cannot be validated as the XML definition "C:\develop\Projects\EOBR\ws\services\utils\test-db\src\main\resources\globaltestdata\cc\ccdataset (Das System kann die angegebene Datei nicht finden)" that is specified as
describing the syntax of the file cannot be located.
cc_dataset.dtd is located at C:\develop\Projects\EOBR\ws\services\utils\test-db\src\main\resources\ i don't know why Eclipse extends this to the path of the XML file with the declaration.

How to remove auto generated classes in jax-ws clients

I have a web service which I created with jax-ws in NetBeans. When I create the soap client from the wsdl file, Netbeans generates the mapping classes used for serialisation.
My problem is that I don't want them. I wrote them myself and they are used in other parts of the application. I tried everything to use my classes instead of the auto generated to send the SOAP message but with no success.
The cumbersome solution would be to copy the data from one class to the other and then send the message, but my class has about twenty subclasses so I would like very much to skip this.
Use the JAXB episode option which basically allows you to instruct JAXB to reuse classes in a package. You specify the desired packages in an episode file. "episode" is just a fancy name for a jaxb binding file and it's not very different from your regular jaxb config file. Your episode file would look something like this (bindings file excerpt courtesty of Blaise Doughan's blog)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
<bindings scd="x-schema::tns"
xmlns:tns="http://www.example.org/Product">
<schemaBindings map="false"/>
<bindings scd="tns:product">
<class ref="com.you.yourclass"/>
</bindings>
</bindings>
</bindings>
Save the file as a .episode file and configure in your Netbeans project like so. I assume here that you've run the Create Webservice from WSDL wizard in Netbeans
Right click on Webservice node within your project. Navigate to the WSimport options tab
Under the Jaxb(xjc) options frame, add the following
(where myepisodefile.episode refers to the episode file you created earlier. Make sure the file is available within your project)

wsimport try to resolve by namespace

Is it possible for wsimport to ignore "import" tags in wsdl that are http-linked to some XSD files and insted use XSD files provided next to the wsdl file?. I know svcutil is able to do so.
you can use an XML catalog to help tell wsimport how/where to resolve schema elements.
xmlcatalog ant docs
defines the xmlcatalog task for ant. you can reference the catalog via the "catalog" attribute of the wsimport ant task, or via the -catalog command line option of wsimport.
jaxws xml catalog docs
I hope this helps.