[JBossWS] - Re: Jbossws Tutorial.
by abdujaparov
Hi I have read that guide but I haven't understood much.
First I had to write the class that implements the service but then I don't know what I have to do.
In that page there's this file xml:
| <web-app ...>
| <servlet>
| <servlet-name>TestService</servlet-name>
| <servlet-class>org.jboss.test.ws.jaxws.samples.jsr181pojo.JSEBean01</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>TestService</servlet-name>
| <url-pattern>/*</url-pattern>
| </servlet-mapping>
| </web-app>
|
Must I write this file or this file is generated by jbossws automatically when I deploy a web service? or are there some tools to write it?
The xml that I copied above is the web.xml required?
After that I have created my implementation of service ed the xml file, If I understand I must create a jar file and rename it as war, isn't it?
The last my doubt is about how can I deploy the war?
In wich directory must I put the war file?
Thanks to all, bye bye.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096392#4096392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096392
16 years, 8 months
[JBossWS] - Re: Multithreading in Jboss 4.0.1
by oskar.carlstedt
Hi!
The most correct way to do this is to write your own MBean/Service. AFAIK threads are not allowed inside an EJB (some application servers will allow threads in the EJB). So writing your own MBean that will take care of multithreading might solve your problem.
Creating MBeans is about adding a new service entry in you jboss-app.xml that will point out a your-service.xml file.
You MBean javacode must implement an interface s.a. YourServiceMBean (Notice the pattern interface name ends with MBean, the implementation does not);
mbean interface: YourServiceMBean
mbean impleementation: YourService
You are looking up MBeans in the same way as you do with an EJB with the
iniCtx.lookup(...)
The MBean has some life cycle methods that you might want to use:
start(), stop(), ... Start is called when the service is deployed. Check the JBoss application server documentation for more details.
Hope this can help you.
Cheers
/Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096383#4096383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096383
16 years, 8 months
[JBossWS] - wsconsume Ant task fails to find
by balkanboy
I have the following in my build.xml:
| <path id="web.services.classpath">
| <fileset dir="${env.JAVA_HOME}/lib" includes="*.jar" />
| <filesetdir="${jboss.home}/lib/endorsed/" includes="*.jar" />
| <fileset dir="${jboss.home}/lib/" includes="*.jar" />
| <fileset dir="${jboss.home}/client/">
| <include name="activation.jar" />
| <include name="getopt.jar" />
| <include name="wstx.jar" />
| <include name="jbossall-client.jar" />
| <include name="log4j.jar" />
| <include name="mail.jar" />
| <include name="jbossws-spi.jar" />
| <include name="stax-api.jar" />
| <include name="jaxb-api.jar" />
| <include name="jaxb-impl.jar" />
| <include name="jaxb-xjc.jar" />
| <include name="streambuffer.jar" />
| <include name="stax-ex.jar" />
| <include name="javassist.jar" />
| <include name="jboss-xml-inding.jar" />
| <include name="jbossws-client.jar" />
| <include name="jboss-jaxws.jar" />
| <include name="jboss-jaxrpc.jar" />
| <include name="jboss-saaj.jar" />
| <include name="jboss-srp-client.jar" />
| <include name="jbossws-common.jar" />
| <include name="jaxws-tools.jar" />
| <include name="jaxws-rt.jar" />
| </fileset>
| </path>
|
| <target name="wstaskdef">
| <taskdef name="wsconsume"
| classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask">
| <classpath>
| <path refid="web.services.classpath" />
| </classpath>
| </taskdef>
| </target>
|
| <target name="wsdltojava" depends="init,wstaskdef">
| <wsconsume fork="false"
| verbose="true"
| destdir="${classes.gen.dir}"
| sourcedestdir="${src.gen.dir}"
| keep="true" package="com.example.wsclient"
| wsdl="${resources.dir}/wsdl/DataMartService.wsdl"
| wsdlLocation="http://localhost:8080/datamart/DatamartRemote?wsdl" />
| </target>
|
And a WSDL that contains a type like this:
| <xs:complexType name='brmEntry'>
| <xs:sequence>
| <xs:element minOccurs='0' name='barcode' type='xs:string'/>
| <xs:element minOccurs='0' name='barcodeType' type='xs:string'/>
| <xs:element minOccurs='0' name='idTag' type='xs:string'/>
| <xs:element minOccurs='0' name='imageStream' ns1:expectedContentTypes='application/octet-stream' type='xs:base64Binary' xmlns:ns1='http://www.w3.org/2005/05/xmlmime'/>
| <xs:element minOccurs='0' name='timestamp' type='xs:dateTime'/>
| </xs:sequence>
|
When I invoke the 'wsconsume' task from Ant, I get the following:
package javax.activation does not exist
[wsconsume] import javax.activation.DataHandler;
[wsconsume] ^
[wsconsume] BrmEntry.java:50: cannot find symbol
[wsconsume] symbol : class DataHandler
[wsconsume] location: class com.raf.uspsbrm.datamart.wsclient.BrmEntry
[wsconsume] protected DataHandler imageStream;
The only way I was able to get around this issue is to add "activation.jar" to Ant's classpath (I'm using Ant 1.7), or use the 'wsconsume.sh' script.
Does anyone have any idea how to fix the Ant task without necessarily altering Ant's CLASSPATH or is this necessary for 'wsconsume' to work from within Ant?
Thanks in advance!
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096337#4096337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096337
16 years, 8 months
[JBossWS] - Re: SoapFaultException using anyType
by wcydaip
Can anyone tell me which version of JBoss works with jdk1.4.2 and supports the anyType type element?
This seemed to state that there was a problem with rpc encoded web-services: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032888#4032888
I've tried to change them to literal, but, have been unsuccessful..
And this says that it's fixed, but, it doesn't say which version to use:
http://jira.jboss.com/jira/browse/JBWS-1595
Thanks.
Graham
Here's the wsdl. If you see anything that might be causing the problem please let me know:
| <?xml version='1.0' encoding='UTF-8' ?>
| <!-- Generated 04/03/06 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
| <definitions
| name='ALMVTC'
| targetNamespace=' http://actcenters.com/ALMVTC.WSDL'
| xmlns:wsdlns='http://actcenters.com/ALMVTC/wsdl/'
| xmlns:typens='http://actcenters.com/ALMVTC/type/'
| xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
| xmlns:xsd='http://www.w3.org/2001/XMLSchema'
| xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
| xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
| xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
| xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
| xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
| xmlns='http://schemas.xmlsoap.org/wsdl/'>
|
| <types>
| <schema
| targetNamespace='http://actcenters.com/ALMVTC/type/'
| xmlns='http://www.w3.org/2001/XMLSchema'
| xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
| xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
| elementFormDefault='qualified'>
|
| <import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
| <import namespace='http://schemas.xmlsoap.org/wsdl/'/>
| <import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
| <import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
|
| </schema>
| </types>
|
| <message name='Registration.register'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Registration.registerResponse'>
| <part name='Result' type='xsd:anyType'/>
|
| </message>
|
| <message name='ScheduleData.getScheduleData'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='ScheduleData.getScheduleDataResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getVersion'>
|
| </message>
|
| <message name='Schedule.getVersionResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSiteTitleList'>
| <part name='SiteTitleList' type='xsd:anyType'/>
| <part name='sTitleId' type='xsd:anyType'/>
|
| <part name='sSiteName' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSiteTitleListResponse'>
| <part name='Result' type='xsd:boolean'/>
| <part name='SiteTitleList' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.setInactiveFlag'>
| <part name='sTitleId' type='xsd:anyType'/>
|
| <part name='sSiteID' type='xsd:anyType'/>
| <part name='sInactive' type='xsd:anyType'/>
| <part name='sErr' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.setInactiveFlagResponse'>
| <part name='Result' type='xsd:boolean'/>
| <part name='sErr' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSiteName'>
| <part name='sSiteID' type='xsd:anyType'/>
| <part name='sSiteName' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSiteNameResponse'>
| <part name='Result' type='xsd:boolean'/>
| <part name='sSiteName' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.setSitesTitleFlag'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.setSitesTitleFlagResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getStatesByTitleId'>
|
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getStatesByTitleIdResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSitesBySiteNameTitleId'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getSitesBySiteNameTitleIdResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getProctorStationIdsByStateTitle'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getProctorStationIdsByStateTitleResponse'>
|
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getProctorStationInfo'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getProctorStationInfoResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getTestCenters'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getTestCentersResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getAvailableDays'>
|
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getAvailableDaysResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getAvailableAppointments'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getAvailableAppointmentsResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.scheduleAppointment'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.scheduleAppointmentResponse'>
|
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.cancelAppointment'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.cancelAppointmentResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.serviceCheck'>
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.serviceCheckResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getCandidateScheduleData'>
|
| <part name='sRequest' type='xsd:anyType'/>
| </message>
|
| <message name='Schedule.getCandidateScheduleDataResponse'>
| <part name='Result' type='xsd:anyType'/>
| </message>
|
| <portType name='RegistrationSoapPort'>
|
| <operation name='register' parameterOrder='sRequest'>
|
| <input message='wsdlns:Registration.register'/>
| <output message='wsdlns:Registration.registerResponse'/>
| </operation>
|
| </portType>
|
| <portType name='ScheduleDataSoapPort'>
|
| <operation name='getScheduleData' parameterOrder='sRequest'>
| <input message='wsdlns:ScheduleData.getScheduleData'/>
|
| <output message='wsdlns:ScheduleData.getScheduleDataResponse'/>
| </operation>
|
| </portType>
|
| <portType name='ScheduleSoapPort'>
|
| <operation name='getVersion' parameterOrder=''>
|
| <output message='wsdlns:Schedule.getVersionResponse'/>
|
| </operation>
|
| <operation name='getSiteTitleList' parameterOrder='SiteTitleList sTitleId sSiteName'>
| <input message='wsdlns:Schedule.getSiteTitleList'/>
| <output message='wsdlns:Schedule.getSiteTitleListResponse'/>
| </operation>
|
| <operation name='setInactiveFlag' parameterOrder='sTitleId sSiteID sInactive sErr'>
| <input message='wsdlns:Schedule.setInactiveFlag'/>
| <output message='wsdlns:Schedule.setInactiveFlagResponse'/>
|
| </operation>
|
| <operation name='getSiteName' parameterOrder='sSiteID sSiteName'>
| <input message='wsdlns:Schedule.getSiteName'/>
| <output message='wsdlns:Schedule.getSiteNameResponse'/>
| </operation>
|
| <operation name='setSitesTitleFlag' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.setSitesTitleFlag'/>
| <output message='wsdlns:Schedule.setSitesTitleFlagResponse'/>
|
| </operation>
|
| <operation name='getStatesByTitleId' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getStatesByTitleId'/>
| <output message='wsdlns:Schedule.getStatesByTitleIdResponse'/>
| </operation>
|
| <operation name='getSitesBySiteNameTitleId' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getSitesBySiteNameTitleId'/>
| <output message='wsdlns:Schedule.getSitesBySiteNameTitleIdResponse'/>
|
| </operation>
|
| <operation name='getProctorStationIdsByStateTitle' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getProctorStationIdsByStateTitle'/>
| <output message='wsdlns:Schedule.getProctorStationIdsByStateTitleResponse'/>
| </operation>
|
| <operation name='getProctorStationInfo' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getProctorStationInfo'/>
| <output message='wsdlns:Schedule.getProctorStationInfoResponse'/>
|
| </operation>
|
| <operation name='getTestCenters' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getTestCenters'/>
| <output message='wsdlns:Schedule.getTestCentersResponse'/>
| </operation>
|
| <operation name='getAvailableDays' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getAvailableDays'/>
| <output message='wsdlns:Schedule.getAvailableDaysResponse'/>
|
| </operation>
|
| <operation name='getAvailableAppointments' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getAvailableAppointments'/>
| <output message='wsdlns:Schedule.getAvailableAppointmentsResponse'/>
| </operation>
|
| <operation name='scheduleAppointment' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.scheduleAppointment'/>
| <output message='wsdlns:Schedule.scheduleAppointmentResponse'/>
|
| </operation>
|
| <operation name='cancelAppointment' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.cancelAppointment'/>
| <output message='wsdlns:Schedule.cancelAppointmentResponse'/>
| </operation>
|
| <operation name='serviceCheck' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.serviceCheck'/>
| <output message='wsdlns:Schedule.serviceCheckResponse'/>
|
| </operation>
|
| <operation name='getCandidateScheduleData' parameterOrder='sRequest'>
| <input message='wsdlns:Schedule.getCandidateScheduleData'/>
| <output message='wsdlns:Schedule.getCandidateScheduleDataResponse'/>
| </operation>
|
| </portType>
|
| <binding name='RegistrationSoapBinding' type='wsdlns:RegistrationSoapPort' >
|
| <stk:binding preferredEncoding='UTF-8'/>
| <soap:binding style="document" transport='http://schemas.xmlsoap.org/soap/http'/>
|
| <operation name='register'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Registration.register'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
|
| <soap:body use="literal"/>
| </output>
| </operation>
|
| </binding>
|
| <binding name='ScheduleDataSoapBinding' type='wsdlns:ScheduleDataSoapPort' >
|
| <stk:binding preferredEncoding='UTF-8'/>
| <soap:binding style="document" transport='http://schemas.xmlsoap.org/soap/http'/>
|
| <operation name='getScheduleData'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/ScheduleData.getScheduleData'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
|
| </operation>
|
| </binding>
|
| <binding name='ScheduleSoapBinding'
| type='wsdlns:ScheduleSoapPort' >
|
| <stk:binding preferredEncoding='UTF-8'/>
| <soap:binding style="document" transport='http://schemas.xmlsoap.org/soap/http'/>
|
| <operation name='getVersion'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getVersion'/>
|
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getSiteTitleList'>
|
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getSiteTitleList'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='setInactiveFlag'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.setInactiveFlag'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getSiteName'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getSiteName'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
|
| </operation>
|
| <operation name='setSitesTitleFlag'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.setSitesTitleFlag'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getStatesByTitleId'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getStatesByTitleId'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
|
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getSitesBySiteNameTitleId'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getSitesBySiteNameTitleId'/>
| <input>
| <soap:body use="literal"/>
| </input>
|
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getProctorStationIdsByStateTitle'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getProctorStationIdsByStateT...'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getProctorStationInfo'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getProctorStationInfo'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getTestCenters'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getTestCenters'/>
|
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getAvailableDays'>
|
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getAvailableDays'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getAvailableAppointments'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getAvailableAppointments'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='scheduleAppointment'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.scheduleAppointment'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
|
| </operation>
|
| <operation name='cancelAppointment'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.cancelAppointment'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='serviceCheck'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.serviceCheck'/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| <operation name='getCandidateScheduleData'>
| <soap:operation soapAction='http://actcenters.com/ALMVTC/action/Schedule.getCandidateScheduleData'/>
| <input>
| <soap:body use="literal"/>
| </input>
|
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
|
| </binding>
|
| <service name='ALMVTC' >
| <port name='RegistrationSoapPort' binding='wsdlns:RegistrationSoapBinding' >
| <soap:address location='http://cwcdev.corporate.act.org/schedule/ALMVTC.WSDL'/>
|
| </port>
| <port name='ScheduleDataSoapPort' binding='wsdlns:ScheduleDataSoapBinding' >
| <soap:address location='http://cwcdev.corporate.act.org/schedule/ALMVTC.WSDL'/>
| </port>
| <port name='ScheduleSoapPort' binding='wsdlns:ScheduleSoapBinding' >
| <soap:address location='http://cwcdev.corporate.act.org/schedule/ALMVTC.WSDL'/>
| </port>
| </service>
|
| </definitions>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096326#4096326
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096326
16 years, 8 months
[JBossWS] - @PostConstruct never invoked
by gturner
I have a JAX-WS 2.0 RI based project deployed on JBoss 4.0.4.GA that I am upgrading to JBoss 4.2.1.GA with JBossWS 2.0.1.GA.
An endpoint packaged in a war makes use of @PostConstruct, as well as some Handlers that make use of @PostConstruct as well. @PostContruct on the web service class is never invoked, however @PostConstruct on on of the Handlers does get invoked. I'll try experimenting with removing the handlers, and see if it's something like JBossWS will only invoker one @PostConstruct method per web service.
The following port interface was generated from the WSDL:
| @WebService(name="ImportPort", targetNamespace="urn:HVODWebService")
| @HandlerChain(file="ImportPort_handler.xml")
| @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
| public interface ImportPort {
|
| @WebMethod
| @WebResult(name="ImportResponse",
| targetNamespace="urn:HVODWebServiceTypes",
| partName="response")
| public ImportResponse submitJob(@WebParam(name="ImportRequest",
| targetNamespace="urn:HVODWebServiceTypes",
| partName="request")
| ImportRequest request)
| throws ServiceFault;
|
| }
|
The following implementation makes use of @PostConstruct, but never gets invoked:
| @WebService(endpointInterface="com.xo.nextgen.hvodwebservice.wsdl.ImportPort")
| public class ImportWebService implements ImportPort {
|
| @Resource
| private WebServiceContext context;
|
| @PostConstruct
| public void initialize() {
| ...
| }
|
| @PreDestroy
| public void destroy() {
| ...
| }
|
| public ImportResponse submitJob(ImportRequest request)
| throws ServiceFault {
| ...
| }
|
| }
|
The following handler.xml is used to inject two Handlers:
| <?xml version="1.0" encoding="UTF-8"?>
| <javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
| <javaee:handler-chain>
| <javaee:handler>
| <javaee:handler-name>SchemaValidation</javaee:handler-name>
| <javaee:handler-class>com.xo.nextgen.hvodwebservice.wsdl.handler.SchemaValidationHandler</javaee:handler-class>
| </javaee:handler>
| <javaee:handler>
| <javaee:handler-name>FaultNotification</javaee:handler-name>
| <javaee:handler-class>com.xo.nextgen.hvodwebservice.wsdl.handler.FaultNotificationHandler</javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </javaee:handler-chains>
|
The following Handler interestingly does have it @PostConstruct method invoked:
| public class SchemaValidationHandler
| implements LogicalHandler<LogicalMessageContext> {
|
| @PostConstruct
| public void initialize() throws WebServiceException {
| ...
| }
|
| @PreDestroy
| public void destroy() {
| }
|
|
| public boolean handleMessage(LogicalMessageContext context) {
| ...
| }
|
| public boolean handleFault(LogicalMessageContext context) {
| ...
| }
|
| public void close(MessageContext context) {
| ...
| }
|
| }
|
Also the exact same behavior occurs with JBoss 4.2.1.GA with it's native JBossWS 1.2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096238#4096238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096238
16 years, 8 months
[JBossWS] - Runtime classloader cannot be null
by gturner
I have a JAX-WS 2.0 RI based project deployed on JBoss 4.0.4.GA that I am upgrading to JBoss 4.2.1.GA with JBossWS 2.0.1.GA.
Deployment of the .war fails with the following stacktrace:
| 2007-10-17 09:31:32,361 ERROR [org.jboss.deployment.MainDeployer] (main:) Could not start deployment: file:/home/jboss/jboss-4.2.1.GA/server/jboss2/farm/HVODImportWebService.war
| java.lang.IllegalArgumentException: Runtime classloader cannot be null
| at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:55)
| at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:66)
| at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
| at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy55.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy67.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:412)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.ha.framework.server.FarmMemberService.startService(FarmMemberService.java:212)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoke.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy10.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
|
The war file contains the following jboss-web.xml:
| <?xml version="1.0" encoding="iso-8859-1"?>
| <!DOCTYPE jboss-web
| PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
| <!-- $Id: jboss-web-import.xml,v 1.4 2007/05/16 21:39:57 gturner Exp $ -->
| <jboss-web>
| <class-loading>
| <loader-repository>
| xo.loaders:loader=HVODImportWebService.war
| </loader-repository>
| </class-loading>
|
| <security-domain>java:/jaas/LDAP</security-domain>
|
| <context-root>/HVODWebService/Import</context-root>
|
| <use-session-cookies>false</use-session-cookies>
|
| <depends>xo.services:service=ConfigurationManager</depends>
| </jboss-web>
|
When I remove the loader-repository configuration, deployment is successful. I'm not entirely sure why I have a habit of declaring loader-repository for all my deployments, it definitely began with my quest for isolated-classloaders, but is probably superfluous now that I have isolated classloaders properly configured in conf/jboss-service.xml, deploy/ear-deployer.xml, and deploy/jboss-web.deployer/META-INF/jboss-service.xml server configuration files.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096224#4096224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096224
16 years, 8 months