[JBoss Web Services Users] - /webservices context root unavialable in jboss 4.2.3 upon re
by sridhar18
I'm running into a problem with jboss webservies and wondering if anyone has a solution for it..
Our environment:
Jboss 4.2.3
Java 1.6
Ejb 2.1, Ejb3.
We have an ear application that has two ejb modules in it. One contains ejb2.1 stuff and one contains ejb3 stuff. Both have ejbs and webservices in them. They have two different webservice context roots.
The ejb2.1 module uses /xxxx-ws as the context root while the ejb3 module uses /webservices as the context root. I run into the problem each time I restart my jboss. For some reason, the /webservices context root is not available when I try to go to the jbossws context to access the wsdls. It gives me HTTP 404 error (the requested resource is not available). The ejb2.1 webservice context is always available though. Only when I delete my ear module from the deploy directory and redeploy the ear, I'm able to see the ejb3 webservices context root and all the wsdls inside that root.
I'm wondering this is some kind of race condition but not sure.
Has anyone seen this kind of behavior before? I appreciate any help. Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261868#4261868
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261868
15 years, 2 months
[JBoss Web Services Users] - Failed to load: org.jboss.ws.tools.jaxws.impl.JBossWSProvide
by sawan1424
Hi ,
I am new to JBossWS CXF.I am using Eclipse 3.5 Galileo with JBoss AS 4.2.3G.A. I downloaded jbossws-cxf-3.0.2.GA.zip from JBoss website. I extracted the zip and modify the ant.properties file and executed the command accordingly.It executed successfully.I also successfully downloaded JBoss Tools plugins which having inbuilt Jboss WS plugin.
I already setting correct value of JBoss AS in the JBoss WS preferences option from preference option of Eclipse IDE.
After the When created a dynamic project with Jboss 4.2.3 as run time environment.After that I created a java file as
package com.webservice.ws;
@WebService
public class Converter {
@WebMethod
public float celsiusToFarenheit ( float celsius )
{
return (celsius * 9 / 5) + 32;
}
@WebMethod
public float farenheitToCelsius ( float farenheit )
{
return (farenheit - 32) * 5 / 9;
}
}
After that I have to create a wdsl files from this POJO.
So I am selecting Bottom up approach and select this java file and proceed furthe.But after it is throwing an exception
Exception in thread "main" java.lang.IllegalStateException: Failed to load: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:205)
at org.jboss.wsf.spi.util.ServiceLoader.loadFromSystemProperty(ServiceLoader.java:138)
at org.jboss.wsf.spi.util.ServiceLoader.loadService(ServiceLoader.java:68)
at org.jboss.wsf.spi.tools.WSContractProvider.newInstance(WSContractProvider.java:65)
at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:170)
at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
Caused by: java.lang.ClassNotFoundException: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:200)
... 5 more
Any help would be appriciated.
Please help me out as it is very urgent .Please tell me Where am I making mistake ?
Thanks
Sandy
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261863#4261863
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261863
15 years, 2 months
[JBoss Web Services Users] - Re: Spring bean injection to Service implementation
by sagolsb
Here are some more information: when the web application starts up the web application context is started as shown in the stack trace below:
[[/CredentialService]] Initializing Spring root WebApplicationContext
[ContextLoader] Root WebApplicationContext: initialization started
....................
[XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@f582e9]: org.springframework.beans.factory.support.DefaultListableBeanFactory@b9915a
.......
[DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@b9915a: defining beans [echoService]; root of factory hierarchy
..............
[ContextLoader] Root WebApplicationContext: initialization completed in 170 ms
Within the web service implementation class, the WebServiceContext is injected through @Resource and the ServletContext is retrieved from this through the MessageContext, both of which are printed out from the service implementation as shown below:
[STDOUT] WebServiceContext: org.jboss.wsf.stack.jbws.WebServiceContextJSE@477e4c
[STDOUT] ServletContext: org.jboss.soa.esb.actions.soap.adapter.SOAPProcessorServletContext@1b4e510
But when I try to retrive the WebApplicationContext through:
webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
which in turn internally calls:
servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
throws the exception:
ERROR [InvocationHandlerJAXWS] Method invocation failed with exception: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
........................
Caused by: java.lang.UnsupportedOperationException: Not yet supported
at org.jboss.soa.esb.actions.soap.adapter.SOAPProcessorServletContext.getAttribute(SOAPProcessorServletContext.java:45)
..................................
Can you please let me know if I'm missing something?
Regards,
Sagol
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261838#4261838
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261838
15 years, 2 months
Generated WSDL - soap encoded arrays
by Tagged
Hello,
I have a small issue with a small app that has annotated Java and JBoss is
generating the WSDL.
I'm converting this from Weblogic 9, so the WSDLs are a little different.
The main problem is when returning an ArrayList, if there is only one
element, JBoss omits the <item> tag around it. If there are two elements,
then each is surrounded by an <item> tag.
In Weblogic, regardless of whether there was 1 or more elements, there is
always an item tag. (Which makes parsing much simpler when calling from
PHP, and apparent Cold Fusion.)
Some sample XML to explain this. This is the exact same code,
First from Weblogic :
<soapenv:Body>
<m:LookupResponse xmlns:m="http://host.com>
<m:return>
<m:Account soapenc:arrayType="xs:anyType[1]">
<item xsi:type="m:Account">
-- snip 1 result --
</item>
</m:Accounts>
<m:ErrorMessage xsi:nil="true"/>
</m:return>
</m:LookupResponse>
</soapenv:Body>
Then from JBoss :
<env:Body>
<ns2:LookupResponse xmlns:ns2="http://host.com">
<return>
<accounts>
-- snip 1 result - note the lack of <item> --
</accounts>
</return>
</ns2:LookupResponse>
</env:Body>
Is there a way to force JBoss to always treat this object as a soap
encoded array? So that it will always itemize the list of results whether
it be 1 or more?
Thank you very much,
Ben
15 years, 2 months
[JBoss Web Services Users] - Custom JAXBContext search path for JAXWS EJB endpoint
by mckibben
Hi All,
I have a JAXWS EJB endpoint implementation using JBossWS 3.2 Native, and I need to customize the JAXBContext package search path used to unmarshall the SOAP payload.
My wsdl is using document literal to send the payload, and one of the message elements has a child element that is of type "xs:any". I have the JAXB generated Java classes for the actual element being added as a child in the xml, but the object is still being unmarshalled as a DOM Element instead of my JAXB class.
It seems like this should be possible, but I can't find any way to do this looking through the user docs. I thought by adding an @XmlSeeAlso annotation to my JAXWS EJB SEI implementation should've added that JAXB class to the JAXBContext used for unmarshalling, but that didn't work.
Anybody have a solution? Or is this a JBoss bug? The JAXWS 2.1 spec (see section 2.2) seems to imply the @XmlSeeAlso should work, but their examples show the annotation on the SEI and not on the SEI implementation.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261770#4261770
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261770
15 years, 2 months