[JBossWS] - Re: Generate wsdl from JSR 181 POJO
by allantodd
Hi,
I've been looking at this too over the last few days. The easiest way I can find is to do the following:
1) Compile your annotated JSR 181 pojo
2) Create a war file containing just the pojo class and web.xml
3) Deploy the war file and use your browser to get the WSDL by browsing to, for example, http://localhost:8080/jaxws-samples-jsr181pojo/TestService?wsdl
4) Save the WSDL and use this to generate the endpoint interface, JAX-RPC mapping, etc as per the example in the JBossWS user guide.
If you look at the war file created by the JSR181 POJO example, you will see that it doesn't include the supplied WSDL file. The WSDL file is provided just for use by wstools, and is basically identical to the one you will get from your browser.
| jar tvf output/libs/jaxws-samples-jsr181pojo.war
|
| META-INF/
| META-INF/MANIFEST.MF
| WEB-INF/
| WEB-INF/web.xml
| WEB-INF/classes/
| WEB-INF/classes/org/
| WEB-INF/classes/org/jboss/
| WEB-INF/classes/org/jboss/test/
| WEB-INF/classes/org/jboss/test/ws/
| WEB-INF/classes/org/jboss/test/ws/jaxws/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/jsr181pojo/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSEBean01.class
|
It ought to be possible to get hold of the WSDL some other way, but I haven't figured it out yet. A bit of a shortcoming in the example I think.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022351#4022351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022351
19Â years, 1Â month
[JBoss Messaging] - Re: java.lang.IllegalAccessError in 1.2.0.CR1
by bnarayan
Below is a sample MDB that i use
import javax.ejb.EJBException;
| import javax.ejb.MessageDrivenBean;
| import javax.ejb.MessageDrivenContext;
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import javax.jms.TextMessage;
|
|
|
|
| public class MyMDB implements MessageDrivenBean, MessageListener
| {
| private static final String COB_ID = "COB_ID";
| private static final String CONTAINER = "CONTAINER";
| private static final String ITEM_ID = "ITEM_ID";
| private static final String INFO_ID = "INFO_ID";
| private static final String LAST_UPDATED = "LAST_UPDATED";
| private static final String MEM_ID = "MEM_ID";
|
| private MessageDrivenContext mdbContext = null;
|
| public void onMessage(Message message)
| {
| try
| {
| TextMessage textMessage = (TextMessage) message;
| System.out.println("My MDB get called");
| String cobrandId = message.getStringProperty(COB_ID);
| String container = message.getStringProperty(CONTAINER);
| String cacheItemId = message.getStringProperty(ITEM_ID);
| String sumInfoId = message.getStringProperty(INFO_ID);
| String lastUpdated = message.getStringProperty(LAST_UPDATED);
| String memId = message.getStringProperty(MEM_ID);
|
| System.out.println("message contains :" );
| System.out.println("cobId : " + cobId);
| System.out.println("container : " + container);
| System.out.println("ItemId : " + ItemId);
| System.out.println("InfoId : " + InfoId);
| System.out.println("lastUpdated : " + lastUpdated);
| System.out.println("mem id: " + memId);
| //Calling functions to process the message
| }
| catch(Exception e)
| {
| e.printStackTrace();
| }
| }
|
| public void setMessageDrivenContext(MessageDrivenContext context)
| throws EJBException {
| this.mdbContext = context;
| }
|
| public void ejbCreate() {
| }
|
| public void ejbRemove() {
| }
| }
|
jms-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
|
| <!-- ==================================================================== -->
| <!-- WSMQ connection factories -->
| <!-- ==================================================================== -->
|
| <!-- non XA provider loader and connection factory -->
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
| <attribute name="ProviderName">DefaultJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">
| org.jboss.jms.jndi.JNDIProviderAdapter
| </attribute>
| <attribute name="QueueFactoryRef">MDBDLQCF</attribute>
| <attribute name="TopicFactoryRef">MDBTestQueueCF</attribute>
| <attribute name="Properties">java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory</attribute>
| <attribute name="Properties">java.naming.provider.url=localhost:1099</attribute>
| <attribute name="Properties">java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</attribute>
| </mbean>
|
| </connection-factories>
|
|
Entries of the above mentioned CFs in connection-factories-service.xml
<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
| name="jboss.messaging.connectionfactory:service=MDBDLQCF"
| xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=socket</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
|
| <attribute name="JNDIBindings">
| <bindings>
| <binding>/MDBDLQCF</binding>
| </bindings>
| </attribute>
|
| <attribute name="Clustered">true</attribute>
| <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
| </mbean>
|
| <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
| name="jboss.messaging.connectionfactory:service=MDBTestQueueCF"
| xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=socket</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
|
| <attribute name="JNDIBindings">
| <bindings>
| <binding>/MDBTestQueueCF</binding>
| </bindings>
| </attribute>
|
| <attribute name="Clustered">true</attribute>
| <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
| </mbean>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022347#4022347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022347
19Â years, 1Â month
[JBoss Seam] - How to configure Seam correctly (Seam1.1.7RC1 and filter map
by baz
Chapter 19 (for Seam 1.1.6) and Chapter 20(Seam 1.1.7RC1) are somewhat different.
Filters are configured in web.xml (1.1.6) or components.xml(1.1.7)
This is achieved through a so called master filter, when i understand it correctly.
It seems that i can use my old seam configuration also with seam 1.1.7.
My question is about using seam together with ajax4jsf:
When someone downloads (https://ajax4jsf.dev.java.net/nonav/ajax/ajax-jsf/download.html#binary) ajax4jsf a page is shown where the ajax4jsf filter is configured via servlet mapping. Also there is this note:
anonymous wrote : Note: If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others.
There is a little pitfall here. If you configure ajax4jsf as suggested on the download page and all other filters via url mapping, the ajax filter will be the last. This is due to the priority rules in the servlet spec.
In my web.xml servlet mapping is used for all my filters mapped to the Faces Servlet. Is this approch recommended? And how can i use it with the new functionality introduced with seam1.1.7RC1? Which dispatchers are required? Is the config below correct?
<filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| <dispatcher>REQUEST</dispatcher>
| </filter-mapping>
The benefit of sevlet mapping is:
There is only one point where the url pattern is specified. Changes are easier.
For me i would suggest to use servlet mappings for seam (in the examples and in the docs) if this is conform with seam1.1.7
Thanks for reading so far. I am eager to read your feedback.
Ciao,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022337#4022337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022337
19Â years, 1Â month
[JBoss Seam] - Re: First JBoss Seam book released
by dxxvi
"kasim" wrote :
| Just a quick comment.
|
| The books may be out of date already (including the one i wrote) ... if you are an experienced Seam developer.
|
| However ... the books tend to go over a lot of the foundations and basics. These items arent changing drastically. And the other items like iText, etc ... once you have the basics are easily understandable.
|
| So at the very least ... they are good for that information.
|
| Heck i've used Hibernate for years ... and still use my hibernate book as a reference on a few things.
|
|
So sad to hear that :(( because that means I wasted about $17 to buy this book on buy.com.
I prefer having the book thinner/shorter because of the removal of all outdated information than having a thick/long book with uncompilable/deprecated examples.
IMHO, it's better not to publish the book in Apr 07, wait for a couple of months when Seam is "mature" (I don't mean that mature is buggy) enough, then update the book. I think I will use Spring (including Acegi) + JPA + JSF + Facelets + Ajax4jsf for this year then Seam & Spring can integrate and we have the best of the bests?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022335#4022335
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022335
19Â years, 1Â month