[Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext
by tfennelly
"thomas.diesler(a)jboss.com" wrote :
| | import org.jboss.ws.core.jaxws.JAXBContextCache;
| |
|
| This already is the problem. You cannot rely on proprietary API .
|
+1 and that's why I'm here looking for the correct solution :-)
What I've outlined is what I had to do to get the "native" JBossWS stack (which uses JAXB, right?) to work with a set of Java bindings that are not JAXB annotated. Kohsuke Kawaguchi has confirmed that this is the correct solution from a JAXB perspective, so I guess what we need to do here is figure out how this all fits into your view of the world ala the JBossWS SPI etc
"thomas.diesler(a)jboss.com" wrote : However I need to understand your use case better in order to give you a qualified answer.
OK. It's basically as I outlined in the JAXB forum post...
anonymous wrote : "... we need to be able to bind an XML message (using this JAXB based code) into an existing Java interface (not annotated for JAXB). We don't own the interface, so changing it is not an option."
So JAXB requires the java bindings it's trying to unmarshal the SOAP message into to have JAXB annotations. In the JBossESB usecase, this is very often going to be impossible because the interface is probably owned by something outside the ESB (i.e. we can't modify them to add the annotations).
An ESB example of this that we continually use is where the ESB is being used to expose a Webservice interface for a legacy EJB based Service. The EJB remote interface is already defined and is what we want to base our ESB "hosted" (interpret loosely) JSR181 endpoint - the EJB wrapper Webservice.
Our current solution to all this from a JBossESB + JBossWS 2.0.x perspective is as outlined in that JAXB forum post.
"thomas.diesler(a)jboss.com" wrote : Not every supported stack is necessarily using JAXB. So setting JAXB properties might not be the right solution anyway.
How the SPI exposes this is up to you for sure.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057738#4057738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057738
17 years, 7 months
[Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext
by tfennelly
Sorry about the delay in replying - I was on vacation :-)
"heiko.braun(a)jboss.com" wrote : We can defer creation of JAXBContext's to JBossWS factory. The SPI ships with a default FactoryLoader implementation that allows us to change the implementation through a /META-INF/services entry.
|
| IMO this would be the easiest. Another option would be indirect creation though the MC. Then the factory would become part of jbossws-beans.xml.
How would we get the properties instance (which will be different per typeset for which the JAXBContext is being created) into this factories scope?
"thomas.diesler(a)jboss.com" wrote : Why specifically do you need to interact with such low level detail as JAXB properties. A JAXWS client should not have to do that AFAIK.
This forum post to the JAXB Forums should explain why we need it: http://forums.java.net/jive/thread.jspa?threadID=27591&tstart=0
The changes I'm talking about are not really low level from a JBossWS perspective. The JAXBContext class provides 2 factory methods for creating the JAXBContext, one which takes a properties set and one which does not. From a JBossWS perspective, we're just talking about being able to specify a property set. To see how I'm doing this at the minute, see the JBossWSAdapter class - search for references to JAXBContextCache. So at the moment I relying on a hack whereby I'm setting the JAXBContext properties (for the SOAP message being processed) via a Threadlocal.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057367#4057367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057367
17 years, 7 months
[Design of JBoss Web Services] - Caused by: org.jboss.ws.WSException: Cannot obtain java type
by patel_123
well i resolvec that error..
i am getting another error please help me in resolving this,
Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://wb1-329:8080}validateUser
at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:451)
at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:208)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at client.UserBean.loginUser(UserBean.java:90)
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 com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056878#4056878
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056878
17 years, 7 months
[Design of JBoss Web Services] - Caused by: java.lang.IllegalArgumentException: Cannot obtain
by patel_123
hi
i exposed my ejb components as webservices.It generated WSDl doc correctly.I checked my webmethods workd properly using service explorer utility provided by myeclipse5.5.It works fine.
But when client try to call a web sevice,it throws a exception,
this is my client app code,
try {
String namespace="http://wb1-329:8080";
String service="CustomerRegistration";
String wsdl="http://localhost:8080/CustomerRegistrationEJB?wsdl";
//ctx=new InitialContext();
//customerSessionRemote remote=(customerSessionRemote)ctx.lookup("customer/remote");
//String user=remote.validateUser(getUserName(), getPassword());
try {
URL defurl = new URL(wsdl);
System.out.println(defurl);
ServiceFactory serviceFactory=ServiceFactory.newInstance();
System.out.println("service fact");
Service remoteService=serviceFactory.createService(defurl, new QName(namespace,service));
System.out.println(remoteService);
customerSessionRemote invoker=(customerSessionRemote)remoteService.getPort(customerSessionRemote.class);
System.out.println(invoker);
String user=invoker.validateUser(getUserName(), getPassword());
this is error i am getting,
Caused by: java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://wb1-329:8080}CustomerRegistration
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:164)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at client.UserBean.loginUser(UserBean.java:90)
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 com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
please anybody help me in resolving this...
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056868#4056868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056868
17 years, 7 months
[Design of JBoss Web Services] - JBWS-1678
by maeste
Hi folks,
I'm looking at JBWS-1678,to implement redirect the message dump logging of sunri to jboss standard logging. I'm trying to use a specific logName, so we can intercept this kind of log with a specific log4j category.
The problem is that sunri use brutal System.out calls to log the soap message.
I think we have more than one way to implement this feature:
| Redirect all System.out to log4jPlugin of a logger named something like "SUNRI DUMP". This redirect would take place in RequestHandlerImpl, just before delegate to sunri, and original System.out replaced at the end of delegation. Of course this approach have a lot of problem since it redirect ALL System.out, also ones eventually placed in webservice implementation class.
|
|
| | Copy some classes from SUNRI in wsf.stack.sunri and redefine method dump(). The problem here is that these class (2/3) aren't extendable since they are final. But they are an important peace of the core of sunri containing a large part of the logic of http interface. I think it could be a problem to have to maintain this classes every time sunri release updates. These classes is at least ServletConnectionImpl, ServletAdapter, and (maybe I have to check better) HttpAdapter.
| |
|
| | Decorate the dump method (in HttpAdapter) with aop. Since it have to be decorated runtime, using sunri as jar lib, it could become a performance problem.
| |
|
| Sincerely no one of these solution seems good to us. Alternative ideas?
|
| Thanks for your time
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056582#4056582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056582
17 years, 7 months
Re: [JBoss JIRA] Assigned: (JBWS-1665) incorrect wsdl generation
by Thomas Diesler
Thanks for taking care of this. I'll have a look why the test is failing
tomorrow.
On Thu, 2007-06-21 at 11:26 -0400, David Boeren (JIRA) wrote:
> [ http://jira.jboss.com/jira/browse/JBWS-1665?page=all ]
>
> David Boeren reassigned JBWS-1665:
> ----------------------------------
>
> Assignee: Thomas Diesler (was: David Boeren)
>
> > incorrect wsdl generation
> > -------------------------
> >
> > Key: JBWS-1665
> > URL: http://jira.jboss.com/jira/browse/JBWS-1665
> > Project: JBoss Web Services
> > Issue Type: Bug
> > Security Level: Public(Everyone can see)
> > Components: tools-jaxrpc
> > Affects Versions: jbossws-1.2.1
> > Reporter: David Boeren
> > Assigned To: Thomas Diesler
> > Fix For: jbossws-2.0.0
> >
> >
> > An EJB3 based webservice is deployed, but the wsdl produced has several blank fields including soapaction, soapfaults, and a wholly-unpopulated <message> element.
>
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
17 years, 7 months