anshu bajpai

Greenhorn
+ Follow
since Jan 02, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by anshu bajpai

I am trying to generate axis2 client stub for given WSDL but getting following error-

[ERROR] java.net.URISyntaxException: Illegal character in path at index 15: file:/C:/Pluton Server/installers/Webservice
_engine/axis2-1.5.1/bin/EncryptService.wsdl
java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 15: file:/C:/Pluton Server/i
nstallers/Webservice_engine/axis2-1.5.1/bin/EncryptService.wsdl
at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:63)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1869)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1927)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1616)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:433)
at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:144)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.jav
a:2319)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:413)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:402)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:346)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilde
r.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.net.URISyntaxException: Illegal character in path at index 15: file:/C:/Pluton Server/installers/Webserv
ice_engine/axis2-1.5.1/bin/EncryptService.wsdl
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3066)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:578)
at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:57)
... 14 more
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: java.net.URISyntaxException: Illegal character in path at index 15: file:/C:/Plut
on Server/installers/Webservice_engine/axis2-1.5.1/bin/EncryptService.wsdl
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:396)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilde
r.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
... 2 more


Kindly guide to generate java client subs.I am urgent need of it

<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions name="EncryptService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
- <wsp:Policy wsu:Id="WSHttpBinding_IEncryptService_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
<sp:RequireDerivedKeys />
- <sp:BootstrapPolicy>
- <wsp:Policy>
- <sp:SignedParts>
<sp:Body />
<sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
- <sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
- <sp:SymmetricBinding>
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
<sp:RequireDerivedKeys />
</wsp:Policy>
</sp:SpnegoContextToken>
</wsp:Policy>
</sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
<sp:EncryptSignature />
<sp:OnlySignEntireHeadersAndBody />
</wsp:Policy>
</sp:SymmetricBinding>
- <sp:Wss11>
- <wsp:Policy>
<sp:MustSupportRefKeyIdentifier />
<sp:MustSupportRefIssuerSerial />
<sp:MustSupportRefThumbprint />
<sp:MustSupportRefEncryptedKey />
</wsp:Policy>
</sp:Wss11>
- <sp:Trust10>
- <wsp:Policy>
<sp:MustSupportIssuedTokens />
<sp:RequireClientEntropy />
<sp:RequireServerEntropy />
</wsp:Policy>
</sp:Trust10>
</wsp:Policy>
</sp:BootstrapPolicy>
</wsp:Policy>
</sp:SecureConversationToken>
</wsp:Policy>
</sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
<sp:EncryptSignature />
<sp:OnlySignEntireHeadersAndBody />
</wsp:Policy>
</sp:SymmetricBinding>
- <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
<sp:MustSupportRefKeyIdentifier />
<sp:MustSupportRefIssuerSerial />
<sp:MustSupportRefThumbprint />
<sp:MustSupportRefEncryptedKey />
</wsp:Policy>
</sp:Wss11>
- <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
<sp:MustSupportIssuedTokens />
<sp:RequireClientEntropy />
<sp:RequireServerEntropy />
</wsp:Policy>
</sp:Trust10>
<wsaw:UsingAddressing />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IEncryptService_Decrypt_Input_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
<sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
</sp:EncryptedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IEncryptService_Decrypt_output_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
<sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
</sp:EncryptedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IEncryptService_Encrypt_Input_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
<sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
</sp:EncryptedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IEncryptService_Encrypt_output_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
<sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body />
</sp:EncryptedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsdl:types>
- <xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://localhost:9095/EncryptService?xsd=xsd0" namespace="http://tempuri.org/" />
<xsd:import schemaLocation="http://localhost:9095/EncryptService?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
</xsd:schema>
</wsdl:types>
- <wsdl:message name="IEncryptService_Decrypt_InputMessage">
<wsdl:part name="parameters" element="tns:Decrypt" />
</wsdl:message>
- <wsdl:message name="IEncryptService_Decrypt_OutputMessage">
<wsdl:part name="parameters" element="tns:DecryptResponse" />
</wsdl:message>
- <wsdl:message name="IEncryptService_Encrypt_InputMessage">
<wsdl:part name="parameters" element="tns:Encrypt" />
</wsdl:message>
- <wsdl:message name="IEncryptService_Encrypt_OutputMessage">
<wsdl:part name="parameters" element="tns:EncryptResponse" />
</wsdl:message>
- <wsdl:portType name="IEncryptService">
- <wsdl:operation name="Decrypt">
<wsdl:input wsaw:Action="http://tempuri.org/IEncryptService/Decrypt" message="tns:IEncryptService_Decrypt_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IEncryptService/DecryptResponse" message="tns:IEncryptService_Decrypt_OutputMessage" />
</wsdl:operation>
- <wsdl:operation name="Encrypt">
<wsdl:input wsaw:Action="http://tempuri.org/IEncryptService/Encrypt" message="tns:IEncryptService_Encrypt_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IEncryptService/EncryptResponse" message="tns:IEncryptService_Encrypt_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="WSHttpBinding_IEncryptService" type="tns:IEncryptService">
<wsp:PolicyReference URI="#WSHttpBinding_IEncryptService_policy" />
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Decrypt">
<soap12:operation soapAction="http://tempuri.org/IEncryptService/Decrypt" style="document" />
- <wsdl:input>
<wsp:PolicyReference URI="#WSHttpBinding_IEncryptService_Decrypt_Input_policy" />
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<wsp:PolicyReference URI="#WSHttpBinding_IEncryptService_Decrypt_output_policy" />
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="Encrypt">
<soap12:operation soapAction="http://tempuri.org/IEncryptService/Encrypt" style="document" />
- <wsdl:input>
<wsp:PolicyReference URI="#WSHttpBinding_IEncryptService_Encrypt_Input_policy" />
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<wsp:PolicyReference URI="#WSHttpBinding_IEncryptService_Encrypt_output_policy" />
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="EncryptService">
- <wsdl:port name="WSHttpBinding_IEncryptService" binding="tns:WSHttpBinding_IEncryptService">
<soap12:address location="http://localhost:9095/EncryptService" />
- <wsa10:EndpointReference>
<wsa10:Address>http://localhost:9095/EncryptService</wsa10:Address>;
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Upn>paritosh.pandey@pinelabs.com</Upn>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
13 years ago
kindly provide me the equivalent java implementation of the following Symmetric key encryption and decryption using Rijndael algorithm implemented in VB

