Sunil Ragidi

Greenhorn
+ Follow
since Dec 17, 2011
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 Sunil Ragidi

Hi,

I am using the OpenSAML Java library to process the SAML token that comes from an IDP. The OpenSAML library is using a dependent library bcprov-jdk15xxx.jar which is non FIPS compliant. My requirement is to use FIPS compliant libraries in my application. Is there a way to make OpenSAML FIPS compliant?

Thanks, Sunil Ragidi
6 years ago
Yeah...you are right. AXIS2 is not the best option for REST web services. Still I can't go with JERSEY because my application is entirely designed with SOAP web services. Just because of one web service I can't go with other framework(like JERSEY).

Now my requirement is to enable REST for existing web service, that means It supports both SOAP and REST.
Anyway SOAP is already there. Now it has to be REST enabled also.

For that I have introduced httpBinding for the web service operation and I deployed it.
But Its not working and I don't know why...?

I am suspecting the httpBinding definition may be wrong in my WSDL.

Can you please tell me how to define httpBindings and also how to provide input(request) and output(response) content type for this REST end point.
I have XSDs defined for both request and response.

MyWsdl.wsdl


--Sample input request for the web service--


--Sample response from the web service--
10 years ago
Hi,
I have a webservice, which is SOAP based. I want to convert it to REST based in AXIS2 itself. I have gone thru lot of websites but ended up with nothing. I should not go with JERSEY.

If we change the SOAP binding to HTTP Binding, Will it become REST based..?
If so, How can I pass the input to the REST service. My webservice takes a huge XML document as input. How can I provide the XML input(complex object) to the REST service...?

Can anyone provide a detailed solution in achieving this...?

I can provide my WSDL of SOAP Webservice.


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.abc.com/interfaces/XYZ.wsdl"
targetNamespace="http://www.abc.com/interfaces/XYZ.wsdl"

xmlns:r0="http://www.abc.com/interfaces/Request.xsd"
xmlns:r1="http://www.abc.com/interfaces/Response.xsd"
>
<wsdl:types>
<xs:schema>
<xs:import namespace="http://www.abc.com/interfaces/Request.xsd" schemaLocation="Request.xsd"/>
<xs:import namespace="http://www.abc.com/interfaces/Response.xsd" schemaLocation="Response.xsd"/>
</xs:schema>
</wsdl:types>

<wsdl:message name="WSRequest">
<wsdl:part name="WSRequest" element="r0:WSRequest"/>
</wsdl:message>
<wsdl:message name="WSResponse">
<wsdl:part name="WSResponse" element="r1:WSResponse"/>
</wsdl:message>

<wsdl:portType name="WSWebServicePort">
<wsdl:operation name="operation-1">
<wsdl:input name="WSRequest" message="tns:WSRequest"/>
<wsdl:output name="WSResponse" message="tns:WSResponse"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="WSWebServiceSoapBinding" type="tns:WSWebServicePort">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="operation-1">
<wsdlsoap:operation soapAction="WS" style="document"/>
<wsdl:input>
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="WS">
<wsdl:port name="WSWebService" binding="tns:WSWebServiceSoapBinding">
<wsdlsoap:address location="http://localhost:8080/MyApp/services/WS"/>
</wsdl:port>
</wsdl:service>

</wsdl:definitions>




Request and Response has XSDs. Request itself will take huge amount of data and response is also huge.
I am wondering how can we provide this XML input as JSON input after it gets converted to REST style.
We are using wsdl 1.x and we should strict to that.

Sample Request:
Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rep="http://www.mwvis.com/interfaces/Request.xsd">
<soapenv:Header/>
<soapenv:Body>
<rep:Request name="name" code="code">
<Specification ReturnPageSizedSegment="false" returnTotalRecords="true">
<DataSetType>datasettype</DataSetType>
<CountPerSegment>30</CountPerSegment>
<OmitUnselectedAttributes>true</OmitUnselectedAttributes>
<SortFields>
<SortField>
<Name>Date</Name>
<SortOrder>1</SortOrder>
<Direction>desc</Direction>
</SortField>
</SortFields>
<LogonId>admin</LogonId>
<Locations>
<LocationId>1</LocationId>
<LocationId>2</LocationId>
<LocationId>3</LocationId>
</Locations>
<FilterByParentNodeId>0</FilterByParentNodeId>
<RollupByNodeType>Site</RollupByNodeType>
</Specification>
<Filters>
<DateTime>
<Operator>greaterThanEquals</Operator>
<Value>2013-03-20 00:00:00</Value>
</DateTime>
<DateTime>
<Operator>lessThanEquals</Operator>
<Value>2013-06-17 23:59:59</Value>
</DateTime>
</Filters>
</rep:Request>
</soapenv:Body>
</soapenv:Envelope>





