[JBoss Web Services] - Problems with missing minOccurs=" 1" in generated wsdl
by Mats Ekström
Mats Ekström [http://community.jboss.org/people/fghj5678] created the discussion
"Problems with missing minOccurs="1" in generated wsdl"
To view the discussion, visit: http://community.jboss.org/message/561764#561764
--------------------------------------------------------------
Hi!
We are using jboss soa platform 4.3.0 CP02 and when I annotate like this:
@XmlElement(nillable=false, required=true)
public void setProducer(String producer) {
public void setProducer(String producer) {
this.producer = producer;
}
this.producer = producer;
}In the generated wsdl (from the deploy), the element producer will look like this:
<xs:element name="producer" type="xs:string"/>
Where is the minOccurs="1"???
If I instead annotate at declaration of producer I get an exception:
@XmlElement(nillable=false, required=true)
private String producer;
java.lang.IllegalStateException: Cannot build JAXB context
...
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "producer"
this problem is related to the following location:
at public java.lang.String se.tullverket.texi.archive.bl.Trans.getProducer()
at se.tullverket.texi.archive.bl.Trans
at public se.tullverket.texi.archive.bl.Trans se.tullverket.texi.archive.bl.ArchiveTO.getTrans()
at se.tullverket.texi.archive.bl.ArchiveTO
at private se.tullverket.texi.archive.bl.ArchiveTO se.tullverket.texi.archive.bl.jaxws.Archive.arg0
at se.tullverket.texi.archive.bl.jaxws.Archive
this problem is related to the following location:
at private java.lang.String se.tullverket.texi.archive.bl.Trans.producer
And if I skip the annotation it looks like this:
<xs:element minOccurs="0" name="producer" type="xs:string"/>
Any ideas?
/Mats
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561764#561764]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JBoss Tools] - BIRT Integration-Cannot find the ODA dataSource extension (org.jboss.tools.birt.oda)
by Mike Baxley
Mike Baxley [http://community.jboss.org/people/mbaxley] created the discussion
"BIRT Integration-Cannot find the ODA dataSource extension (org.jboss.tools.birt.oda)"
To view the discussion, visit: http://community.jboss.org/message/610705#610705
--------------------------------------------------------------
I created a Seam 2.2 + JBoss BIRT Integeration project (BIRT2.6). I want to use the Hibernate ODA datasource for my reporting.
In my test project I used the Birt Sample Classic Models database. I generated the entity bean for the employees table and then built a report design using the Hibernate ODS datasource and dataset. I was able to preview the data and report within the eclipse IDE.
When I run the application in JBoss 5.1, I can successfully run the test and test1 sample reports added with birt integration. I can also view the data witht the seam generated web pages. So it seems my birt installation works fine along with my hibernate entity manager.
When I try to run my report that uses the Hibernate ODA datasource i get the following message:
The following items have errors:
Table (id = 9):
+ An exception occurred during processing. Please see the following message for details:
Cannot find or process the org.jboss.tools.birt.oda driver's data source extension configuration.
Cannot find the ODA dataSource extension (org.jboss.tools.birt.oda).
Check the workspace log file for any problems with loading the extension bundle and its dependencies.
The ReportEngine log shows this:
Jun 16, 2011 11:20:43 AM org.eclipse.birt.data.engine.odaconsumer.Driver doGetDriverManifest
SEVERE: Cannot find or process the ODA data source extension configuration.
java.lang.IllegalArgumentException: Cannot find the ODA dataSource extension (org.jboss.tools.birt.oda).
Check the workspace log file for any problems with loading the extension bundle and its dependencies.
at org.eclipse.datatools.connectivity.oda.util.manifest.ManifestExplorer.getExtensionManifest(ManifestExplorer.java:200)
at org.eclipse.birt.data.engine.odaconsumer.Driver.doGetDriverManifest(Driver.java:150)
at org.eclipse.birt.data.engine.odaconsumer.Driver.findDataSourceExtensionConfig(Driver.java:126)
at org.eclipse.birt.data.engine.odaconsumer.Driver.getDriverExtensionConfig(Driver.java:78)
at org.eclipse.birt.data.engine.odaconsumer.Driver.getExtensionConfig(Driver.java:60)
at org.eclipse.birt.data.engine.odaconsumer.Driver.createNewDriverHelper(Driver.java:97)
at org.eclipse.birt.data.engine.odaconsumer.DriverManager.getDriverHelper(DriverManager.java:111)
at org.eclipse.birt.data.engine.odaconsumer.DriverManager.getNewDriverHelper(DriverManager.java:100)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:150)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
I grabbed the source code for ManifestExplorer and added some logging. It looks like the hibernate oda plugin is not being found. These are the plugins that are returned from the ExtensionRegistry:
org.eclipse.birt.report.data.oda.jdbc.dbprofile
org.eclipse.birt.report.data.oda.jdbc
org.eclipse.birt.report.data.oda.sampledb
org.eclipse.birt.report.data.oda.xml
org.eclipse.datatools.connectivity.oda.flatfile
org.eclipse.datatools.enablement.oda.ws
org.eclipse.datatools.enablement.oda.xml
org.jboss.tools.birt.oda is not listed. I do have the org.jboss.tools.birt.oda_1.2.0.v20110215-1225-H29-GA plugin in my plugins folder. I have tried using it both in a jar and exploded.
Any thoughts on how to make BIRT recognize the plugin? I also tried these same steps with my actual database with the identical results.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/610705#610705]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JNDI and Naming] - NameNotFoundException with "Not Bound" message
by Munna K
Munna K [http://community.jboss.org/people/memunis] created the discussion
"NameNotFoundException with "Not Bound" message"
To view the discussion, visit: http://community.jboss.org/message/637742#637742
--------------------------------------------------------------
I have a stateless EJB application packaged as jar file, where ejb-jar.xml, jboss.xml & persistence.xml files are there. I am using the lookup in a web application as below:
I am doing lookup as:
InitialContext ic = new InitialContext();
Object ref = ic.lookup("InduspnUserAdminReadInterface");
UserAdminReadInt localUserAdminRead = (UserAdminReadInt)PortableRemoteObject.narrow(ref,UserAdminReadInt.class);
My web application has web.xml & jboss-web.xml files (Pls find attachment). in jboss-4.0.5 it is working fine with my code. when I deployed in jboss6.1.0 Final, it is giving the NameNotFoundException with "not bound"
**************************************
2011-11-22 20:23:11,742 ERROR [STDERR] (http-0.0.0.0-8080-5) javax.naming.NameNotFoundException: InduspnUserAdminReadInterface not bound
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at javax.naming.InitialContext.lookup(InitialContext.java:392)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at com.induspn.servlet.InduspnAdminServlet.doPost(InduspnAdminServlet.java:132)
2011-11-22 20:23:11,743 ERROR [STDERR] (http-0.0.0.0-8080-5) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
2011-11-22 20:23:11,744 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
2011-11-22 20:23:11,745 ERROR [STDERR] (http-0.0.0.0-8080-5) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
******************************
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637742#637742]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JBoss Web Services] - Re: Jboss 6.0 WebService Client with SSL (Saaj)
by Fabiano Oss
Fabiano Oss [http://community.jboss.org/people/fabiano.oss] created the discussion
"Re: Jboss 6.0 WebService Client with SSL (Saaj)"
To view the discussion, visit: http://community.jboss.org/message/604247#604247
--------------------------------------------------------------
protected ByteArrayOutputStream sendMessage(URL urlWSDL, QName qService, QName qPort, String soapMessage) throws Exception {
MessageFactory factory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
SOAPMessage message;
MimeHeaders header = new MimeHeaders();
header.addHeader("Content-Type", "application/soap+xml");
message = factory.createMessage(header, new ByteArrayInputStream(soapMessage.toString().getBytes()));
Service service = Service.create(urlWSDL, qService);
Dispatch<SOAPMessage> dispatch = service.createDispatch(qPort, SOAPMessage.class,Service.Mode.MESSAGE);
setSecurity(dispatch);
SOAPMessage res = dispatch.invoke(message);
ByteArrayOutputStream out = new ByteArrayOutputStream();
res.writeTo(out);
return out;
}
private void setSecurity(Dispatch<SOAPMessage> dispatch) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, InvalidKeyException, InvalidKeySpecException, UnrecoverableKeyException {
Client client = ((org.apache.cxf.jaxws.DispatchImpl) dispatch).getClient();
HTTPConduit http = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
setProxy(security, http, httpClientPolicy);
http.setClient(httpClientPolicy);
TLSClientParameters tlsParams = new TLSClientParameters();
TrustManager[] trustMgr = addTrustManagers(security);
KeyManager[] keyMgr = addCertificado(security);
tlsParams.setKeyManagers(keyMgr);
tlsParams.setTrustManagers(trustMgr);
http.setTlsClientParameters(tlsParams);
}
private void setProxy(SegurancaDES security, HTTPConduit http,
HTTPClientPolicy httpClientPolicy) {
httpClientPolicy.setProxyServer("192.168.1.1");
httpClientPolicy.setProxyServerPort("3128");
http.getProxyAuthorization().setUserName("proxyUser");
http.getProxyAuthorization().setPassword("proxyPassword);
}
private KeyManager[] addCertificado(SegurancaDES security)
throws KeyStoreException, IOException, NoSuchAlgorithmException,
CertificateException, FileNotFoundException,
UnrecoverableKeyException {
KeyStore ks1;
ks1 = KeyStore.getInstance("PKCS12");
ks1.load(new FileInputStream(new File("file path")),"password".toCharArray());
KeyManagerFactory keyFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
keyFactory.init(ks1, "password".toCharArray());
KeyManager[] keyMgr = keyFactory.getKeyManagers();
return keyMgr;
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/604247#604247]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years