WS-Eventing extension sends incorrect HTTP content-type
by Dan Retzlaff
The Subscription class in org.jboss.ws.extensions.eventing.mgmt contains
hard-coded SOAP 1.2 envelopes for event notification and SubscriptionEnd
messages. However, SOAPConnectionImpl::callOneWay() sets the HTTP
content-type to "text/xml". (More specifically,
SOAPMessageImpl::saveChanges() does.)
The SOAP 1.2 specification (7.1.4) and RFC 3902 require that SOAP HTTP
bindings use a content-type of "application/soap+xml".
This appears to be a bug. In my case, it manifests itself when Axis2
throws a SOAPProcessingException complaining that incoming transport level
information does not match the SOAP namespace.
I would suggest that Subscription provide the correct content-type in a
MimeHeaders object to its MessageFactory::createMessage() call, but
SOAPMessageImpl::saveChanges() overwrites the value indiscriminately. Is
changing those hard-coded envelopes to SOAP 1.1 the best solution here? It
seems like we should be able to make SOAP 1.2 work...
Regards,
Dan
18 years, 2 months
[JBossWS] - Exception with WSClient
by Vincent321
Hello,
I get the following exception when calling a WS with my client:
FAILED: testCall
javax.xml.ws.WebServiceException: java.lang.IllegalStateException: Could not setup remoting client
at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:304)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:242)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy27.fetchToken(Unknown Source)
at WsClientTest.testCall(WsClientTest.java:26)
Caused by: java.lang.IllegalStateException: Could not setup remoting client
at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(RemotingConnectionImpl.java:240)
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:153)
at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:322)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:230)
... 26 more
at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
at org.jboss.remoting.Client.connect(Client.java:441)
at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(RemotingConnectionImpl.java:227)
... 30 more
Caused by: java.lang.NullPointerException
at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:144)
at org.jboss.remoting.RemoteClientInvoker.(RemoteClientInvoker.java:46)
at org.jboss.remoting.transport.http.HTTPClientInvoker.(HTTPClientInvoker.java:105)
at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.(HTTPSClientInvoker.java:63)
at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
... 38 more
... Removed 27 stack frames
Do you know where it can come from ?
Thanks a lot in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120640#4120640
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120640
18 years, 2 months
[JBossWS] - Enabling MTOM-Support at JBossWS client fails
by seventy8
Hello!
I am trying to use mtom for sending a binary file from a web service client to a web service endpoint, using JBoss AS 4.2.2.GA with build in JBossWS 2.0.1.SP2.
I enabled mtom on the endpoint and on the client like it is told in the user guide:
First I added the @BindingType Annotation
| @Stateless
| @TransactionManagement(value=TransactionManagementType.CONTAINER)
| @WebService(name="AdminLibrary",
| serviceName="AdminLibraryService",
| wsdlLocation="META-INF/wsdl/AdminLibraryService.wsdl")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
| @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
| @WebContext(contextRoot = "ALibrary")
| public class AdminLibraryWS {
|
| ...
|
|
Then I used WSProvide to generate the wsdl and did the appropriate changes
|
| <xs:schema targetNamespace='http://ws.session.ejb.alibrary.seventy8.com/' version='1.0' xmlns:tns='http://ws.session.ejb.alibrary.seventy8.com/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
| <xs:import schemaLocation='http://www.w3.org/2005/05/xmlmime' namespace='http://www.w3.org/2005/05/xmlmime'/>
| <xs:element name='ALibraryException' type='tns:ALibraryException'/>
| <xs:element name='importBook' nillable='true' type='tns:importBookRequest'/>
| <xs:element name='importBookResponse' nillable='true' type='tns:importBookResponse'/>
| <xs:complexType name='importBookRequest'>
| <xs:sequence>
| <xs:element minOccurs='0' name='dataHandler' type='xmime:base64Binary' xmlns:xmime='http://www.w3.org/2005/05/xmlmime'/>
| <xs:element minOccurs='0' name='userId' type='xs:string'/>
| </xs:sequence>
|
|
After deploying everything looks fine on the server. So I ran WSConsume
At the clients side I enabled MTOM as follows:
|
| SOAPBindingbinding = (SOAPBinding)((BindingProvider)port).getBinding();
| binding.setMTOMEnabled(true);
|
|
When I test this service and check the SOAP Message, the binary content is transmitted inline.
|
| POST /ALibrary-ALibrary./AdminLibraryWS HTTP/1.1
| SOAPAction: ""
| Content-Type: text/xml; charset=UTF-8
| JBoss-Remoting-Version: 22
| User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto)
| Host: 127.0.0.1:4040
| Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
| Connection: keep-alive
| Content-Length: 284493
|
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns1:importBook xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns1="http://ws.session.ejb.alibrary.seventy8.com/"><dataHandler>PQA9AD0AIABWAGUAcgBiAG8AcwBlACAAbABvAGcAZwBpAG4AZwAgAHMAdABhAHIAdABlAGQAOgAgA
|
| ...
|
| DAAMwAuADAANAAuADIAMAAwADcAIAAgADIAMQA6ADMANQA6ADAANwAgACAAQgB1AGkAbABkACAAdAB5AHAAZQA6ACAAUwBIAEkAUAAgAFUATgBJAgA=</dataHandler><userId>user1</userId></ns1:importBook></env:Body></env:Envelope>
|
|
Is there anything further I have to do to enable MTOM at the client?
WSConsume generates a class named Base64Binary which includes a byte-array and a field called contentType.
IMO the type should be DataHandler instead, or am I wrong?
best regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120639#4120639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120639
18 years, 2 months
[JBossWS] - Re: EntityManager injection in Webservice
by froden
I guess I should also add that after I had removed the servlet and servlet mapping, and added the WebContext annotation, calling the web service would cause the following exception:
19:05:06,212 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| org.jboss.ws.WSException: Cannot obtain container from Dispatcher: jboss.j2ee:ear=Community.ear,jar=Community-1.0.jar,name=MyService,service=EJB3
| at org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3.invokeServiceEndpointInstance(ServiceEndpointInvokerEJB3.java:109)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:207)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
| at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| 19:05:06,221 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| org.jboss.ws.WSException: Cannot obtain container from Dispatcher: jboss.j2ee:ear=Community.ear,jar=Community-1.0.jar,name=MyService,service=EJB3
| at org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3.invokeServiceEndpointInstance(ServiceEndpointInvokerEJB3.java:109)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:207)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
| at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
Opening the wsdl however, works fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120595#4120595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120595
18 years, 2 months
[JBossWS] - WS-Security Newbie Question...
by lafaserem
Hi!
Sorry for the question 'cause actually it's a really newbie one :) but I'm just getting crazy trying to find some kind of tutorial of implementing WS-Security in JBoss... something like "My first WS-Security web service" or "Step-by-step 'Hello World' or 'Echo' Web Service with WS-Security".
I've seen several documents explaining things about WSSE, and I have created my keystore and truststore but then when I try to continue I just get lost...
If you could give me some advices or some links to look, I'll be very grateful...
I've done my first 'Echo' web service: BottomUp, TopDown, my first client, etc... and now I'm trying to implement the same Echo WebService but requiring signature (I'm not so interested in any kind of encryption, just signature)
Thanks ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120568#4120568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120568
18 years, 2 months