[JBossWS] - java.lang.TypeNotPresentException: Type javax.xml.bind.annot
by Christy
Hi!
I'm using JWSDP2.0 and JBoss4.2.2.GA.
I created a simple web-service:
@WebService
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public class TestDiffFormats {
@WebMethod
public void getList(@WebParam(name="result", mode=WebParam.Mode.INOUT)Holder<java.util.List> result){
result.value.add("SS");
}
}
I generated client stubs using JAXWS2.0. Here is my client code:
public String getRes() {
String res = "";
TestDiffFormatsService testDiffFormatsService = new TestDiffFormatsService();
TestDiffFormats port = testDiffFormatsService.getTestDiffFormatsPort();
javax.xml.ws.Holder<java.util.List> h = new javax.xml.ws.Holder<java.util.List>(new ArrayList());
port.getList(h);
System.out.println(" = " + h.value.size());
return res;
}
When I tried to invoke web-service I had the error:
java.lang.TypeNotPresentException: Type javax.xml.bind.annotation.AccessType not present
What is wrong?
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141005#4141005
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141005
18 years
[Microcontainer] - Re: Code example for a basic parsing deployer
by david.lloyd@jboss.com
"alesj" wrote : I think you're misusing BasicXMLDeployer.
Well I certainly won't argue that.
"alesj" wrote : This one expects KernelDeployment. As the exception and code clearly say. :-)
| So your URL must point to MC beans xml file.
Right - my -beans.xml looks like this (not using the new stuff quite yet):
<deployment xmlns="urn:jboss:bean-deployer:2.0">
| <bean name="RemotingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
| <constructor>
| <parameter>org.jboss.cx.remoting.metadata.RemotingMetaData</parameter>
| </constructor>
| <property name="name">jboss-remoting.xml</property>
| <property name="registerWithJBossXB">true</property>
| </bean>
| </deployment>
...based on previous examples given here and elsewhere.
"alesj" wrote : OK, I'm guessing here. You have a file that is your custom xml. And you want to get RemotingMD out.
Not quite. I don't really care about getting my RemotingMetaData out. I just want the container to pull the BeanMetaData from it (it implements BeanMetaDataFactory) and use it to create the actual deployment. Adrian stated that you don't need to write a deployer if you use the JAXB annotations, and this is exactly what I'm trying to do.
"alesj" wrote : Then all you need to is to change that line
|
| | KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
| |
| to
|
| | RemotingMD deployment = (RemotingMD) unmarshaller.unmarshal(url.toString(), resolver);
| |
So I do need my own deployer after all?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141002#4141002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141002
18 years
[Microcontainer] - Re: Code example for a basic parsing deployer
by david.lloyd@jboss.com
OK, so I've got another dumb question but I can't find the answer in the docs, and I don't understand what I'm seeing in the source code. I'm getting a ClassCastException here:
Caused by: java.lang.ClassCastException: org.jboss.cx.remoting.metadata.RemotingMetaData
at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:147)
at org.jboss.cx.remoting.jrpp.EmbeddedBootstrap.deploy(EmbeddedBootstrap.java:21)
Looks like it wants the result of the parsing to be a KernelDeployment instance. But I'm sure I've seen metadata objects in other projects that don't implement this interface - and besides, I thought that if I implemented BeanMetaDataFactory on my metadata beans that it would use this data somehow to produce KernelDeployments for me?
So... what basic point am I missing now? :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140990#4140990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140990
18 years