[JBossWS] - Question on accessing keystore/truststore that is not relati
by EstrellaRichardson
Hi,
I have a secured web service which is deployed to a secured port. The service is implemented using EJB and JSR181 annonations on the server-side, the client-side is also an EJB. Both are deployed as EAR files. My application runs in the background of a web application which uses SSL/TLS. As part of the the foreground web application, certificates are exchanged and are imported into the appropriate truststore and keystores. My diliema is that I want to use the same keystore and truststore with my client and service. I have the following in my jboss-wsse-client.xml file:
<key-store-file>/var/cert/keystore</key-store-file>
<key-store-password>(password)</key-store-password>
<trust-store-file>/var/cert/truststore</trust-store-file>
<trust-store-password>()</trust-store-password>
and the same in my jboss-wsse-server.xml file. I am getting the following error when I try to access my service:
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Everything that I have read on this particular exception says that it indicates that the certificate has not been imported into the truststore; however, I have used keytool to verify that the appropriate certs are in the appropriate places. I believe that I am getting this error because the location that I am giving for the keystore and truststore is located on the filesystem outside of the EJB deployment EAR file and it can not find the keystore/truststore.
Can someone validate or invalidate my conclusion? and if my assumption is correct, can someone tell me if it is possible to access a keystore/truststore outside of the relative deployment of the EJB?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980776#3980776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980776
17 years, 8 months
[JBossWS] - Re: jws & visual b. soapsdk3.0, namespaces. JAXRPCException:
by delkant
I'm using jbossws 1.0.2 but i also made some test with 1.0.3, and still have the same problem, but wasn't a jbossws problem, i solve it using the low level soapsdk way, making line by line my own soap archive in visual b.
|
| Option Explicit
| Dim URL
| Const ENC = "http://schemas.xmlsoap.org/soap/encoding/"
| Const XSI = "http://www.w3.org/1999/XMLSchema-instance"
| Const XSD = "http://www.w3.org/1999/XMLSchema"
| Const NS = "http://localhost/eset/py/ServiceWS"
| Dim Method
| Dim Connector
| Dim Serializer
|
| Function init(aParameters, aValues) As String
| Dim URI
| URL = Parametros.SERVER_HOST & "/eset/ServiceWS?wsdl"
| Set Connector = CreateObject("MSSOAP.HttpConnector30")
| Set Serializer = CreateObject("MSSOAP.SoapSerializer30")
|
| Dim Reader
| Set Reader = CreateObject("MSSOAP.SoapReader30")
| URI = NS
| Connector.Property("EndPointURL") = URL
| Connector.Property("SoapAction") = Method
| Call Connector.Connect
| Call Connector.BeginMessage
| Serializer.init Connector.InputStream
| Serializer.StartEnvelope "soapenv", ENC
| Serializer.SoapNamespace "xsi", XSI
| Serializer.SoapNamespace "xsd", XSD
| Serializer.StartBody "soapenv"
| Serializer.startElement Method
| Serializer.SoapAttribute "xmlns", "", NS, ""
|
| Dim iCount
| iCount = 0
| Dim sP
|
| For Each sP In aParameters
| WriteElement sP, aValues(iCount)
| 'MsgBox(sP & ":" & aValues(iCount))
| iCount = iCount + 1
| Next
|
| Serializer.endElement
| Serializer.EndBody
| Serializer.EndEnvelope
| Connector.EndMessage
| Reader.Load Connector.OutputStream
| If Not Reader.Fault Is Nothing Then
| MsgBox Reader.faultstring.Text, vbExclamation
| Else
| 'Response is in Reader.DOM - just parse it
| 'Reader.RPCResult.XML
| init = Reader.RPCResult.Text
| End If
| End Function
|
|
| Sub WriteElement(sName, sValue)
| 'MsgBox(sName & ":" & sValue)
| Serializer.startElement sName
| 'Serializer.SoapAttribute "type", , "xsd:string", "xsi"
| Serializer.SoapAttribute "xmlns", "", "", ""
| Serializer.WriteString sValue
| Serializer.endElement
| End Sub
|
|
|
| Public Function aSpecifMethod(pamam1 As String, param2 As String) As String
| Dim result
| Dim aParameters
| Dim aValues
| '(sName, sValue)
| Method = "aSpecifMethod"
| aParameters = Array("String_1", "String_2")
| aValues = Array(param1, param2)
| aSpecifMethod = init(aParameters, aValues)
|
| End Function
|
|
|
this code works fine on visual basic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980746#3980746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980746
17 years, 8 months
[JBossWS] - WS STRING[] ERROR: could not find deserializer for type Stri
by rudyto
The deploy process on JBoss 4.0.5 is running OK, but when I invoke my webservice method from my WSDII client, it retrieves this error message:
org.jboss.axis.AxisFault: Deserializing parameter 'result': could not find deserializer for type {http://mypackage/types}String.Array
My interface (and class) also has other methods are returning simple type like int, boolean and String, but these methods are running perfectly.
I have also tried with others sequence return types like int[], Vector, StringTokenizer, but they aren't running.
On JBoss 4.0.3.SP1 all running ok, but i can't use this old version.
My Application server is:
----------------------------------------
JBoss 4.0.5.GA running on JDK 1.5 (jdk1.5.0_08)
----------------------------------------
My INTERFACE is like this:
----------------------------------------
import java.rmi.Remote;
| import java.rmi.RemoteException;
|
| public interface myinterface extends Remote {
| ..........
| public String[] mymethod(String myparameter) throws RemoteException;
| ..........
| }
----------------------------------------
My WSDL FILE (autogenerated by JBOSS Tool in ...\JBoss 4.0.5.GA\bin\wstools.bat) contains this:
----------------------------------------
.........
| <complexType name='String.Array'>
| <sequence>
| <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='string'/>
| </sequence>
| </complexType>
| .........
| <message name=''myinterface_mymethod'>
| <part name='String_1' type='xsd:string'/>
| </message>
| <message name='myinterface_mymethodResponse'>
| <part name='result' type='ns1:String.Array'/>
| </message>
| .........
| <operation name='mymethod' parameterOrder='String_1'>
| <input message='tns:myinterface_mymethod'/>
| <output message='tns:myinterface_mymethodResponse'/>
| </operation>
| .........
----------------------------------------
My JAXRPC-MAPPING.XML file (autogenerated by JBOSS Tool in ...\JBoss 4.0.5.GA\bin\wstools.bat) contains this:
----------------------------------------
...........
| <package-mapping>
| <package-type>mypackage</package-type>
| <namespaceURI>http://mypackage/types</namespaceURI>
| </package-mapping>
| ...........
| <service-endpoint-method-mapping>
| <java-method-name>mymethod</java-method-name>
| <wsdl-operation>mymethod</wsdl-operation>
| <method-param-parts-mapping>
| <param-position>0</param-position>
| <param-type>java.lang.String</param-type>
| <wsdl-message-mapping>
| <wsdl-message xmlns:wsdlMsgNS='http://mypackage'>wsdlMsgNS:myinterface_mymethod</wsdl-message>
| <wsdl-message-part-name>String_1</wsdl-message-part-name>
| <parameter-mode>IN</parameter-mode>
| </wsdl-message-mapping>
| </method-param-parts-mapping>
| <wsdl-return-value-mapping>
| <method-return-value>java.lang.String[]</method-return-value>
| <wsdl-message xmlns:wsdlMsgNS='http://mypackages'>wsdlMsgNS:myinterface_mymethodResponse</wsdl-message>
| <wsdl-message-part-name>result</wsdl-message-part-name>
| </wsdl-return-value-mapping>
| </service-endpoint-method-mapping>
| ............
----------------------------------------
My CLIENT WSDII source is like this:
----------------------------------------
........
| String urlstr = mywsdlurl
| String nameSpaceURI = mynamespaceuri
| String serviceName = myservicename
| String portName = myserviceportname
|
| URL url = new URL(urlstr);
| QName qname = new QName(nameSpaceURI, serviceName);
| QName port = new QName(nameSpaceURI, portName);
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, qname);
|
| QName operation = operation = new QName(nameSpaceURI, mymethod);
| Call call = service.createCall(port, operation);
|
| String[] arr= ( String[])call.invoke(new Object[] {"myparametervalue"});
| for (int i = 0; i<arr.length; i++) {str+="["+arr+"]";}
| System.out.println(">> mymethod('myparametervalue'): "+str);
| ..........
----------------------------------------
The invoke method in WSDII client class generates the exception org.jboss.axis.AxisFault.
What i do to resolve this????
It's possible that collections (or arrays) objects don't work with JBoss 4.0.5.GA ???
Thanks in advance,
Rudy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980698#3980698
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980698
17 years, 8 months