This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Ruchira Ghosh

Greenhorn
+ Follow
since Nov 25, 2010
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 Ruchira Ghosh

A header page included was copying each field with same id and keeping them as hidden.
The problem was due to the hidden fields.

Thanks,
Ruchira
10 years ago
JSP

I am not using beans.
The values are being set just as follows. The other field uses a session attribute if request parameter is null.

I checked putting alerts in java script.
The expression <%=typename%> is showing proper value while document.getElementById(myField).value is showing the old value.

Thanks for any help.
Ruchira
10 years ago
JSP
I am facing a strange issue of fields in a jsp page retaining old values.

I have a jsp page with a field Type Name and two buttons to Add and Edit.
On click of the buttons the request submitted to the controller which adds appropriate request/session attribute for Add/Edit and forward the request to the same jsp which has 3 fields, TypeName,Description and Associated Id and a button to search the id and one OK and one Cancel button. In the page the fields are populated from request and session attributes using scriptlets by setting the value in the field declaration
The cancel button clears all the field values and submits the request to a controller method which removes session attributes set.
The button to search for the id has a validation code to verify the Name is entered.

Now the problem is once I open the jsp for Add and cancel it and immediately after I opens the page for Edit, the fields retains the old value that is '' , though the session and request parameter that sets the value contains proper value. Only when the value is accessed using document.getElementById('fldId').value it is returning the value from the last load of the page. It is happening for every consecutive load of the page.

The field value is being shown properly in UI, but the validation code that checkes if the field has value is getting failed.

Can any one point out what is the problem?
The page has HTTP tags for no-cache.

Thanks,
ruchiraghosh
10 years ago
JSP

I am doing enhancements on an application developed using weblogic page flow.
I am developing a close functionality. I have a jsp page which has 2 text fields for the user to enter 2 ids and a close buton.
On clicking the close button a database call should be made to get the relationship between two ids.

The way I have designed this is :

From the JSP, I am calling the action in the page flow controller for the module using showWindowModalDialog.



The action calls the appropriate DAO method which makes the database call and returns an List of all relationships. Controller sets the list as pageInput and number of relationship in the list as query param and forward the request to another jsp.



This second jsp reads the request parameter and sets it to dialogArguments and closes the window.

The problem is the relationshipList, that was added to pageInput is required to be available at the first jsp when the request comesback to this page.

How can I pass this list to my first jsp from where the modal dialog was opened?
I tried setting the list as session attribute instead of adding it to pageInput and tried getting that from my first jsp.


But it did not work.
I need to populate a table in the first jsp with all the relations from which user will be able to select one.

Please suggest how can I get this list and if the approach I am following is correct.

Thanks a lot in advance.

Hi,
I am developing a web service client (in Java) using stubs generated using weblogic proxy.
I am hitting the getEntityDetails service using

EntityDetailResponse resdoc = soap.getEntityDetailsWithToken(reqdoc);

I have checked the server log and server is returning the proper response.
But in the above line resdoc is set as null.

I have tested the same request using SOAP UI and getting the correct response.
Can anyone please help?

Thanking you in advance,
Ruchira
11 years ago
Thanks Naren.
I tried after putting the type. It is working.
But I am not sure if I am allowed to make that change

Something is wrong with this WSDL though they are tested Ok with SOAP UI.
It has another service which is running fine, the response is created correctly in the server side, but the client is getting a null response.
May be I'll post this in future for some help if I would not find any solution.

Thanking You,
Ruchira
11 years ago
Try using addChild and removeChild methods of mx.Core.UIComponent.

