In the Spring Batch job XML configuration there was the possibility to add a job description
<xsd:element name="job">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="description" type="description" minOccurs="0"/>
...
</xsd:sequence>
</xsd:element>
Questions:
Why is this not possible anymore in the Java configuration?
Spring Batch Admin has a column called Description, but it doesn't show anything.
As far as I can tell from the source code of both Spring Batch and Admin this is never stored/retrieved from the job repository. What is the reason behind it?
Related
I am receiving the following error at server.xml file liberty server. I couldn't solve this problem.
Referenced file contains errors (file:/D:/workspaces/myprojects/.metadata/.plugins/com.ibm.ws.st.core/Liberty Runtime/server.xsd). For more information, right click on the message in the Problems View and
select "Show Details..."
**My server.xsd file **
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ext="http://www.ibm.com/xmlns/dde/schema/annotation/ext">
<xsd:complexType name="com.ibm.ws.app.manager.webappcfg">
<xsd:annotation>
<xsd:documentation>Defines the properties of a web application.</xsd:documentation>
<xsd:appinfo>
<ext:label>Web Application</ext:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="startAfter" type="com.ibm.ws.app.manager-factory">
<xsd:annotation>
<xsd:documentation>Specifies applications that are required to start before this application can begin starting. </xsd:documentation>
<xsd:appinfo>
<ext:label>Start After</ext:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="classloader" type="com.ibm.ws.classloading.classloader">
.
.
.
I want to get rid of this error.
Error Details:
enter image description here
I am trying to write a service for Oracle Service Bus 12C to receive a PDF file.
The external service has two parameters of the format:
http://server.domain.com/documents?docId=12345&fetch=summary|document
If the parameter 'fetch' is sent with the value 'summary', it returns the summary information in JSON format. If the parameter value is 'document', it returns the PDF file with the Content-Type set as 'application/pdf'.
For the JSON response, the XSD is simple:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://TargetNamespace.com/DocServices_getFile_response"
targetNamespace="http://TargetNamespace.com/DocServices_getFile_response"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
elementFormDefault="qualified"
nxsd:version="JSON" nxsd:encoding="US-ASCII">
<xsd:element name="File-Proxy-Response-Root-Element">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="docCode" type="xsd:integer"/>
<xsd:element name="docDescription" type="xsd:string"/>
<...snip...>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:annotation xmlns="">
<xsd:appinfo>NXSDSAMPLE=</xsd:appinfo>
<xsd:appinfo>USEHEADER=false</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
But I can't figure out how to support receiving PDF response.
In one of my projects, I used to have a WSDL element defined as having length of 20:
<xs:element name="LastName" type="mns:String20Type" />
Where String20Type is defined in an internal XSD:
<xs:simpleType name="String20Type">
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
To increase the length of that element, I changed String20Type to String40Type without adding a type definition into the schema and rebuilt:
<xs:element name="LastName" type="mns:String40Type" />
The build completed successfully without any error, warning, complaint or hint of any type.
Why?
How did the system know what String40Type is?
As requested:
Hmm... sounds like either Eclipse is not validating it properly or you have that type defined... somewhere. I use LiquidXML and Altova XML Spy. I suggest you try those specialized IDE packages and have them validate it and see where the error lies. They have free trials so give that a shot.
Is it OK to have multiple elements in the element in a J2EE web app version 2.4 compliant web.xml like this:
<filter-mapping>
<filter-name>SomeFilter</filter-name>
<url-pattern>*.htm</url-pattern>
<url-pattern>*.do</url-pattern>
</filter-mapping>
I looked up the XSD "web-app_2_4.xsd" file from here : http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
and the definition looks like this:
<xsd:complexType name="filter-mappingType">
<xsd:annotation>
<xsd:documentation>
some documentation here
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="filter-name"
type="j2ee:filter-nameType"/>
<xsd:choice>
<xsd:element name="url-pattern"
type="j2ee:url-patternType"/>
<xsd:element name="servlet-name"
type="j2ee:servlet-nameType"/>
</xsd:choice>
<xsd:element name="dispatcher"
type="j2ee:dispatcherType"
minOccurs="0" maxOccurs="4"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
The URL pattern definition looks like this:
So I think, we can have multiple elements in the element.
My Eclipse IDE however does not seem to agree with me, and expects a 'dispatcher' tag.
See image:
Clearly no, but you can have:
<filter-mapping>
<filter-name>SomeFilter</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SomeFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
Default is 1 for maxOccurs and minOccurs in sequence element: https://msdn.microsoft.com/en-us/library/ms256089(v=vs.110).aspx.
And choice allows only one of the elements of it:
https://msdn.microsoft.com/en-us/library/ms256109(v=vs.110).aspx
I am creating a web service using php SOAPServer. I am creating a wsdl file and looking for info on how to set the min and max string length for one of the input parameters for one of the web service operations. Is it even possible?
By the way I am using soap binding style "rpc"
Do you code the WSDL by hand or does the library create it for you by looking at an endpoint class? If you are coding the WSDL by hand, you could simply add something like this in your schema descriptor:
<simpleType name="MyStringType">
<restriction base="string">
<minLength value="10" />
<maxLength value="30" />
</restriction>
</simpleType>
<element name="greetMe">
<complexType>
<sequence>
<element name="requestType"
type="tns:MyStringType"/>
</sequence>
</complexType>
</element>
Its probably because the service's validation is turned off. Check your framework and see if there is a flag that needs to be set in one of the xml's (application-context.xml) for the service config.