Benson Margulies wrote:
> I'm having a dense morning. How do I get to the ClientImpl from the
> proxy returned by the proxy factory?
>
> Object proxyObj = proxyFac.create();
> docClient = (IDocumentService)proxyObj;
Client client = ClientProxy.getClient(proxyOb
work - you don't "grab" beans from the
context, the context injects them for you.
Ian
P.S. The @Autowired annotation will also work but for that you need to
add to your XML
(http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-annotation-config)
in orde
ight rather
than having CXF create it by reflection. So now if you want a reference
to myBean within your service class, you can do it in the normal Spring
style - add a public void setSomething(MyBean b) method to the
WebServiceImpl class and add
inside the webServiceImpl defin
d) Loading beans from applicationContext-ws.xml does not work. I tried:
>
> - similar code to that in (c)
> - autowiring
> - using the ServletContextAware interface (crazy idea of course - CXF is
> not Spring MVC)
>
> Any help will be greatly welcome... I know this must be terr
tContext), and
from there you can get at your application beans and do whatever cleanup
is necessary.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
e CXF infrastructure needing to be involved.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
and that will override the default setting
in the script.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
g bean it can implement
Spring-provided interfaces such as ApplicationContextAware or
ServletContextAware in the usual way and the things you want will be
injected automatically.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
the case for your element:
>
Ian
[1] http://www.w3.org/TR/xmlschema-0/#nsTable
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
x27;d need to create a Spring bean implementing
org.springframework.aop.MethodBeforeAdvice and register that to be
called before your JAX-RS service bean methods, something like this (not
tested!):
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
jp4 wrote:
> I signed up for access to the CXF JIRA but I can't seem to create a new
> issue. How do I go about creating a new issue?
If you're logged into the JIRA there should be a "Create new issue" link
in the bar at the top.
Ian
--
Ian Roberts
te's
lib/endorsed directory.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
lementation
class and do dependency injection in the normal Spring way:
...
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
essorType of the containing class.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
s http://my.server:8080/app/services \
| grep '^A\W' \
| cut -f2
This will read the services list page from the server and output a list
of the links it contains (i.e. the WSDLs).
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
Andrew Clegg wrote:
> At the moment that's done for me by CXF. So I have an endpoint defined
> in cxf-servlet.xml:
>
> implementor="info.cathdb.funcnet.impl.FrontEndServiceProviderFacade"
> endpointName="funcnet:FrontEndPort"
> serviceName="funcnet:FrontEndService"
> ad
apache.org at the moment, I guess
there's a problem with the web server.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
ID
MessageBodyReaders are only for reading the message body, they're not
used for PathParams.
PathParams can be any type with a constructor taking a String or with a
valueOf(String) method - UUID has neither, so I guess your only option
is to have a parameter of type String and do UUID.fromStri
hose
types will be defined inline.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
a way to do it with the
JAXRSServerFactoryBean, but like I say that shouldn't be necessary if
your service object is thread safe.
> 2) All the invoke process are to the same socket number ?
Yes, that's perfectly normal for server sockets.
Ian
--
Ian Roberts |
of http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html
about Spring AOP for details of the potential pitfalls. Alternatively
you could use the HttpSession directly by injecting a MessageContext
into a singleton service bean and accessing the HttpServletRequest
through that.
Ian
--
Ian
BindingProvider)cxfStub).getRequestContext().put(
BindingProvider.SESSION_MAINTAIN_PROPERTY,
Boolean.TRUE);
All JAX-WS client stub objects implement BindingProvider in addition to
the service interface.
Ian
--
Ian Roberts | Department of Computer S
the property or field depends upon it's type.
If the type is
[...]
3. a reference (must be mapped to a simple type) - value is null.
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
of
the whole Spring framework scare you off. The core inversion of control
container (which is all you'll need in many cases) is only a small part
of the whole framework and is well worth, if not mastering, then at
least learning the basics.
I'm sorry, it's late, I'll sto
er with
config.properties at all then you could just use:
Ian
--
Ian Roberts | Department of Computer Science
i.robe...@dcs.shef.ac.uk | University of Sheffield, UK
ysahuly wrote:
> Hi All,
> i have included the below bolded piece of code in my cxf.xml...After that
> inclusion i got the below exception while deploying
doesn't accept a dataBinding element but
does. Try using instead of
and see if that works.
Ian
-
would only use a subset of the classes in each CXF module.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
re:
>
> xx.service.web : service interface
> xx.service.web.impl : service implementation
> xx.dto : data types
> xx.dto.sub : more data types
What is probably happening is that your WSDL has an of
something like ?xsd=1, and your types are defined in this imported xsd file.
Ian
--
Ian
so in the list archive, I'm sure it's
been mentioned before). Is that what you're after?
> and for curiosity, what tool is running when i invoke serviceName?wsdl ?
org.apache.cxf.transport.http.WSDLQueryHandler (in rt/core).
Ian
--
Ian Roberts | Department of Comput
example, is
> "http://cxf.apache.org/jaxws"; located in the CXF JARs?
See META-INF/spring.schemas (inside the various JAR files). Spring uses
these definitions to map schema location URIs to classpath resources.
Ian
--
Ian Roberts | Department of Computer
nicolas de loof wrote:
> Anything cleaner ?
Upgrade to JDK 1.6 update 4 or later, which includes the 2.1 versions of
the JAX-WS and JAXB APIs instead of the 2.0 ones.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
lasspath for CXF
without conflicts. Somebody who knows more Maven than me will be able
to tell you the magic incantation to get the right dependencies.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
Brad O'Hearne wrote:
> enumerations (supported in 1.6 but not in 1.5)
I'm sure I've used enumerations in 1.5...?
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
Vi Da wrote:
> I am running into an issue where I have to use a legacy library which uses
> cglib-full-2.0.2.jar and comes in conflict with asm-2.2.3.jar.
If you can use cglib-nodep instead then you will be able to include asm
2.2.3 and it will all work.
Ian
rapperHelper.java:276)
> ... 19 more
You need to add a no-argument constructor to your DTO class (which could
be in addition to the two-arg one, it doesn't have to be either/or).
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
igure it separately for every endpoint?
Try adding the feature to the bus instead of the client?
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
om some file in META-INF, and then replacing that file in
the shaded version of the JAR, but that seems messier to me than just
using the shaded ASM in the first place.
I'll stop going on about this now, honest ;-)
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
o? For reference the ASM licence is
http://asm.objectweb.org/license.html.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
cxf.xml files from your
WEB-INF, they don't need to be there as the classpath: URLs will load
them directly from inside the relevant JAR files.
You don't need to import the http-binding extension, just the jaxrs one.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
e jarjar rules file to
process the ASM jar as you used for the cxf one.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
des of other classes to point
to the new locations, I've used it successfully to repackage ASM itself
into a different namespace for one of my own projects.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
call get() on the Message with the same key you
put() into the WSC message context.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
it might now, but it
didn't in the version I was using at the time).
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
meter, not very nice, but it's an option nonetheless...
Or just do it through Spring. Either have your impl class implement
ServletContextAware or if you don't want to tie it to a Spring
interfacen then remove the @Context from the setServletContext method
and add a
to your RestAmin
ad.
Just an aside - you say you're deploying on Java 6, which means you
don't have any dependency on CXF jar files. All the annotations you
need to make JAX-WS work are in javax.jws and
javax.xml.ws/javax.xml.bind, which are included in the Java 6 core.
Ian
--
Ian Roberts
" or something like that) with a different targetNamespace
containing the port type, messages, schema types, etc. If the POJOs are
in yet another namespace then you might end up with the interface WSDL
importing a separate xsd file defining those types. If you resolve all
the im
ll pass your cookie with each request
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
wsdl2java.
>
> Any help would be appreciated.
http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html
explains how to maintain the session in JAX-WS. The blog is written for
Glassfish Metro (the Sun RI) but the same approach with the
SESSION_MAINTAIN_PROPERTY wo
ture requests. By
putting the original stream back at the end the connection could remain
open to be re-used by the client.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
ke to migrate to
> newer versions of cxf to keep current.
That looks like it's expecting the bus="..." to contain the bean name
rather than the type. It ought to work without a bus attribute at all,
but if it doesn't, try "cxf" (the default name of the Bus bean).
g processedMsg = transform(processingMsg);
>
> ByteArrayOutputStream encOutput = new ByteArrayOutputStream();
> byte[] date = encryptedMessage.getBytes();
Be very, very careful about character encodings if you're doing this
kind of thing...
Ian
--
Ian Roberts
ed by CXF, not from Spring.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
ffect?
You can inject the WebServiceContext and get the PATH_INFO or the
HttpServletRequest out of that.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
java.lang.NoClassDefFoundError:
> javax/xml/ws/soap/MTOM
That class (annotation type, actually) is in the JAX-WS API. My guess
is that you have a 2.0 version of the API jar rather than the 2.1 version.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
o scope="request".
http://www.nabble.com/Re%3A-Share-object-in-request-scope-on-ws-server-p14674619.html
You also need to add the Spring RequestContextListener to your web.xml
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other-web-c
in web.xml, the results should be identical.
contextConfigLocation
classpath:META-INF/cxf/cxf.xml
classpath:META-INF/cxf/cxf-extension-soap.xml
classpath:META-INF/cxf/cxf-servlet.xml
WEB-INF/ws-beans.xml
Ian
--
Ian Roberts | Department of
you might be better off just keeping the start and
stop interceptors separate and creating a "feature" (see LoggingFeature
for an example) to group them together. That way it's still a single
configuration operation to add both interceptors - just add the feature
to the bus, server
r {
handleMessage(Message m) {
Exchange ex = m.getExchange();
long startTime = ex.get("startTime");
// ...
}
}
}
You only need to add the TimingInterceptor to your input chain and it
will manage the rest for you.
Ian
--
Ian Roberts | Depart
use separate JaxWsProxyFactoryBeans to create
the two clients.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
ypes, only as return types. I don't know if that makes any
difference.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
Class[], so Spring handles the type conversion from the
value without needing a FactoryBean to do the work.
Note this doesn't work with , but has
exactly the same effect, it just works slightly differently under the
covers.
Ian
--
Ian Roberts | Department of Computer S
y of your WS methods have been
called, use ServletContextAware).
@Resource
private WebServiceContext ctx;
public String webServiceOperation() {
ServletContext sctx =
ctx.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
...
}
Ian
--
Ian Roberts | Department
Ale wrote:
> I don't know how to post to JIRA, if you explain me I could post it.
https://issues.apache.org/jira/browse/CXF, you need to sign up for an
account, log in and then select "create new issue".
Ian
--
Ian Roberts | Department of Computer Scienc
otLogger line with these two lines, which will
make Spring log at debug level and everything else at info level:
log4j.rootLogger=INFO, stdout
log4j.logger.org.springframework=DEBUG
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
quot;shouldUseRpcEncoded", Boolean.TRUE);
and in your "out" interceptor:
if(Boolean.TRUE.equals(message.getExchange().get("shouldUseRpcEncoded"))) {
...
}
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
tent type like application/xml then it would
be the XML declaration that determines the encoding used.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
adapter" to map the interface into a
concrete class that JAXB can work with. The java_first_jaxws sample in
the latest CXF has an example of how this works.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
S implementation built into the 1.6
JRE (which I believe is some version of Glassfish Metro, and uses the
Sun HTTP server).
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
ws-service.html
Once you've got the right annotations on your classes it really is as
simple as:
public static void main(String[] argv) {
MyServiceImpl impl = new MyServiceImpl();
Endpoint.publish("http://localhost:9000/MyService";, impl);
}
Ian
--
Ian Roberts |
#x27;re using the simple
Endpoint.publish() approach then you probably need to use something like
http://commons.apache.org/daemon or http://wrapper.tanukisoftware.org/,
though you may be able to get away with just "kill -INT" (maybe
registering a shutdown hook if you need to so any processing
numbers",
resp.toString(), "20");
}
@Test
public void doubleItWorksForNegativeNumbers() {
BigInteger resp = port.doubleIt(new BigInteger("-10"));
assertEquals("Double-It not doubling negative numbers",
resp.toStr
Shinkan wrote:
It's really annoying that it talks about "JDK14LoggerAdapter" ??! I use JDK
and JRE 1.5.
"JDK14" just means "the java.util.logging infrastructure that was
introduced in Java 1.4", it's not saying that you are running 1
TTPConduit) {
HTTPClientPolicy policy = ((HTTPConduit)conduit).getClient();
if(policy == null) {
policy = new HTTPClientPolicy();
((HTTPConduit)conduit).setClient(policy);
}
// disable chunking
policy.setAllowChunking(false);
}
Ian
--
I
,
which are both doable in the Spring configuration (note I haven't tried
this myself).
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
han the interceptors, but for the client side CXF needs to do the
zipping and setting of all the relevant HTTP headers itself. Before I
upgraded the interceptors to work on the server side as well as the
client I used to use http://sourceforge.net/projects/pjl-comp-filter in
my web.xml.
r someone jump in to argue the
case for JAXB though.
JAXB supports the schema-first style as well. CXF uses this capability
for some of the Spring configuration classes (e.g. HTTPClientPolicy)
which are generated from the schemas at build time.
Ian
--
Ian Roberts | Department o
st be able to apply the patch from the JIRA issue directly
onto the 2.0.x source code (I originally wrote the patch against the 2.0
branch as that's what I use).
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
pass it as a parameter to the
methods of xyzSessionState? Somewhat ugly, I admit...
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
appreciated
Rather than session-scoping the service bean, an alternative would be to
move the data that needs to be scoped at the session level out into
another class and keep your service bean singleton, i.e.:
scope="session">
Ian
--
Ian Roberts | Departmen
picks up the Session opened by the
Interceptor?
As long as your HibernateTemplate isn't set up to alwaysUseNewSession
then yes, the template will pick up the interceptor's session.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
Ian Roberts wrote:
class="org.springframework.orm.hibernate.HibernateInterceptor">
Sorry, that probably wants to be orm.hibernate3 instead of orm.hibernate...
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
implement?
Spring's HibernateInterceptor should do what you're after:
class="org.springframework.orm.hibernate.HibernateInterceptor">
...
implementorClass="my.service.Impl" ... />
Ian
--
Ian Roberts | D
"my.package.ClientIP", ipAddress);
In your implementation class, add a
@Resource
private WebServiceContext wsCtx;
and you should then be able to access the message property through that:
wsCtx.getMessageContext().get("my.package.ClientIP")
Ian
--
Ian Roberts | Departm
hen
it has finished. There's a CXF sample showing this too:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
that GATE (and in
particular my class above) is released under the LGPL, so I don't know
what's the legal position on merging code based on it into an Apache
project? Someone else starting from the Tomcat codebase rather than
mine wouldn't have that problem.
Ian
directly into applicationContext.xml.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
8999
(e.g. with system properties http.proxyHost=localhost and
http.proxyPort=8999). That way you don't have to chang the target URL
that the client is calling.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
For WS-I BP, the element names have to be different for each operation -
CXF only has the element name and namespace to decide which operation to
invoke.
But you could define a named complexType and share it between all the
elements:
etc. etc.
Ian
--
Ian Roberts
, in which case there's nowhere to put a file name. The other end
shouldn't see any difference at the infoset level whether the item is
transferred inline or via a MIME part.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
keeping @Path("/{id}") mapping to a String parameter. However,
a path of /123;456 resulted in the string id beging set to "123" only.
Something is slicing up the id at ";".
Probably the servlet container. I know tomcat uses a ; for session
cookies (http://
e adapter to use your wrapper object in place of String[].
Neither option is particularly elegant :-(
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
Maurer Uwe wrote:
Maybe the path is case sensitive - try WEB-INF instead of Web-inf?
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
r, so the
bus definition (in one of the imported files) needs to be processed
before the jaxws:endpoint.
I've been meaning to submit a JIRA about this but never got around to
it, this may be the prod I needed...
https://issues.apache.org/jira/browse/CXF-1619
Ian
--
I
cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd";>
http://localhost:8080/HelloWorld"; />
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
le instance of MyServiceImpl you could always store the impl
object in a field of the AuthenticationChecker, then you can always get
at the "real" object even if Spring passes a proxy to the before method.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
) why CXF couldn't do this? It would solve the dependency hell at a
stroke.
If the consensus is that it would be legal then I'm happy to try working
on a patch.
[1] http://asm.objectweb.org/doc/faq.html#Q15
[2] http://asm.objectweb.org/license.html
Ian
--
Ian Roberts
er or return
types, you need to tell the JAXB context about the subclasses explicitly.
http://www.nabble.com/problem-serializing-class-hierarchy-tt16795656.html
With CXF 2.1 you can just use @XmlSeeAlso, but it's a bit more
complicated with 2.0.x.
Ian
--
Ian Roberts | Dep
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#context-create
Also, do you have the required imports in your Spring context file?
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
o generate code from the WSDL you would get public
Groups getGroupsByPattern(String arg0), of course.
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
of simple type values - that's why it's splitting your string on whitespace.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK
1 - 100 of 101 matches
Mail list logo