[JBoss JIRA] Created: (JBWS-1948) Optional SOAP Header element is required by WSSecurityHandlerServer handler.
by Sławomir Wojtasiak (JIRA)
Optional SOAP Header element is required by WSSecurityHandlerServer handler.
----------------------------------------------------------------------------
Key: JBWS-1948
URL: http://jira.jboss.com/jira/browse/JBWS-1948
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ws-security
Affects Versions: jbossws-2.0.2
Reporter: Sławomir Wojtasiak
When jbossws is configured to "use org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer" JaxWS handler, all SOAP messages have to contain optional Header element. Messages which do not contain this element causes NullPointerException.
Class: WSSecurityDispatcher
Method: public static void handleInbound(CommonMessageContext ctx) throws SOAPException, SOAPFaultException
// soapHeader is null for messages without header element.
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
QName secQName = new QName(Constants.WSSE_NS, "Security");
// Method findElement try to use soapHeader without checking against null first and causes NullPointerException.
Element secHeaderElement = Util.findElement(soapHeader, secQName);
Workaround:
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
Element secHeaderElement = null;
if( soapHeader != null ) {
QName secQName = new QName(Constants.WSSE_NS, "Security");
secHeaderElement = Util.findElement(soapHeader, secQName);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 6 months
[JBoss JIRA] Created: (JBWS-2159) Faults not handled correctly for WS-RM services
by Zach Mabe (JIRA)
Faults not handled correctly for WS-RM services
-----------------------------------------------
Key: JBWS-2159
URL: http://jira.jboss.com/jira/browse/JBWS-2159
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ws-reliable
Affects Versions: jbossws-native-3.0.1
Environment: Jboss AS 4.2.2.GA, Windows XP, JDK 1.5.0_08, jbossws-3.0.1-native-2.0.4.GA
Reporter: Zach Mabe
I am getting a NullPointerException whenever a service with RM support throws a fault.
The issue seems to to be rooted in the fact that the RMInvocationHandler does not set the RMConstant.RESPONSE_CONTEXT until after the invocation. See below the code from RMInvocationHandler.
if (inv.getJavaMethod() != null)
{
logger.debug("Invoking method: " + inv.getJavaMethod().getName());
//app fault thrown within, handlerchain handleFault called, no RM ResponseContext for the RMServerHandler to use, end
//up with NPE
this.delegate.invoke(ep, inv);
}
else
{
logger.debug("RM lifecycle protocol method detected");
}
setupResponseContext(rmResponseContext); //where the rmresponsecontext is set.
Here's the stacktrace for the application fault.
11:45:41,614 WARN [ServiceEndpointInvoker] Exception while processing handleFault: com.cox.wireless.zachsservice.faults.RandomException: An error occurred
at com.cox.wireless.zachsservice.service.AbstractWebService.doSimple(AbstractWebService.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:102)
at org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.invoke(RMInvocationHandler.java:324)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
Here's the stacktrace for the NPE which results.
11:45:41,614 ERROR [SOAPFaultHelperJAXWS] SOAP request exception javax.xml.ws.WebServiceException: java.lang.NullPointerException
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleFault(HandlerChainExecutor.java:232)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callFaultHandlerChain(HandlerDelegateJAXWS.java:131)
at org.jboss.ws.core.server.ServiceEndpointInvoker.callFaultHandlerChain(ServiceEndpointInvoker.java:142)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:286)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
[JBoss JIRA] Commented: (JBWS-92) DII Client fails when using jdk1.5.0_01
by danskal danskal (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-92?page=comments#action_12410802 ]
danskal danskal commented on JBWS-92:
-------------------------------------
I had the same problem (though not with jboss - similar stack trace)
with jdk1.5.0_13, but it seems to be fixed in jdk1.5.0_15
> DII Client fails when using jdk1.5.0_01
> ---------------------------------------
>
> Key: JBWS-92
> URL: http://jira.jboss.com/jira/browse/JBWS-92
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-native
> Affects Versions: jboss-ws4ee-4.0.1
> Environment: Windows XP SP2
> jboss-4.0.1
> jdk1.5.0_01
> Reporter: sirwio
> Assigned To: Thomas Diesler
> Fix For: jboss-ws4ee-4.0.2
>
> Attachments: HelloServiceClient.zip, jbws92.zip
>
>
> I have a deployed the webservice created when following the guide on http://www.dcl.hpi.uni-potsdam.de/research/asg/ws4ejb/
> The webservice deploys nicely.
> My client wich uses dii to access the webservice throws an exception when jdk1.5.0_01 (and jdk1.5.0) is used when compiling/running the client.
> The client works fine if jdk1.4.2_07 is used.
> The exception thrown is:
> 2005-feb-01 11:25:07 HelloServiceClient testSayHello
> INFO: http://DES-04004:8080/HelloService/HelloEndpointPort
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
> faultSubcode:
> faultString: java.lang.NullPointerException
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:396)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
> at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:263)
> at org.apache.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:657)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:430)
> at org.apache.axis.Message.getContentType(Message.java:496)
> at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:386)
> at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:126)
> at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:160)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:123)
> at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:126)
> at org.apache.axis.client.Call.invokeEngine(Call.java:3029)
> at org.apache.axis.client.Call.invoke(Call.java:3014)
> at org.apache.axis.client.Call.invoke(Call.java:2608)
> at org.apache.axis.client.Call.invoke(Call.java:2513)
> at org.apache.axis.client.Call.invokeInternal(Call.java:1973)
> at org.apache.axis.client.Call.invoke(Call.java:1914)
> at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
> at HelloServiceClient.testSayHello(HelloServiceClient.java:21)
> at HelloServiceClient.main(HelloServiceClient.java:60)
> org.apache.axis.AxisFault: java.lang.NullPointerException
> at org.apache.axis.AxisFault.makeFault(AxisFault.java:146)
> at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:136)
> at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:160)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:123)
> at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:126)
> at org.apache.axis.client.Call.invokeEngine(Call.java:3029)
> at org.apache.axis.client.Call.invoke(Call.java:3014)
> at org.apache.axis.client.Call.invoke(Call.java:2608)
> at org.apache.axis.client.Call.invoke(Call.java:2513)
> at org.apache.axis.client.Call.invokeInternal(Call.java:1973)
> at org.apache.axis.client.Call.invoke(Call.java:1914)
> at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
> at HelloServiceClient.testSayHello(HelloServiceClient.java:21)
> at HelloServiceClient.main(HelloServiceClient.java:60)
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:396)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
> at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:263)
> at org.apache.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:657)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:430)
> at org.apache.axis.Message.getContentType(Message.java:496)
> at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:386)
> at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:126)
> ... 13 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
Binding custom Exception field fails
by commercie rhcp
Hi there,
I'm trying to make a simple hallo World with a parameter and a custom
exception that has its own field. Without the extra field in the exception
it works fine. Server start up fine but when I call my webservice with the
field "naam" filled in with "kaboom" (with this value the exception is
thrown) this is what I get:
08:48:41,921 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: org.jboss.xb.binding.JBossXBRuntimeException:
Failed to find read method or field for property 'typeFout' in class
nl.havermans.rhcp.boodschappen.webservice.EWebserviceException
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl
.java:310)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:1
89)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandler
Impl.java:122)
at
org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
The problem is that the property really is in the class
nl.havermans.rhcp.boodschappen.webservice.EWebserviceException, I even tried
to make the field itself public but it doesn't help. Does anyone know why
this is happening?
I have provided the source files so you can have a look at it (deleted the
libs for size issues).
Can anyone have a look at this?
Kind regards,
Ramon Havermans
16 years, 7 months