[JBossWS] - Re: Authorization failure .NET client to secured Webservices
by cboatwright
I didn't notice a @PortComponent annotation, like:
| @PortComponent(authMethod="BASIC", urlPattern="/contextHere/athenaserver",transportGuarantee="CONFIDENTIAL")
|
Also, I'm guessing you are using the Tomcat that comes with 4.0.5.GA? If so, you should also remember to set the restrictedUserAgents attribute on the connector:
| <Connector port="443" address="${jboss.bind.address}"
| maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| scheme="https" secure="true" clientAuth="false"
| keystoreFile="${jboss.server.home.dir}/conf/keystore_tiger"
| keystorePass="--" sslProtocol = "TLS"
| restrictedUserAgents="^.*MS Web Services Client Protocol.*$"/>
|
I'm not a VB expert so I cannot comment on that. I've used the express edition to test my secure Web services and things work just fine. I have something like:
| Dim proxy As New HelloWorldWs.HelloWorldService
|
| Try
| proxy.PreAuthenticate = True
| proxy.Credentials = New NetworkCredential("colin1", "myPass")
|
| Dim result As String
| result = proxy.echoString("J", "Scott")
| MsgBox(result)
| Catch ex As Exception
|
| MsgBox(ex.Message)
|
| End Try
|
|
Hope this helps spark some thoughts to discover your problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990866#3990866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990866
18 years, 1 month
[JBossWS] - Document/Literal and org.w3c.dom.Element return type
by cboatwright
I read in several places that org.w3c.dom.Element gets mapped to anyType and can be used in Document/Literal endpoints. However, I cannot seem to get a simply test endpoint (using JSR-181 EJB) to work.
Using JBoss 4.0.5.GA w/ JBossWS 1.0.4.GA
| @EJB(name="PingBuildLinksEndPointBean", beanInterface=IPingBuildLinksEndPointBean.class, description="This is the ping description", beanName="PingBuildLinksEndPointBean")
| @WebService(name="PingBuildLinksEndPoint")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL)
| @PortComponent(authMethod="BASIC", urlPattern="/test.ws",transportGuarantee="CONFIDENTIAL")
| @RolesAllowed("BLDADM")
| @SecurityDomain("BuildLinksWs")
|
| /**
| * @author cboatwright
| */
| public @Stateless class PingBuildLinksEndPointBean extends AbstractDatabaseSessionEndPoint
| implements IPingBuildLinksEndPointBean
| {
| public PingBuildLinksEndPointBean()
| throws CreateException, BuildLinksException
| {
| super();
| }
|
| @WebMethod
| public Element elementPing(String arg0)
| throws BuildLinksFault
| {
| Element rv = null;
|
| log.debug("ignored arg0=" + arg0);
|
| try
| {
| rv = DOMUtils.parse("<helloWorld/>");
| }
| catch (IOException e)
| {
| throw new BuildLinksFault(e.getMessage());
| }
|
| return rv;
| }
|
I get the following exception (regardless of the length of the XML returned, the above example just has one node):
| 23:58:03,035 ERROR [[PingBuildLinksEndPointBean]] Servlet.service() for servlet PingBuildLinksEndPointBean threw exception
| org.jboss.xb.binding.JBossXBRuntimeException: Failed to find read method or field for property '_value' in class org.apache.xerces.dom.DeferredElementNSImpl
| at org.jboss.xb.binding.introspection.ClassInfo.getFieldInfo(ClassInfo.java:81)
| at org.jboss.xb.binding.introspection.FieldInfo.getFieldInfo(FieldInfo.java:155)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.getJavaValue(MarshallerImpl.java:1266)
| at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.getElementValue(MarshallerImpl.java:1284)
| .. cut
|
Any advice on how to send back the result as a well-formed XML element? When I try just to do it as a string, all of the XML reserved characters get escaped ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990865#3990865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990865
18 years, 1 month