[JBoss Web Services] - JBoss 4.2.3 + JRE 1.7 error - JAX-WS implementation
by Pavan BG
Pavan BG [https://community.jboss.org/people/pavanbgu] created the discussion
"JBoss 4.2.3 + JRE 1.7 error - JAX-WS implementation"
To view the discussion, visit: https://community.jboss.org/message/737622#737622
--------------------------------------------------------------
Hi,
While running JBoss4.2.3 in JRE1.7 environment, web services deployment failed. After debugging further, I figured out this is a known bug in JRE1.7 ( http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6974244 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6974244).
The Bug description says,
+"In recent JDK7 builds, Throwable has a new method:+
+public Throwable[] getSuppressedExceptions()+
+JAX-WS 2.0 spec 3.7 Service Specific Exception says+
+For each getter in the exception and its superclasses, a property of the same type and name is added+
+to the bean. The getCause, getLocalizedMessage and getStackTrace getters from java-+
+.lang.Throwable and the getClass getter from java.lang.Object are excluded from the list+
+of getters to be mapped."+
+This creates a JAXB bean for an exception with a "suppressedExceptions" property. This causes JAXB to fail. *JAX-WS spec needs to be updated to add this method to the above list of methods.*+
I looked at JAX-WS 2.2 spec which has this section updated and it says
+"For each getter in the exception and its superclasses, a property of the same type and name is added to+
+the bean. All the getter methods except getMessage from java.lang.Throwable type hierarchy+
+are excluded from the list of getters to be mapped."+
Looks like in JAX-WS 2.2, the above condition is removed. JBoss 6.0 release notes says it has endorsed JAX-WS2.2 ( https://community.jboss.org/docs/DOC-14791 https://community.jboss.org/wiki/AS600M2ReleaseNotes). After testing the same application in JBoss 6.0, the issue was not observed.
*Now the question I have is, is it possible to continue to use JBoss 4.2.3 but to replace the default JAX-WS implementation from 2.0 to 2.2 compliant. Can we control this at each component level. Is there a way to override the default implementation.*
Regards,
Pavan
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737622#737622]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[JBoss Web Services] - How do I upgrade web service using WSDL with multiple schema namespaces?
by Kelly Dolan
Kelly Dolan [https://community.jboss.org/people/kdolan1] created the discussion
"How do I upgrade web service using WSDL with multiple schema namespaces?"
To view the discussion, visit: https://community.jboss.org/message/737474#737474
--------------------------------------------------------------
Hi! I need some help upgrading a web service. I'm getting a specific error, found work arounds cited on various sites but am still not working because I must be mis-interpreting something.
I inherited code that runs w/in JBoss 4.0.1sp1 and I need to port it to JBoss 7. My current issue is with a specific web service. What I have is:
* MyApp.jar that contains a set of classes
-- com.myapp.ws.MyPort.java (extends Remote)
-- com.myapp.ws.MyServiceImpl.java (implements SessionBean, MyPort)
-- com.myapp.ws.types.<various POJOS>.java (represents input and output types)
-- com.myapp.ws.operations.<various POJOS>.java (represents operations, request and response objects)
-- com.myapp.ws.faults.<various POJOS>.java (represents exceptions)
* webservices.xml
* jaxrpc-mapping.xml
* MyService.wsdl
>From what I gather, the above is a J2EE 1.4 web service (based on Axis) implemented as an EJB service endpoint. I do not know how any of the above was generated (e.g., wstools, manually). There is nothing in a build files...these files must have been generated once and checked into the source code repository.
The key thing to note is in MyService.wsdl, multiple schemas are defined each assigned to a different namespace. Then in the jaxrpc-mapping.xml file, each namespace is mapped to a different package.
{code:xml}<types>
<schema targetNamespace=" http://mentor.inmedius.com/types http://mentor.inmedius.com/types"
xmlns=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
...
</schema>
<schema targetNamespace=" http://mentor.inmedius.com/operations http://mentor.inmedius.com/operations"
xmlns=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
</schema>
...{code}
{code:xml}<package-mapping>
<package-type>com.myapp.ws.types</package-type>
<namespaceURI> http://my.company.com/types http://my.company.com/types</namespaceURI>
</package-mapping>
<package-mapping>
<package-type>com.myapp.ws.operations</package-type>
<namespaceURI> http://my.company.com/operations http://my.company.com/operations</namespaceURI>
</package-mapping>
...{code}
The general error I'm seeing is...
13:58:46,726 ERROR [org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] (MSC service thread 1-2) JBossWS_xxx_faults7626102231361680514.xsd[domain: http://www.w3.org/TR/xml-schema-1 http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-re...: Error resolving component 'types:tMyType'. It was detected that 'types:tMyType' is in namespace ' http://my.company.com/types http://my.company.com/types', but components from this namespace are not referenceable from schema document 'file:/C:/jboss-as-7.1.1/standalone/tmp/jbossws/JBossWS_xxx_faults7626102231361680514.xsd'. If this is the incorrect namespace, perhaps the prefix of 'types:tMyType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/jboss-as-7.1.1/standalone/tmp/jbossws/JBossWS_xxx_faults7626102231361680514.xsd'.
I've searched and searched and pretty much found that JBOSSWS (JAX-WS and tools) does not like multiple schemas/namespaces in the same WSDL. When the individual XSD files get generated the proper imports are not generated. Two different work arounds have been suggested.
1. Consolidate everything into one package/namespace. This would appear to be the easiest. However, in my case one of the namespaces is mapped to a standard Java package (java.util)...to support using Map as an input/output parameter.
2. Split the WSDLs. ( http://metro.1045641.n5.nabble.com/Trouble-compiling-WSDL-with-multiple-s... http://metro.1045641.n5.nabble.com/Trouble-compiling-WSDL-with-multiple-s...)
It's option #2 that I'm stuck on and baffled at. The URL referenced speaks to splitting the WSDL and then running wscompile. As far as I can tell, I'm not trying to run wscompile because I technically already have my artifacts. I tried splitting the WSDL by simply breaking it down into separate files (e.g., top-level WSDL imports other WSDL snippets). This did not work and I can generally see why...it results in one WSDL file parsed.
What I can't wrap my head around is...I have one service endpoint interface, URL, etc. to access my web service. This is defined in webservices.xml which points to one WSDL file and one jaxrpc-mapping.xml. The one WSDL file defines the service URL. If I should be able to split the WSDLs, what exactly does this mean? How does it impact those other files? And while there are multiple namespaces/schemas/packages, there are dependencies across them. For example, the operations package is dependent on the types package.
Very confused....any and all help is greatly appreciated.
Kelly
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737474#737474]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - jbpm5-example-for-forms-with-variables
by Bhaskaran Venkataraman
Bhaskaran Venkataraman [https://community.jboss.org/people/bhaskarven] created the discussion
"jbpm5-example-for-forms-with-variables"
To view the discussion, visit: https://community.jboss.org/message/737449#737449
--------------------------------------------------------------
I am trying to understand the example discussed in the following blog. Excellent example to explain the concepts.
https://community.jboss.org/people/bpmn2user/blog/2011/02/21/jbpm5-exampl... https://community.jboss.org/people/bpmn2user/blog/2011/02/21/jbpm5-exampl...
I have a few questions related to that.
1. What is the purpose of the "Preprocess" script task ?
From the example it looks like it creates a map object and sets default values for modelNumber, quantity and priority. The map
object that contains these parameters are mapped to map process variable by the code :
kcontext.setVariable("map", map);
The content parameter is set to map in the human task "Sample Order Task" as shown below in the properties window
Parameter Mapping {content=map}
When the user is going to input values in the human task form why is there a need to preset variables in the
"Preprocess" script task ?( which are anyway going to be overwritten by the human task "Sample Order Task" )
My understanding is that we only need result mapping to transfer the values entered by the user back
to process variables.
Am I missing something here ?
2. There are 2 ftl forms in the zip file "ProcessOrder.ftl" and "SampleApprovalTask.ftl" which I understand are related to the human tasks
"Sample Order Task" and "Sample Approval Task". There is a third one "com.sample.bpmn.sampleHTformvariables.ftl" and also its image
com.sample.bpmn.sampleHTformvariables.png. I did not understand the context for these 2 files ?
3. I believe the driver ( Java Program ) that came for the sample Evaluation application should work for this application also. Am I right ?
Your response will be greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737449#737449]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[EJB3] - Websphere MQ integration with MDB on AS7/EAP6 reloaded
by Akram Ben Aissi
Akram Ben Aissi [https://community.jboss.org/people/akrambenaissi] created the discussion
"Websphere MQ integration with MDB on AS7/EAP6 reloaded"
To view the discussion, visit: https://community.jboss.org/message/737377#737377
--------------------------------------------------------------
Hello all,
A similar subject has been discussed at most in 2 other threads a few months ago, and since I am working on a similar subject I would like to try to make the situation the clearer possible to incitate my customer to raise tickets on the relevant vendors.
So the subject is the integration of Webpshere MQ with MessageDrivenBean on JBoss AS7 / EAP6 (Beta2).
Here is the code:
@MessageDriven(name = "WebsphereMQMessageDrivenBean", mappedName = "mdb/WebsphereMQMessageDrivenBean", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "TEST_QUEUE"),
@ActivationConfigProperty(propertyName = "queueManager", propertyValue = "TEST_QUEUE_MANAGER"),
@ActivationConfigProperty(propertyName = "hostName", propertyValue = "localhost"),
@ActivationConfigProperty(propertyName = "port", propertyValue = "1416"),
@ActivationConfigProperty(propertyName = "channel", propertyValue = "JBOSS.SVRCONN") })
@ResourceAdapter("wmq.jmsra.rar")
@TransactionManagement(CONTAINER)
@Named
public class WebsphereMQMessageDrivenBean implements MessageListener {
Clearly, the issue is that nobody can't live with the configuration hardcoded. And even if setting this configuration in jboss-ejb3.xml (which also works perfectly), that leads to change the JAR/EAR/WAR before putting in production, which is quite dangerous.
It seems that, in the past several workarounds used to exist (AOP or using placeholders in deployment desciptors) that would not work anymore with AS7. Anyway, these were workarounds, and a real solution is always better.
As a conclusion of another thread, it seems that this is specific to the used resource adapter, which I really want to be sure.
To do so, here are two tracks that I would like to explore:
Is there a way to set the jndi name of the "destination" of an MDB ? Other vendors seem to use a property destination-jndi-name in customer descriptor to set it. Moreover, MQ also has a parameter useJNDI (default false) to change how the "destination" parameter must be interpreted. And this does not seem to have effect. According to their doc, if useJNDI is set to true, the "destination" parameter is treated as the JNDI name of the destination queue. How can we be sure that the JNDI lookup is properly performed (with the correct InitialContext)? This does not seem to be the case, because MQ still tries to use "hostName" and the other configuration parameters, which are set in the AS configuration.
The other track is changing the default Resource Adapter for JMS: This is documented in EAP6 official doc, and it works: One can change from hornetq-ra to wmq.jmsra.rar which turns mq to the default JMS provider for MDB. And this allows to get rid of the @ResoruceAdapter annotation. But, even if a resource adapter wmq.jmsra.rar is declared and properly default configured, the JMS provider arrives unconfigured to the MDB and needs ActivationConfigProperty to work.
Is this the expected behaviour? If yes, that would be nice if the wmq.jmsra.rar could be treated as reference accompagned with its configuration instead of the name or the rar to load.
I am not sure a solution that would make everybody (or at least me) happy exists, so please treat this discussion as a feature request.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737377#737377]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months