[JBossWS] - Re: Generate wsdl from JSR 181 POJO
by monowai
I assume by the deafening silence on this, that this is either a really stupid question, or we're the only suckers doing this ¯\(°_o)/¯
Here's how it works for me. Create a file called wstools-java-to-wsdl.xml based upon wstools-config.xml but have it include the <java-wsdl> tags. Here is an example based on the 181ejb example:
<java-wsdl>
|
| <service name="TestService" style="rpc"
| endpoint="org.jboss.test.ws.jaxws.samples.jsr181ejb.EndpointInterface"/>
|
| <namespaces target-namespace="http://org.jboss.ws/samples/jsr181ejb"
| type-namespace="http://org.jboss.ws/samples/jsr181ejb/types"/>
|
| <mapping file="jaxrpc-mapping.xml"/>
| <webservices servlet-link="TrivialEndpoint"/>
| </java-wsdl>
Then, run the wstools with the following arguments:
-cp [FULL_PATH_TO_CLASS_FILE] -config ./resources/wstools-config.xml -dest ./resources/META-INF
My paths are relative to the folder jbossws-samples-1.0.4.GA\jaxws\jsr181ejb folder.
When run, it will create the META-INF/wsdl/TestServices.wsdl file.
It seems that wstools is not selective in what it creates. If you specify <java-wsdl> in your main wstools-config file, and you run the JBOSS sample ANT build files, then the WSDL will be recreated each time, overwriting your <soap:address location=.../> tag, which is not what you probably want to happen. I haven't looked in to how this works yet.
Likewise if the .wsdl file doesn't exist, then when you run your java2wsdl command, it will error complaining that it "can't load wsdl file" if your config contains the <wsdl-java> tags; Bit of a circular refrence going on there!
hth
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017334#4017334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017334
19 years, 1 month
[JBossWS] - SOAP request exception java.lang.NoClassDefFoundError
by liudan2005
I keep getting this when trying to run a very simple demo code:
| ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
|
| java.lang.NoClassDefFoundError
|
| at org.jboss.ws.jaxrpc.encoding.SimpleDeserializer.deserialize(SimpleDeserializer.java:52)
|
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:235)
|
| at org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
|
| at org.jboss.ws.binding.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:103)
|
| at org.jboss.ws.binding.EndpointInvocation.getRequestPayload(EndpointInvocation.java:117)
|
| at org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:115)
|
| at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
|
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
|
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
|
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
|
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
|
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
|
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
|
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
|
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
|
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
|
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
|
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
|
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
|
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
|
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
|
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
|
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
|
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
|
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
|
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
|
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
|
| at java.lang.Thread.run(Thread.java:595)
|
|
any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017303#4017303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017303
19 years, 1 month
[JBossWS] - ws4ee-Stack: Handler for mustUnderstand header
by stone_42
Hello,
I am using JBoss 4.0.3sp1 with the ws4ee stack delivered with JBoss 4.0.4. I have implemented a simple servlet based endpoint. To secure access to the endpoint, I use WS-Security and a jaxrpc handler of my own to handle the ws-security header in soap messages. Because clients set mustUnderstand="1" on the header, my handler must either set this attribute to 0 or remove the header from the SOAP message to prevent JBoss from throwing an exception with the message "unprocessed mustUnderstand header". But if I do so, the stack behaves very strange when serializing a response: It serializes the contents of the body twice.
Debugging JBoss, I found out that methodorg.jboss.webservice.handler.ServerHandlerChain.handleRequest(MessageContext) checks if the handlers changed the soap request message and if so, replaces the value of the property axis.provider.java.rpc-invocation in the MessageContext.
I also found out, that methods org.jboss.webservice.server.InvokerProviderJSE.invokeTarget(RPCInvocation) and org.jboss.axis.providers.java.RPCProvider.processMessage(MessageContext, SOAPEnvelopeAxisImpl, SOAPEnvelopeAxisImpl, Object) invoke method org.jboss.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope() on different objects. This again is the reason that the contents of the body of the response message is doubled.
Is there any solution to this problem, so I will be able to use soap headers with attribute mustUnderstand="1"?
Regards,
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017032#4017032
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017032
19 years, 1 month