[JBoss Web Services Development] - Re: JBossWS Deployers Architecture
by richard.opalka@jboss.com
"bill.burke(a)jboss.com" wrote :
| Are the aspectized deployers just a abstraction for JBossWS so that it can move/integration smoothly between different deployment mechanisms?
|
Exactly, U got it ;)
Let me explain you our architecture more high level.
There are three main JBossWS integration points:
* SPI
* ASIL (application server integration layer)
* SSIL (SOAP stack integration layer)
Our SPI provides abstraction for different JBossAS servers and SOAP stacks.
The SPI help us to be both JBossAS and SOAP stack agnostic.
To achieve it, our SPI have its own UMDM (universal meta data model)
that is generated from both JBossAS and SOAP stack MD (meta data).
The ASIL always resides in JBossAS/webservices module
and implements our SPI (to be JBossAS agnostic).
Of course it has no notion about SOAP stack and uses our SPI to integrate with it.
The goals of ASIL are:
* AS components integration (EJB3 invocations, injection, Web MD modification)
* AS MD => UMDM translation (translate JBossAS MD to JBossAS agnostic MD)
* deployers integration (moves deployers abstraction one step higher, we have custom
WSDeploymentAspectDeployer that allows us to decouple from JBossAS specific deployers
and thus allows us to support multible JBossAS versions as pictured above)
The SSIL allows us to support different SOAP stacks. Currently we provide support for three SOAP stacks:
* Native (SVN, Home Page)
* Metro (SVN, Home Page)
* CXF (SVN, Home Page)
The SSIL always resides in separate JBoss SVN
and implements our SPI (to be SOAP stack agnostic).
Of course it has no notion about JBossAS server and uses our SPI to integrate with it.
So back to answer your question.
"bill.burke(a)jboss.com" wrote :
| Are the aspectized deployers just a abstraction for JBossWS so that it can move/integration smoothly between different deployment mechanisms?
|
We have WSDeploymentAspectDeployer to decouple from JBossAS internals and
allow us to execute both JBossAS and SOAP stack agnostic DAs (Deployment Aspects).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269512#4269512
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269512
15 years, 1 month
[JBoss Web Services Development] - WebServices client not working - Cannot obtain wsdl service
by miafiste
Hi all,
I don't know to do call at the web service frim Struts application.
ActionForm
| package contrat;
|
| import javax.servlet.http.HttpServletRequest;
|
| import org.apache.struts.action.ActionErrors;
| import org.apache.struts.action.ActionMapping;
|
| public class ContratBean extends org.apache.struts.action.ActionForm {
|
| private String nameContrat;
| private String descriptionContrat;
| public String getNameContrat() {
| return nameContrat;
| }
|
| public void setNameContrat(String nameContrat) {
| this.nameContrat = nameContrat;
| }
|
| public String getDescriptionContrat() {
| return descriptionContrat;
| }
|
| public void setDescriptionContrat(String descriptionContrat) {
| this.descriptionContrat = descriptionContrat;
| }
|
| public String getTypeContrat() {
| return typeContrat;
| }
|
| public void setTypeContrat(String typeContrat) {
| this.typeContrat = typeContrat;
| }
|
| private String typeContrat;
|
|
| public ContratBean () {
| }
|
| public void reset(ActionMapping actionMapping, HttpServletRequest request) {
| // TODO: Write method body
| this.nameContrat="";
| this.descriptionContrat="";
| this.typeContrat="";
| }
|
| public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest request) {
| // TODO: Write method body
| ActionErrors errors = new ActionErrors();
| return errors;
| }
|
|
| }
|
Action
package contrat;
|
| import javax.servlet.http.HttpServletRequest;
| import javax.servlet.http.HttpServletResponse;
|
|
| import org.apache.struts.action.ActionForm;
| import org.apache.struts.action.ActionForward;
| import org.apache.struts.action.ActionMapping;
| import contratwsmanager.WSManager;
|
| import contratwsmanager.WSManager;
|
| public class ContratFormAction extends org.apache.struts.action.Action {
|
| // Global Forwards
| public static final String GLOBAL_FORWARD_start = "start";
|
| // Local Forwards
| public static final String FORWARD_sucessContrat = "sucessContrat";
|
| public ContratFormAction() {
| }
|
| public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
| // TODO: Write method body
| WSManager wsmanager = null;
| ContratBean contratData = (ContratBean) (form);
| String test = "";
|
|
| try
| {
| wsmanager = new WSManager();
| test = wsmanager.WSManagerAddContrat();
| contratData.setNameContrat(test);
| }
| catch (Exception e) {
| // TODO: handle exception
| e.getStackTrace();
| }
| String nameContrat = contratData.getNameContrat();
| return mapping.findForward(FORWARD_sucessContrat);
| }
| }
WSManager
| package contratwsmanager;
|
| import java.util.Vector;
|
| import org.apache.log4j.Category;
|
| import javax.xml.soap.*;
| import javax.xml.rpc.ServiceFactory;
| import java.net.URL;
| import javax.xml.namespace.QName;
|
|
|
| public class WSManager
| {
| public WSManager()
| {
| }
|
| // define a static category variable so that it references the
| // category instance of the same name as this class.
| //static final Category category = Category.getInstance(WSManager.class.getName());
|
| static {
|
| // Setup the global JAXM message factory
| System.setProperty("javax.xml.soap.MessageFactory",
| "org.jboss.ws.core.soap.MessageFactoryImpl");
|
| }
|
| public String WSManagerAddContrat() throws Exception {
| //Method level variables
| String nameContrat;
| String retour ="";
|
| try
| {
| javax.xml.rpc.ServiceFactory factory = javax.xml.rpc.ServiceFactory.newInstance();
| QName serviceName = new QName("http://contrat.com.ws", "gestionContrat");
| QName portName = new QName("http://contrat.com.ws", "ConduiteContrat");
| URL wsdlLocation = new URL("http://localhost:8080/ConduiteContrat/ConduiteContrat?WSDL");
|
| javax.xml.rpc.Service service = factory.createService(wsdlLocation, serviceName);
| javax.xml.rpc.Call call = service.createCall(serviceName, portName);
|
| retour = (String) call.invoke(new Object [] { "coucou" });
| }
| catch(javax.xml.rpc.ServiceException se) {
| se.printStackTrace();
| }
| catch(Exception e) {
| //Print the exception in the console
| e.printStackTrace();
| throw e;
| }
| return retour;
| }
| }
|
This is my error
| 10:52:37,359 INFO [TilesRequestProcessor] Tiles definition factory found for request processor ''.
| 10:52:37,562 ERROR [STDERR] java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://contrat.com.ws}gestionContrat
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:171)
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:109)
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:155)
| 10:52:37,562 ERROR [STDERR] at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:126)
| 10:52:37,562 ERROR [STDERR] at contratwsmanager.WSManager.WSManagerAddContrat(WSManager.java:44)
| 10:52:37,562 ERROR [STDERR] at contrat.ContratFormAction.execute(ContratFormAction.java:35)
| 10:52:37,562 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
| 10:52:37,562 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
| 10:52:37,562 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
| 10:52:37,562 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
| 10:52:37,562 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| 10:52:37,562 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 10:52:37,562 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| 10:52:37,562 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| 10:52:37,562 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| 10:52:37,562 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| 10:52:37,562 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| 10:52:37,562 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| 10:52:37,562 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| 10:52:37,562 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| 10:52:37,562 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
|
My WSDL<?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/
| wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://contrat.com.ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="gestionContrat" targetNamespace="http://contrat.com.ws" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:p="http://schemas.xmlsoap.org/wsdl/http/">
| <wsdl:types>
| <xsd:schema targetNamespace="http://contrat.com.ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <xsd:element name="toContrat">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="name" type="xsd:string"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| <xsd:element name="toContratResponse">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="out" type="xsd:string"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| </xsd:schema>
| </wsdl:types>
| <wsdl:message name="toContratRequest">
| <wsdl:part element="tns:toContrat" name="parameters"/>
| </wsdl:message>
| <wsdl:message name="toContratResponse">
| <wsdl:part element="tns:toContratResponse" name="parameters"/>
| </wsdl:message>
| <wsdl:portType name="ConduiteContrat">
| <wsdl:operation name="toContrat">
| <wsdl:input message="tns:toContratRequest"/>
| <wsdl:output message="tns:toContratResponse"/>
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="ConduiteContratSOAP" type="tns:ConduiteContrat">
|
| <soap:binding style="document"
| transport="http://schemas.xmlsoap.org/soap/http" />
| <wsdl:operation name="toContrat">
|
| <soap:operation soapAction="http://contrat.com.ws/toContrat" />
| <wsdl:input>
|
| <soap:body use="literal" />
| </wsdl:input>
| <wsdl:output>
|
|
|
|
| <soap:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:service name="ConduiteContratService">
| <wsdl:port binding="tns:ConduiteContratSOAP" name="gestionContratSOAP">
|
| <soap:address location="http://localhost:8080/ConduiteContrat/ConduiteContrat"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269125#4269125
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269125
15 years, 1 month
[JBoss Web Services Development] - Re: JBossWS Deployers Architecture
by richard.opalka@jboss.com
Hi Bill,
we distinguish two JAX-WS endpoint types:
* POJO
* EJB3 (the same like POJO, but annotated with EJB3 @Stateless annotation)
This WSTypeDeployer detects webservices deployment type.
For every POJO endpoint our users have to provide web.xml DD
where every servlet-class contains POJO Web Service Endpoint class name.
For every EJB3 endpoint we're generating JBossWeb meta data in WebMetaDataCreator
(called by our aspectized deployer wrapping WebMetaDataCreatingDeploymentAspect)
where every servlet-class contains EJB3 Web Service Endpoint class name.
The following applies to both EJB3 and POJO webservice endpoint types.
This servlet-class is lately overriden in our WebMetaDataModifier (lines 118-127)
(called by our aspectized deployer wrapping WebMetaDataModifyingDeploymentAspect).
The servlet-class is replaced with our transport servlet class (that extends AbstractEndpointServlet)
and we're providing init-param to let the transport class know which endpoint class is associated with it.
"Bill Burke" wrote :
| My question is, how does JBossWeb know to ignore a JAXWS class
| and let WS handle things? How do you override things?
|
JBossWeb doesn't ignore JAX-WS class. As I mentioned above,
we're modifying servlet-class in WebMetaDataModifier and replacing
it with real servlet. JBossWS does its job via aspectized deployers
(see stack agnostic deployment aspects and stack specific deployment aspects)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268230#4268230
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268230
15 years, 1 month