Sample Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<rep:Response Date="2013-06-19T12:56:39.098+05:30" xmlns:rep="http://www.mwvis.com/interfaces/Response.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data dateTime="2013-06-19T12:56:39.095+05:30" xsi:type="gen:GenericData" xmlns:gen="http://www.mwvis.com/interfaces/GenericData.xsd">
<SessionId>0641177c-beeb-4979-a1cf-8873c406a292</SessionId>
<Segments>0</Segments>
<Total>7</Total>
<categoryData id="0" value="Monday">
<valueData value="620"/>
</categoryData>
<categoryData id="1" value="Sunday">
<valueData value="620"/>
</categoryData>
<categoryData id="2" value="Saturday">
<valueData value="625"/>
</categoryData>
<categoryData id="3" value="Friday">
<valueData value="625"/>
</categoryData>
<categoryData id="4" value="Thursday">
<valueData value="625"/>
</categoryData>
<categoryData id="5" value="Wednesday">
<valueData value="615"/>
</categoryData>
<categoryData id="6" value="Tuesday">
<valueData value="650"/>
</categoryData>
</Data>
</rep:Response>
</soapenv:Body>
</soapenv:Envelope>


Please tell me what all changes I have to do in
1. WSDL
2. AXIS2.xml
3. Once it is RESTFul, How to provide the above shown XML input as JSON to the service in the URL
4. Make it complete JSON oriented(request and response should be JSON)

Thanks in advance....
10 years ago
Hi,

I have a requirement in which I need to execute test methods(of a TestCase class) dynamically. I have one TestCase class, which has 5 test methods. If I execute it, all the test methods will be executed and this is fine.
But I don't want to execute all the 5 methods always. The methods to be executed will come from an XML file(I have a class which reads all the test method names from xml file). Whatever method names defined in the XML, only those test methods have to be executed.

MyTestCase.java


XML file:

Now according to the above xml file, when I run the MyTestCase class, only test1(), test2() methods have to be executed.
Can anyone help in achieving the solution? I am using JUnit4.

Thanks in advance,
Sunil
10 years ago
Yes...It was loading at last with the deploy.last folder.

But for some reason, My requirement got changed. When my WAR file is being loaded, I want to establish a connection in a different thread. Its like Server will be awaiting the network connection. Till the connection established, server functionality should not be affected (I mean, because the connection establishing code will be running inside an infinite loop). Server has to function in a normal way, it should not be stopped till the connection established. Can you suggest a better solution for this problem?

Thanks,
Sunil
12 years ago
Thanks for the response...

I tried with the setting which you have given, But it is not loading the apps according to the setting.

Here is my problem in detail.

I have an application, which is dependent on another 3 applications running in the same JBoss server. My application has a Scheduler servlet, which will be loaded as soon as the server starts up. The scheduler will check for a network connection. I have coded the scheduler servlet in such a way that it has to try establishing a network connection until and unless the connection is established. Here is am getting the problem, If it is unable to establish the connection, the server is not loading any other applications in the server. My question is how can I make the server/application so that even if the connection is not established, other applications should be loaded in the server? My servlet keeps trying to establishing the connection.

For more clarity, am putting the code below.




This servlet will be loaded as soon as the server gets started up. I have specified <load-on-startup>1</load-on-startup> in the depl descriptor.

Now am testing the application by giving some wrong ipaddress to see how the server will behave? When the server is loading the applications, it is being stopped at this application. I know why it is being stopped, because it is trying to establish the connection indefinitely. Since it is not able to establish the connection, it is being stopped at this point. Can you please suggest a way in which I can avoid this problem? I am looking for a solution, in which the connection should happen in the background which will not affect the other apps in loading irrespective of whether the connection is established or not . I have tried with threads(daemon threads), Still am getting the same problem.


Seems it is a complex requirement. Any help would be greatly appreciated.

Thanks,
Sunil



12 years ago
Hi techies,

I have 4 applications running in my JBoss server. They are app1.ear, app2.ear, app3.ear, app4.war. I want the app4.war to be loaded lastly. These are NOT modules in one ear. They are seperate
applications. How can I configure in such a way that app4.war will be loaded at last(I mean after loading first 3 ear files).

Any help would be greatly appreciated...

Thanks,
Sunil
12 years ago