[JBossWS] - Webservice appears to deploy, but doesn't... Why not?
by IcemanAragorn
I have a webservice that appears to deploy, with jboss saying the following:
anonymous wrote : 16:20:00,006 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.2.1.GA/server/default/deploy/ProjectName_EAR-0.0.1.ear
| 16:20:00,787 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 16:20:00,787 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=ProjectName_EAR-0.0.1.ear,jar=ProjectName-1.0-SNAPSHOT.jar,name=Import,service=EJB3 with dependencies:
| 16:20:00,837 INFO [EJBContainer] STARTED EJB: com.owfg.ProjectName.webservice.Import ejbName: Import
| 16:20:00,857 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.1.GA/server/default/tmp/deploy/tmp24683ProjectName_EAR-0.0.1.ear-co
| ntents/lib/ProjectName-1.0-SNAPSHOT.jar
| 16:20:00,877 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.2.1.GA/server/default/deploy/ProjectName_EAR-0.0.1.ear
However, comparing it to another webservice that was deployed, it's missing a few pieces (italicized):
anonymous wrote : 16:19:45,657 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.2.1.GA/server/default/deploy/Project2_EAR-0.0.1.ear
| 16:19:49,362 WARN [MainDeployer] Found non-jar deployer for SNMPRelay-1.0-SNAPSHOT.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer]
| 16:19:57,693 INFO [TomcatDeployer] deploy, ctxPath=/Project2Service, warUrl=.../tmp/deploy/Project2_EAR-0.0.1.ear-Project2-1.0-SNAPSHOT.jar-ws24682.w
| ar/
| 16:19:58,204 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 16:19:58,224 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=Project2_EAR-0.0.1.ear,jar=Project2-1.0-SNAPSHOT.jar,name=Project2,service=
| EJB3 with dependencies:
| 16:19:58,574 INFO [EJBContainer] STARTED EJB: com.owfg.Project2.webservice.Project2ejbName: Project2
| 16:19:58,614 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.1.GA/server/default/tmp/deploy/tmp24679Project2_EAR-0.0.1.ear-contents/lib/Project2-1.0
| -SNAPSHOT.jar
| 16:19:58,915 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.1.GA/server/default/data/wsdl/Project2_EAR-0.0.1.ear/Project2-1.0-SNAPSHO
| T.jar/Project2Service24680.wsdl
| 16:19:59,556 INFO [ServiceEndpointManager] WebService started: http://localhost:8080/Project2Service/Project2
| 16:19:59,576 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.2.1.GA/server/default/deploy/Project2_EAR-0.0.1.ear
Both webservices are annotated as @WebService and @Stateless, but the one that isn't deploying properly is implementing ImportRemote and ImportLocal classes, which are just simple interfaces with @Remote or @Local respectively. For some reason recently jboss started complaining that there were no remote or local interfaces, so I added them. It's strange that it wasn't complaining in the past, and still doesn't complain about Project2 not having any.
Any ideas where I can find clues to figure out why it isn't deploying properly (or, if it is the base issue, why jboss suddenly starting asking for interfaces)?
Thanks so much.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130592#4130592
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130592
16 years, 10 months
[JBossWS] - How to setup wsse usernametoken for ejb3 based web services?
by xiaow
I have tried to solve this for several weeks for jboss on either 4.2.2 or 5 beta 4 and was very frustrated. And I have easily configured this feature in Glassfish v3 and Oracle AS 10g. Now I work on a very simple web service annotated from a session bean as following:
@webservice
@stateless
public class Test{
@Resource SessionContext context;
public test(){
String userName =
context.getCallerPrincipal().getName();
System.out.println("The calling user is " + userName);
}
}
I would like to see how step by step to configure only the usernametoken wsse feature for the web service against an LDAP source such as openldap or active directory in a jboss server (any version), so that the ejb test method is invoked and it prints the user name of the caller in the console (or log).
Your assistance is greatly appreciated.
Wu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130556#4130556
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130556
16 years, 10 months
[JBossWS] - axisFault occured during service invocation:java.lang.Illega
by chavali
Hi
We are working on webservices with axis2 on jboss.
We are getting the following exception with the stub. The request is processed bsent to the legacy system through skeleton and then through JCA.The response is received in JCA. But the stub is receiving exception.
Here is the exception.
axisFault occured during service invocation:java.lang.IllegalStateException: attribute type accessed in illegal event!
The Axis Fault Reason is:null
The Axis Fault Node URI:null
org.apache.axis2.AxisFault: java.lang.IllegalStateException: attribute type accessed in illegal event!
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
at xlink.MonitoringServicesServerStub.CSTAMonitorStart(MonitoringServicesServerStub.java:385)
at xlink.MonitoringStartClient.main(MonitoringStartClient.java:84)
Can somebody help in this regard.
Chavali
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130396#4130396
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130396
16 years, 10 months
[JBossWS] - WSProvideTask throws NoClassDefFoundError while class in cla
by Ollie1979
Hi,
I am new to JBoss and web services so bear with me. I'm trying to generate artifacts for my web service using the wsprovide tool/ant task and I keep getting exceptions.
This is my web service:
package helloworld;
|
| import javax.jws.WebService;
|
| import org.springframework.beans.factory.annotation.Autowired;
| import org.springframework.web.context.support.SpringBeanAutowiringSupport;
|
| @WebService
| public class HelloWorld extends SpringBeanAutowiringSupport {
|
| @Autowired
| private MessageProvider messageProvider ;
|
| public String sayHello(String name) {
| return messageProvider.getMessage() + " " + name ;
| }
| }
I'm deploying this on JBoss using the Eclipse WTP plugin and it works fine. My client can call this web service without a problem. However, I would like to generate the web service artifacts myself (instead of letting JBoss take care of it) and my Ant script keeps throwing exceptions.
This is my Ant build script:
| <?xml version="1.0" encoding="UTF-8"?>
| <project name="helloworld" default="generate-artifacts">
| <description>
| Generates JAX-WS artifacts for our service endpoint implementation(s)
| </description>
|
| <property file="build.properties" />
|
| <path id="wsprovide.path">
| <fileset dir="${jboss.home}/client" includes="*.jar" />
| </path>
|
| <target name="generate-artifacts">
| <taskdef name="WSProvideTask" classname="org.jboss.wsf.spi.tools.ant.WSProvideTask">
| <classpath refid="wsprovide.path" />
| </taskdef>
|
| <WSProvideTask
| fork="true"
| genwsdl="true"
| verbose="true"
| sei="helloworld.HelloWorld">
| <classpath>
| <pathelement path="build/classes"/>
| <pathelement path="WebContent/WEB-INF/lib"/>
| </classpath>
| </WSProvideTask>
| </target>
| </project>
And this is it's output:
| Buildfile: C:\Documents and Settings\Ollie\workspace\helloworld\build.xml
|
| generate-artifacts:
| [WSProvideTask] Command invoked: org.jboss.wsf.spi.tools.cmd.WSProvide -w -t helloworld.HelloWorld
| [WSProvideTask] Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/web/context/support/SpringBeanAutowiringSupport
| [WSProvideTask] at java.lang.ClassLoader.defineClass1(Native Method)
| [WSProvideTask] at java.lang.ClassLoader.defineClass(Unknown Source)
| [WSProvideTask] at java.security.SecureClassLoader.defineClass(Unknown Source)
| [WSProvideTask] at java.net.URLClassLoader.defineClass(Unknown Source)
| [WSProvideTask] at java.net.URLClassLoader.access$000(Unknown Source)
| [WSProvideTask] at java.net.URLClassLoader$1.run(Unknown Source)
| [WSProvideTask] at java.security.AccessController.doPrivileged(Native Method)
| [WSProvideTask] at java.net.URLClassLoader.findClass(Unknown Source)
| [WSProvideTask] at java.lang.ClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at java.lang.ClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:162)
| [WSProvideTask] at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
| [WSProvideTask] Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.support.SpringBeanAutowiringSupport
| [WSProvideTask] at java.net.URLClassLoader$1.run(Unknown Source)
| [WSProvideTask] at java.security.AccessController.doPrivileged(Native Method)
| [WSProvideTask] at java.net.URLClassLoader.findClass(Unknown Source)
| [WSProvideTask] at java.lang.ClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at java.lang.ClassLoader.loadClass(Unknown Source)
| [WSProvideTask] at java.lang.ClassLoader.loadClassInternal(Unknown Source)
| [WSProvideTask] ... 13 more
|
| BUILD FAILED
| C:\Documents and Settings\Ollie\workspace\helloworld\build.xml:22: Could not invoke WSProvideTask
|
| Total time: 1 second
WebContent/WEB-INF/lib (see classpath of WSProvideTask) contains spring.jar. What's going on? Why can't WSProvideTask find the sping class? Using the command line yields the same result (NoClassDefFoundError). It's probably something silly but I can't figure it out.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130368#4130368
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130368
16 years, 10 months
[JBossWS] - error 'prefix xsz is not bound to a namespace" on xsi:type="
by barny451
Using JBoss 4.2.0GA with Eclipse Europa (3.3) on WinXP Pro.
I' working on a demo webservice which has an AddPayee operation, invoked as in this SOAP request from SoapUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsda="http://localhost:8080/SecondBank/OnlineBanking/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsz="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<xsda:AddPayee>
<xsda:payee>
<xsda:name>?</xsda:name>
<xsda:address1>?</xsda:address1>
<!--Optional:-->
<xsda:address2>?</xsda:address2>
<!--Optional:-->
<xsda:address3>?</xsda:address3>
<xsda:city>?</xsda:city>
<xsda:state>?</xsda:state>
<xsda:zip>?</xsda:zip>
<xsda:phoneAreaCode xsi:type="xsz:int">0</xsda:phoneAreaCode>
<xsda:phonePrefix>0</xsda:phonePrefix>
<xsda:phoneSuffix>0</xsda:phoneSuffix>
<xsda:accountToPay>?</xsda:accountToPay>
<xsda:nameOnBill>?</xsda:nameOnBill>
<xsda:alias>?</xsda:alias>
</xsda:payee>
<xsda:token>?</xsda:token>
</xsda:AddPayee>
</soapenv:Body>
</soapenv:Envelope>
This request always gives a soap error:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
SOAP-ENV:Server
prefix xsz is not bound to a namespace
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But if I remove the xsi:type="xsz:int" attribute from the xsda:phoneAreaCode tag I don't get the error. Any idea why?
Here's the essential wsdl content of the service (I've removed irrelevant operations/types):
<wsdl:definitions name="OnlineBanking" targetNamespace="http://localhost:8080/SecondBank/OnlineBanking" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost:8080/SecondBank/OnlineBanking" xmlns:xsd1="http://localhost:8080/SecondBank/OnlineBanking/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:con="http://eviware.com/soapui/config">
<!--Types-->
<wsdl:types>
<xsd:schema targetNamespace="http://localhost:8080/SecondBank/OnlineBanking/xsd" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Payee">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="name" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="address1" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="address2" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="address3" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="city" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="state" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="zip" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="phoneAreaCode" type="xsd:int"/>
<xsd:element minOccurs="1" maxOccurs="1" name="phonePrefix" type="xsd:int"/>
<xsd:element minOccurs="1" maxOccurs="1" name="phoneSuffix" type="xsd:int"/>
<xsd:element minOccurs="1" maxOccurs="1" name="accountToPay" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="nameOnBill" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="alias" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<!--Messages-->
<wsdl:message name="AddPayee">
<wsdl:part name="parameters" element="xsd1:AddPayee"/>
</wsdl:message>
<wsdl:message name="AddPayeeResponse">
<wsdl:part name="parameters" element="xsd1:AddPayeeResponse"/>
</wsdl:message>
<!--Port type-->
<wsdl:portType name="OnlineBankingPortType">
<wsdl:operation name="AddPayee">
<wsdl:input message="tns:AddPayee"/>
<wsdl:output message="tns:AddPayeeResponse"/>
</wsdl:operation>
</wsdl:portType>
<!--Binding-->
<wsdl:binding name="OnlineBankingPortBinding" type="tns:OnlineBankingPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="AddPayee">
<soap:operation soapAction="http://localhost:8080/SecondBank/OnlineBanking/AddPayee" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!--Service-->
<wsdl:service name="OnlineBankingService">
<wsdl:port name="OnlineBankingPort" binding="tns:OnlineBankingPortBinding">
<soap:address location="http://localhost:8080/SecondBank/services"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I'm trying to debug a problem where the app I'm using is automatically applying xsi:type attributes to every parameter of the operation. There's no problem with parameters defined as xsd:string having xsi:type="xsz:string", just with values which are defined as xsd:int which have xsi:type="xsz:int" in the SOAP request.
Regards
Barny
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130142#4130142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130142
16 years, 10 months
[JBossWS] - Re: Schema Validation in JBOSS-WS
by ngtdave
I built a little validation piece for our WS, if anyone is interested. It's not as cool as it could be if it was built in, but it works. I did it using the validation stuff from xmlbeans and a Handler which extends the GenericSOAPHandler.
The key was to separate the elements to be validated from the WSDL stuff.
So I have 1 WSDL with all the , , , , and stuff in it. But the contents of each of those refer to elements defined in XSDs. The WSDL refers to one XSD which has all the top level operations and parameters defined. That XSD then refers to many other XSDs which have more details. So basically all the stuff to validate resides in XSDs, of which, there is 1 top level XSD referred to by the WSDL.
In my handler, I get the top level xsd from the context and load/compile it using XmlBeans.compileXsd(). Then on each message (handleInbound) I extract the SOAPBody, get the first text node (The payload of the request) and validate it with the compiled schema.
The validation errors coming from xmlbeans aren't always the nicest, but nothing gets through which is invalid. :)
If anyone is interested I could probably dummy up a very simple example and post it.
Hope this helps anyone who needs validation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130127#4130127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130127
16 years, 10 months