[JBoss Web Services Users] - having trouble specifying namespace
by rsobchak
I have a web service on JBoss-4.2.3.GA using JBossWS-native-3.0.3.GA. The web service is currently not specifying a namespace.
I am having problems specifying the namespace.
The interface is defined as follows
| @WebService(name = "MyWebService")
| @SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED)
|
| public interface MyWebService
| {
| public void myMethod(String param1);
| }
|
The implementation is defined as follows
| @WebService(serviceName = "MyEndpointService",
| portName = "MyEndpointPort",
| endpointInterface = "com.myCompany.MyWebService")
| @WebContext(contextRoot = "/myCompany", urlPattern = "/myWebService")
| @Stateless
|
| public class myEJB
| {
| public void myMethod(String param1)
| {
| }
| }
|
This deploys and creates a single WSDL in the default (i.e. package) namespace.
When I attempt to specify the targetNamespace, the WSDL is broken into two with one importing the other.
The code with the namespace is as follows
| @WebService(name = "MyWebService",
| targetNamespace="http://com.myCompany")
| @SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED)
|
| public interface MyWebService
| {
| public void myMethod(String param1);
| }
|
| @WebService(serviceName = "MyEndpointService",
| portName = "MyEndpointPort",
| targetNamespace="http://com.myCompany"
| endpointInterface = "com.myCompany.MyWebService")
| @WebContext(contextRoot = "/myCompany", urlPattern = "/myWebService")
| @Stateless
|
| public class myEJB
| {
| public void myMethod(String param1)
| {
| }
| }
|
The resulting WSDL looks like this
| <definitions name="MyEndpointService" targetNamespace="http://com.myCompany/" xmlns="http://schemas.xmlsoap.org/wsdl/"
| xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:ns1="http://default.package/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:tns="http://com.myCompany/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <import location="http://hostname:8080/myCompany/myWebService?wsdl&resource=MyWebService_Po..." namespace="http://default.package/" />
| <service name="MyEndpointService">
| <port binding="ns1:MyWebServiceBinding" name="MyEndpointPort">
| <soap:address location="http://hostname:8080/myCompany/myWebService" />
| </port>
| </service>
| </definitions>
|
According to the java doc on WebService annotation specifying the same targetNamespace on the interface and implemenation would result in one WSDL
in the same namespace. Am I missing something?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253682#4253682
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253682
15 years, 3 months
[JBoss Web Services Users] - UnsupportedOperationException: setProperty
by Tashtego
JBoss: 5.1.0.GA
Java: 1.6.1
OS: Win XP Professional
WSDL file gets generated and is listed in:
http://localhost:8080/jbossws/services
I see the methods in eclipse web service explorer:
http://127.0.0.1:1863/wse/wsexplorer/wsexplorer.jsp?org.eclipse.wst.ws.ex...
Trying to execute my web service leads to an exception:
anonymous wrote :
| ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
| at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
| at org.jboss.ws.core.soap.SOAPMessageImpl.(SOAPMessageImpl.java:87)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:215)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:193)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:455)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
| at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
|
Can anyone help?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253585#4253585
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253585
15 years, 3 months