[JBossWS] - no java-xml-type-mapping from wscompile
by dschneider@e2open.com
I've been trying to provide a Web Service implementation on our JBoss 4.0.3 servers from an externally provided WSDL. After running wscompile -import to generate the SEI, I noticed the methods in the generated interface took a single SOAPElement parameter and returned SOAPElement. Initially I hadn't run wscompile with the -f:nodatabinding flag, though after many days of reading the documentation I realized that's probably what I wanted all along. But what I got on the server side when trying to start up the service were a series of the following warnings:
| 2006-09-13 21:29:22,188 WARN [org.jboss.webservice.metadata.jaxrpcmapping.JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {urn:oasis:names:tc:SPML:1:0}addRequest
| 2006-09-13 21:29:22,215 WARN [org.jboss.webservice.deployment.TypeMappingDescription] Class not found: javax.xml.soap.addRequest
|
And then when trying to call the service it would result in the following exception:
| 2006-09-13 21:32:15,955 ERROR [org.jboss.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: Deserializing parameter 'addRequest': could not find deserializer for type {urn:oasis:names:tc:SPML:1:0}addRequest
|
After poking around a little I realized this was probably due to the generated mapping file not having any java-xml-type-mapping entries. So to fix the errors I added entries like the following:
| <java-xml-type-mapping>
| <java-type>javax.xml.soap.SOAPElement</java-type>
| <root-type-qname xmlns:rtq="urn:oasis:names:tc:SPML:1:0">rtq:addRequest</root-type-qname>
| <qname-scope>simpleType</qname-scope>
| </java-xml-type-mapping>
|
This made the warnings go away, but then when I tried invoking the service I get a different exception:
| 2006-09-13 18:07:29,624 ERROR [org.jboss.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: Unable to create JavaBean of type javax.xml.soap.SOAPElement. Missing default constructor? Error was: java.lang.InstantiationException: javax.xml.soap.SOAPElement.
|
I'm pretty sure the interface is defined properly as that's how the use of the nodatabinding option is described in the JAX RPC Patterns and Strategies doc: http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index3...
So at this point I believe the root of the problem is in how I specified the mapping entries. So my questions are:
1) Any idea why wscompile didn't include the java-xml-type-mapping entries? Could it have been because the WSDL (and included XSDs) contained some unsupported xsd types (e.g. xsd:choice)?
2) Do my manual additions of the java-xml-type-mapping entries look correct?
Any pointers would be greatly appreciated. Oh, and moving up to 4.0.4 at this point would be difficult, so hopefully that's not the only solution.
Thanks,
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971451#3971451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971451
19 years, 7 months
[Remoting] - Re: Timeout parameter - can I specify timeout per request?
by sarbu
Thanks Tom,
I made the changes as per your suggestion, the request still is timing out incorrectly.
The client is created as shown below:
-------------------------------------------
String hostName = InetAddress.getLocalHost().getHostName();
String locatorURI = "socket://" + hostName + ":5000/?timeout=120000";
InvokerLocator locator = new InvokerLocator(locatorURI);
Client client = new Client(locator);
The server connector also has the same timeout configuration.
The changes as per your suggestion when calling the invoke:
----------------------------------------------------------------------
HashMap config = new HashMap();
config.put("timeout", new Long(5000)); // Test - 5 seconds
res = client.invoke(arg, config);
The request is not timing out correctly even with the above code changes. I am using Java version 1.4.2 and JBossRemoting 1.4.1.
I am not sure if I am missing anything here.
Thanks
Saravanan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971447#3971447
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971447
19 years, 7 months
[Beginners Corner] - Looking up MessageDrivenBean/MessageListener
by OCGabriel
Hi,
Firstly, i am using JBoss 3.2.7 (this cant be changed).
I have the following scenario and im stuck for ideas on what is going on and why its failing to lookup as you will see.
I have a queue called: BatchProcessorQueue
(The queue works fine with the unit tests i have in place)
I have an MDB with the following description:
package mdb;
|
| //imports
|
| /**
| * @ejb.bean
| * name="ejb/BatchProcessorBean"
| * display-name="BatchProcessorBean"
| * acknowledge-mode="Auto-acknowledge"
| * destination-type="javax.jms.Queue"
| * subscription-durability="Durable"
| *
| * @jboss.destination-jndi-name
| * name="queue/BatchProcessorQueue"
| */
| public class BatchProcessorBean implements MessageDrivenBean, MessageListener
| {
| // non relevant code
| }
When this MDB is loaded into JBoss, the entry i see in the JMX console is:
jboss.j2ee
| binding=message-driven-bean,jndiName=local/ejb/BatchProcessorBean@24345503,plugin=invoker,service=EJB
In another bean i have the following code where i actually try to locate the MDB but it isnt able to locate the MDB and every combination ive tried for the object name isnt working.
JMSContainerInvokerMBean invoker = null;
|
| try
| {
| ObjectName configObjName = new ObjectName(
| "jboss.j2ee:name=local/ejb/BatchProcessorBean"
| );
|
| invoker = (JMSContainerInvokerMBean) MBeanProxy.get(
| JMSContainerInvokerMBean.class,
| configObjName,
| MBeanHelper.getMBeanServer() );
| }
| catch ( Exception e )
| {
| log.warn( "failed to obtain a valid service configuration MBean, using default, " + e.getMessage() );
| e.printStackTrace();
| }
|
| if(invoker != null)
| {
| try
| {
| log.info("Stopping the MBean");
| invoker.stop();
| log.info("Setting MBean to size of " + size);
| invoker.setMaxPoolSize(size);
| log.info("Starting the MBean");
| invoker.start();
| return true;
| }
| catch (Exception e)
| {
| log.warn("Failed to restart the BatchProcessorBean MBean");
| e.printStackTrace();
| }
| }
Having tried countless combinations for the lookup but the error i get is this:
01:44:09,111 WARN [AdapterBean] failed to obtain a valid service configuration MBean, using default, Object name jboss.j2ee:binding=message-driven-bean,jndiName=local/ejb/BatchProcessorBean@24345503,plugin=invoker,service=EJB not found: javax.management.InstanceNotFoundException: jbos
| s.j2ee:binding=message-driven-bean,jndiName=local/ejb/BatchProcessorBean@24345503,plugin=invoker,service=EJB is not registered.
| 01:44:09,111 INFO [STDOUT] org.jboss.mx.util.MBeanProxyCreationException: Object name jboss.j2ee:binding=message-driven-bean,jndiName=local/ejb/BatchProcessorBean@24345503,plugin=invoker,service=EJB not found: javax.management.InstanceNotFoundException: jboss.j2ee:binding=message-driven-bean,j
| ndiName=local/ejb/BatchProcessorBean@24345503,plugin=invoker,service=EJB is not registered.
| 01:44:09,142 INFO [STDOUT] at org.jboss.mx.util.JMXInvocationHandler.<init>(JMXInvocationHandler.java:150)
| 01:44:09,142 INFO [STDOUT] at org.jboss.mx.util.MBeanProxy.get(MBeanProxy.java:76)
| 01:44:09,142 INFO [STDOUT] at org.jboss.mx.util.MBeanProxy.get(MBeanProxy.java:64)
| .
| .
| .
| .
|
Am i missing something somewhere in regards to configuration of the MDB? Does anyone have a similar sort of example i can refer to ? As u will have noticed im trying to restart the target mean that im trying to lookup.
Am i trying to do the impossible here ? Ive tried to follow this:
http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanAnEJBCallAnMBean
But i dont think it works so well in this situation, or am i missing something from this guide in my implementation ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971446#3971446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971446
19 years, 7 months
[JBoss jBPM] - Re: Migration from Vitria to jBPM
by bernhardg
Thanks for you comment, Tom. I am basically going the route you suggest. I do a simple conversion and see what else I need to take into account.
Luckily we are using BPM in a very light weight way - basically we use it as state machine and message pipe only. We do not use any Vitria rights management and only one business object. Everthing else happens outside of Vitria.
I am currently working on a proof of concept. I plan to
- replace the corba/messaging mechanism used for client/server communication with WebService. Currently 'events' which are actually method calls are sent over the message channel.
- On the server side I use a BPM management object to process the 'events' and mimic what Vitria currently does.
That way I do not need to change the interface to Vitria that is currently used.
Hopefully, once the transition is done we can start using BPM the way it is intended ;-).
THX,
Bernhard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971444#3971444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971444
19 years, 7 months
[JBoss Seam] - JSF f:subview rendered attribute ignored
by ngeadah
Hi All,
I'm posting this here since I know that the "rendered" attribute of the JSF "subview" tag works fine in normal circumstances, but since I started using Seam it has stopped working!
In a JSP, I have the following:
| <f:subview id="mySubView1" rendered="#{form.submissionType == 'VA5'}">
| <jsp:include flush="false" page="test.jsp"/>
| </f:subview>
|
And even though I know for a fact that the expression "form.submissionType == 'VA5'" is evaluated to false, the contents of the jsp include still gets rendered!
I know my expression is correct since I use the exact same condition on an h:outputText tag, for example and rendering behaves perfectly as expected.
Is there something that Seam might be doing to get in the way of the rendered attribute of subview tags?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971443#3971443
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971443
19 years, 7 months
[Messaging, JMS & JBossMQ] - Re: ping timeout after successful reconnect to server
by vbijjargi
Hi,
I am still getting the same error. Could you please help me out.
my connect method is as below:
public void connectToQueue() throws NamingException, JMSException {
log.info("connecting to JMS Queue");
try {
// Get appserver IP and port from application session
appServerIP = (String) applicationSession.getProperty(SC.JBOSS_SERVER_IP);
jmsPort = (String) applicationSession.getProperty(SC.JMS_PORT);
// get connection properties and context
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, SC.INITIAL_CONTEXT_FACTORY);
properties.put(Context.URL_PKG_PREFIXES, SC.URL_PKG_PREFIXES);
properties.put(Context.PROVIDER_URL, SC.PROVIDER_URL_PROTOCOL + appServerIP + ":"+ jmsPort);
iniCtx = new InitialContext(properties);
// get connected to the JMS queue
queueConnection = ((QueueConnectionFactory) iniCtx.lookup("ConnectionFactory")).createQueueConnection();
queueConnection.start();
connectedToQueue = true;
log.debug("connected with JMS queue");
} catch (NamingException ne) {
log.error("exception in connectToQueue method -" + ne);
connectedToQueue = false;
throw ne;
} catch (JMSException jmse) {
log.error("exception in connectToQueue method -" + jmse);
connectedToQueue = false;
throw jmse;
}
}
Now it reads the messages from queue. I have more than 10 messages per second and suddenly I get the pong timeout message. It appears periodically.
Please help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971442#3971442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971442
19 years, 7 months
[JBossCache] - Re: Minimizing POJOCache impact on existing codebases
by ben.wang@jboss.com
Greg,
To answer your questions regarding load-time instrumentation.
1. You will notice in the examples dir, I have not put any load-time examples there. The main reason actually is that we don't encourage load time option for production usage. This is because, say, 1) run under JBoss AS, it will be very slow to start AS because JBoss Aop/Javaassit need to inspect all of the classes involved, and 2) under other AS envs, no way we can have our own special class loader without servere tinkering.
So unless you run it as a standalone, load-time option is not that good. You will notice that Terracotta has had vendor specific start up scripts, of which is a pain, IMO.
And honestly, I don't see the downside of using AOPC for production. Do you see one?
2. So like you mentioned, it is good to learn this product using load-time option. I agree. Actually, I use the following Java options to run the unit test inside my IDE:
-Djboss.aop.path=${output}/resources/jboss-aop.xml -javaagent:${lib-50}/jboss-aop-jdk50.jar
So can you possibly contribute an example that runs with load time? :-)
3. Finally, PojoCache with default configuration property (e.g., LOCAL mode) is simply not interesting. You can't see the fine-grained graph replication at work!
-Ben
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971441#3971441
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971441
19 years, 7 months