Imports Microsoft.VisualBasic
Imports System
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography

Public Class crypto
Private Const passPhrase As String = "Pas5pr@sekishan"
Private Const saltValue As String = "s@1tValuekishan"
Private Const hashAlgorithm As String = "SHA1"
Private Const passwordIterations As Integer = 2
Private Const initVector As String = "@1B2c3D4e5F6kishan"
Private Const keySize As Integer = 256

Private Function Encrypt(ByVal plainText As String, _
ByVal passPhrase As String, _
ByVal saltValue As String, _
ByVal hashAlgorithm As String, _
ByVal passwordIterations As Integer, _
ByVal initVector As String, _
ByVal keySize As Integer) _
As String

Dim initVectorBytes As Byte()
initVectorBytes = Encoding.ASCII.GetBytes(initVector)

Dim saltValueBytes As Byte()
saltValueBytes = Encoding.ASCII.GetBytes(saltValue)

Dim plainTextBytes As Byte()
plainTextBytes = Encoding.UTF8.GetBytes(plainText)

Dim password As PasswordDeriveBytes
password = New PasswordDeriveBytes(passPhrase, _
saltValueBytes, _
hashAlgorithm, _
passwordIterations)

Dim keyBytes As Byte()
keyBytes = password.GetBytes(keySize / 8)

Dim symmetricKey As RijndaelManaged
symmetricKey = New RijndaelManaged

symmetricKey.Mode = CipherMode.CBC

Dim encryptor As ICryptoTransform
encryptor = symmetricKey.CreateEncryptor(keyBytes, initVectorBytes)

Dim memoryStream As MemoryStream
memoryStream = New MemoryStream

Dim cryptoStream As CryptoStream
cryptoStream = New CryptoStream(memoryStream, _
encryptor, _
CryptoStreamMode.Write)
cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length)

cryptoStream.FlushFinalBlock()

Dim cipherTextBytes As Byte()
cipherTextBytes = memoryStream.ToArray()

memoryStream.Close()
cryptoStream.Close()

Dim cipherText As String
cipherText = Convert.ToBase64String(cipherTextBytes)
cipherText = cipherText.Replace("+", "~")
Encrypt = cipherText
End Function

Public Function Encrypt(ByVal Data As String)
Try
Return Encrypt(Data, _
passPhrase, _
saltValue, _
hashAlgorithm, _
passwordIterations, _
initVector, _
keySize)
Catch ex As Exception
Throw ex
End Try
End Function

Private Function Decrypt(ByVal cipherText As String, _
ByVal passPhrase As String, _
ByVal saltValue As String, _
ByVal hashAlgorithm As String, _
ByVal passwordIterations As Integer, _
ByVal initVector As String, _
ByVal keySize As Integer) _
As String

cipherText = cipherText.Replace("~", "+")

Dim initVectorBytes As Byte()
initVectorBytes = Encoding.ASCII.GetBytes(initVector)

Dim saltValueBytes As Byte()
saltValueBytes = Encoding.ASCII.GetBytes(saltValue)

Dim cipherTextBytes As Byte()
cipherTextBytes = Convert.FromBase64String(cipherText)

Dim password As PasswordDeriveBytes
password = New PasswordDeriveBytes(passPhrase, _
saltValueBytes, _
hashAlgorithm, _
passwordIterations)

Dim keyBytes As Byte()
keyBytes = password.GetBytes(keySize / 8)

Dim symmetricKey As RijndaelManaged
symmetricKey = New RijndaelManaged

symmetricKey.Mode = CipherMode.CBC

Dim decryptor As ICryptoTransform
decryptor = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes)

Dim memoryStream As MemoryStream
memoryStream = New MemoryStream(cipherTextBytes)

Dim cryptoStream As CryptoStream
cryptoStream = New CryptoStream(memoryStream, _
decryptor, _
CryptoStreamMode.Read)

Dim plainTextBytes As Byte()
ReDim plainTextBytes(cipherTextBytes.Length)

Dim decryptedByteCount As Integer
decryptedByteCount = cryptoStream.Read(plainTextBytes, _
0, _
plainTextBytes.Length)

memoryStream.Close()
cryptoStream.Close()

Dim plainText As String
plainText = Encoding.UTF8.GetString(plainTextBytes, _
0, _
decryptedByteCount)

Decrypt = plainText
End Function

Public Function Decrypt(ByVal Data As String) As String
Try
Return Decrypt(Data, _
passPhrase, _
saltValue, _
hashAlgorithm, _
passwordIterations, _
initVector, _
keySize)
Catch ex As Exception
Throw ex
End Try
End Function
End Class
13 years ago
I need the client side sample code where a singleton class (with 50 thread instances )is invoking the client stub method of a particular web service.
14 years ago
How to limit web service calls suppose 50 at a time while invoking webservice client?
14 years ago
I have a Jcombobox inside Jtable.My problem is I am unable to traverse it using keyboard.I want to avoid F2 key and i want that if i press any key(alphabet) the combobox should popup and matching item is selected..
Anybody having any idea about this.?
16 years ago