removeChild(DisplayObject(linkButton: LinkButton)
addChildDisplayObject(linkButton: LinkButton)


Thanks & Regards,
Ruchira

11 years ago
Hi Naren,

In SOAP UI it never failed, before or after the change suggested by you.
But when the XML request is generated from the java client it is generated with that xsi type and not working.
I tried to develop the client using AXIS2, but it failed to generate the stub.

Thanking You,
Ruchira
11 years ago
Hi Naren,

I tried running the service after deleting the minOccure and maxOccure as you suggested.

But still getting the same error

Thanking You,
Ruchira
11 years ago
Very sorry. Don't know how I am reading the name wrongly since yesterday

Should I provide the actual WSDL? It has almost 1200 lins, so I though only the part containing this service would be sufficient as the others worked fine. So I deleted the schema and messages for the other services.
I tried to attach the actual WSDL, but was not able to find what format it accepts.
Will it be readable if I paste the 1200 lines of WSDL here?

Another problem is the service was designed few months back by some other team and already deployed in production server after being tested using SOAP UI. I am not supposed to change that service unless it is impossible to use it without the change.

Thanking You,
Ruchira
11 years ago
Thanks Naveen and Jim.

The actual WSDL has five more services and a very big one.So I tried to reduce the size so that one can look into it easily. But sorry, I made mistake at that effort.
I am providing a fresh WSDL.

@Jim, no type is sent in request.
The request was sent like this

AddressType[] addressType = new AddressType[1];
String[] addressLine = {"Lane1","Plot2"};
addressType[0]=new AddressType();
addressType[0].setAddressLineaddressLine);
addressType[0].setAddressTypeIdentifier(AddressTypeIdentifierType.Physical);
addressType[0].setCountryCode("95");
addressType[0].setMunicipality("Kolkata");
entityType.setAddresses(addressType);



What I understand is, addresses should actually be an array of AddressType. No seperate Addresses type is declared.
But, the java code is generating the request with xsi: type="n5:Addresses".
I am totally new to this web services technology and not able to figure out how the xml request is generated from the java request.
I decompiled the soap_stub generated to see the source of it, but have not got any clue.

Thanking You,
Ruchira
11 years ago
That is a typo.

The WSDL is


Regards,
Ruchira
11 years ago
Hi,

I am developing a web service client using the .jar files generated using weblogic proxy.
An element in the schema is :
<xs:complexType name="EntityType">
<xs:sequence>
<!--more elements-->
<xs:element ref="Addresses" minOccurs="0" maxOccurs="1"/> <!-- Addresses -->
<!--more elements-->
</xs:complexType>


The element Addresses is referring to :

<xs:element name="Addresses">
<xs:complexType>
<xs:sequence>
<xs:element name="Address" type="AddressType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="AddressType">
<xs:sequence>
<xs:element name="AddressTypeIdentifier" type="AddressTypeIdentifierType"/>
<xs:element name="AddressLine" minOccurs="0" maxOccurs="2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Municipality" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Municipality or City</xs:documentation> </xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>

In the client this adresses element is set as :

AddressType[] addressType = new AddressType[1];
String[] addressLine = {"Lane1","Plot2"};
addressType[0]=new AddressType();
addressType[0].setAddressLineaddressLine);
addressType[0].setAddressTypeIdentifier(AddressTypeIdentifierType.Physical);
addressType[0].setCountryCode("95");
addressType[0].setMunicipality("Kolkata");
entityType.setAddresses(addressType);

When web service is called using this client the java code is generating the XML request for adreeses as :

<n5:Addresses xsi:type="n5:Addresses" xmlns:n5="http://www.pwc.com/GlobalIT/XDC/CreateEntity/CommonTypes/v10">
<n5:Address>
<n5:AddressTypeIdentifier>Physical</n5:AddressTypeIdentifier>
<n5:AddressLine>Lane1</n5:AddressLine>
<n5:AddressLine>Plot2</n5:AddressLine>
<n5:Municipality>Kolkata</n5:Municipality>
<n5:CountryCode>95</n5:CountryCode>
</n5:Address>
</n5:Addresses>

which is causing the validation error "could not find type n5:adresses".


Can any one help me on what is going wrong and what needs to be done to resolve this issue?

Thanks in advance,
Ruchira
11 years ago