This content has been marked as final.
Show 5 replies
-
1. Re: how to publish my own wsdl
asoldano Nov 14, 2007 1:42 PM (in response to tpawankumar)Use the wsdlLocation attribute of @WebService, pointing to a local copy of the wsdl you would like to publish.
Here is an example:@WebService( name = "Echo", targetNamespace = "http://tempuri.org/", wsdlLocation = "/WEB-INF/wsdl/service.wsdl", endpointInterface = "org.jboss.test.ws.interop.nov2007.wsaSoap12.Echo", portName = "CustomBinding_Echo1" )
-
2. Re: how to publish my own wsdl
tpawankumar Nov 15, 2007 12:21 AM (in response to tpawankumar)Hi Alessio,
Thanks for the reply.
I have tried but i didnt succeed.
This is my SEIpackage com.covad.inter; import java.rmi.Remote; import java.rmi.RemoteException; import javax.jws.WebService; @WebService(name="Hello",targetNamespace = "http://Inter.covad.com/") public interface Hello extends Remote { String echo(String value) throws RemoteException; }
and following code is my implementation of SEIpackage com.covad.impl; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; @WebService(name="HelloImpl",targetNamespace = "http://Inter.covad.com/",wsdlLocation="WEB-INF/wsdl/HelloService.wsdl",portName="HelloPort") //@SOAPBinding(style = SOAPBinding.Style.RPC) public class HelloImpl { public String echo(String value) { return "Hello"+value; } }
This is my HelloService.wsdl<?xml version="1.0" encoding="UTF-8"?> <definitions name='HelloService' targetNamespace='http://Inter.covad.com/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://Inter.covad.com/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'> <types/> <message name='Hello_echo'> <part name='arg0' type='xsd:string'/> </message> <message name='Hello_echoResponse'> <part name='return' type='xsd:string'/> </message> <portType name='Hello'> <operation name='echo' parameterOrder='arg0'> <input message='tns:Hello_echo'/> <output message='tns:Hello_echoResponse'/> </operation> </portType> <binding name='HelloBinding' type='tns:Hello'> <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> <operation name='echo'> <soap:operation soapAction=''/> <input> <soap:body namespace='http://Inter.covad.com/' use='literal'/> </input> <output> <soap:body namespace='http://Inter.covad.com/' use='literal'/> </output> </operation> </binding> <service name='HelloService'> <port binding='tns:HelloBinding' name='HelloPort'> <soap:address location='REPLACE_WITH_ACTUAL_URL'/> </port> </service> </definitions>
When i deployed in Jboss 4.2.1 GA.It is giving me the following exception
java.lang.IllegalStateException: Cannot find endpoint meta data for: JWeb
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointM
etaData(UnifiedMetaDataDeploymentAspect.java:117)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(Unifi
edMetaDataDeploymentAspect.java:86)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy
(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDep
loyerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
erceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.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 $Proxy45.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.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
could you please let me know where i am doing wrong?
Thanks in Advance.
Pavan. -
3. Re: how to publish my own wsdl
asoldano Nov 15, 2007 4:19 AM (in response to tpawankumar)"tpawankumar" wrote:
java.lang.IllegalStateException: Cannot find endpoint meta data for: JWeb
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointM
etaData(UnifiedMetaDataDeploymentAspect.java:117)
mmh... something wrong for sure... do you know where does that "JWeb" come from? The deployer is looking for an endpoint with that name...
Also double check that the wsdl file you deploy in the archive is what you expect it to be. -
4. Re: how to publish my own wsdl
tpawankumar Nov 15, 2007 5:28 AM (in response to tpawankumar)
Hi Alessio,
I have given that name in web.xml file.
Below is my web.xml<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet> <servlet-name>JWeb</servlet-name> <servlet-class>com.covad.impl.HelloImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>JWeb</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
Is the wsdlLocation annotation that i have given is right?
Where i should specify on SEI or Implementation class?
could also please check the name attribute that i have given for SEI and Implementation class should be different or it should match?
That is same wsdl that i want to publish.
Thanks in Advance. -
5. Re: how to publish my own wsdl
tpawankumar Nov 15, 2007 10:41 PM (in response to tpawankumar)
Hi Alessio,
I couldnt figure out what's wrong i have done.
But i tried with different application as per the suggestion given by you.
It is working.
Thanks for your reply.
Thanks,
Pavan.