[JBossWS] - Re: Error SAP WS-Security client calling JBoss Security WS
by lall2
Hi enpasos,
thanks for your reply. I did a further test. Taking the request from the SAP system, see a) of my first post, I manually added
ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil...'
to the <wsse:Reference> element of
| ...
| <ds:KeyInfo>
| <wsse:SecurityTokenReference>
| <wsse:Reference URI="#sap-17"/>
| </wsse:SecurityTokenReference>
| </ds:KeyInfo>
| ...
|
| ----->
|
| ...
| <ds:KeyInfo>
| <wsse:SecurityTokenReference>
| <wsse:Reference URI="#sap-17" ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil...'/>
| </wsse:SecurityTokenReference>
| </ds:KeyInfo>
| ...
|
Using my sniffer tool, I resubmitted this modified request to JBoss and the
WSSecurityException("Inavliad message, Reference element is missing a ValueType") of
org.jboss.ws.extensions.security.element.DirectReference
was gone. But unfortunately, I faced the next exeption:
WSSecurityException("Invalid message, BinarySecurityToken is missing an id") of org.jboss.ws.extensions.security.element.X509Token
So I modified and resent the same request again by adding
xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...' wsu:Id='sap-18'
to the line
| ...
| <wsse:BinarySecurityToken
| ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil..."
| EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-secu...">
| ...
|
| ----->
|
| ...
| <wsse:BinarySecurityToken
| xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...'
| wsu:Id='sap-18'
| ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil..."
| EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-secu...">
| ...
|
Again, after resubmitting the modified request to JBoss, the exception did not occur any more.
However, using this resubmitting method resulted in an expired message error/exception. I am running out of ideas.
The only two things that remain is trying out the latest releases of JBoss and JBossWS native 3.0.3 or rebuilding JBossWS 3.0.x
from the source after commenting out the "Reference element is missing a ValueType" check of org.jboss.ws.extensions.security.element.DirectReference
and the "Invalid message, BinarySecurityToken is missing an id" check of org.jboss.ws.extensions.security.element.X509Token to see what is happening then.
Unfortunately, I have no time to do that at the moment :-(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174088#4174088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174088
17 years, 7 months
[JBossWS] - schemavalidation: fault not returned to calling client
by ljgp
Hi,
I am using JBoss 4.2.2 and
I was expecting that a schemavalidation error would by default be passed on to the client as a SOAP fault. I am observing that the exceptions show up in the app server logs, but that the client does not get any response (except for the header).
I tried both without a custom error handler, and with my own handler, throwing an exception from handleError(). Both gave the same result: no output sent to the client.
I must be missing something here, any help is appreciated.
Cheers, Luc.
The header is:
HTTP/1.1 200 OK
Date: Wed, 03 Sep 2008 10:03:33 GMT
Content-Length: 0
Content-Type: text/xml;charset=UTF-8
X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
Server: Apache-Coyote/1.1
In the logs it says:
12:03:33,416 INFO [SOAPBodyElementDoc] Validating: XML_VALID
12:03:33,447 ERROR [StrictlyValidErrorHandler] org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Service'. One of '{Schema}' is expected.
12:03:33,462 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Service'. One of '{Schema}' is expected.
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.validatePayload(SOAPBodyElementDoc.java:130)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:90)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:326)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandlerImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:321)
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)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173905#4173905
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173905
17 years, 7 months