susha bhogs

Greenhorn
+ Follow
since Mar 29, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by susha bhogs

It seems the developer is right. Because when we passed the objects - at the JVM its by reference only. Also, collection passes it by reference [similar to shallow cloning]

Regards
15 years ago
I think you can achieve thru GWT (using Goole Language API)

Refer to the following link -

http://code.google.com/apis/ajaxlanguage/documentation/
16 years ago
Reason for failure is that the SOAP request to another service does not contain the the Service name- in order to get around is to insert this manually

Before insertion -
<xml-fragment>
<Elements> complex structure....</elements>
</xml-fragment>

Repalce <xml-fragment> with uour service i.e.
<getMyData xmlns=..... xmlns:s1=......>
<Elements>..complex structure..</elements>
</getMyData>


==== code is below

public SOAPEnvelope getEnv() {
String serviceHeader="<getMyData xmlns=..... xmlns:s1=......>"

String xmlBean = param.xmlText();
StringBuffer sb = new StringBuffer();
String newXMLBean = xmlBean.substring(14, xmlBean.length() - 15);
sb.append(serviceConfig.get("serviceHeader"));
sb.append("<element>");
sb.append(newXMLBean);
sb.append("</elements>");
sb.append("</");
sb.append(serviceConfig.get("operation"));
sb.append(">");

Document request = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);

DocumentBuilder builder = factory.newDocumentBuilder();
request = builder.parse(new java.io.ByteArrayInputStream(sb.toString().getBytes()));

SOAPBodyElement requestMessage = new SOAPBodyElement(request.getDocumentElement());

envelope = new SOAPEnvelope();
return envelope.addBodyElement(requestMessage);

}

Service service = new Service();
Call call = (Call) service.createCall(new QName("serviceport"),
new QName(("operation"));

call.setTargetEndpointAddress(new java.net.URL(("endpoint")));
SOAPEnvelope response = call.invoke(getEnv());
17 years ago
You sould be able to invoke using the complex bean. I had tried in Weblogic 9. using the XML Bean. It works
18 years ago
You require lot of coding for this.
1. Define property which holds the min and max number of objets (Threads)
e.g. min_thread=5
max_thread=10
min_wait_time=1000 (10 secs)
2. Write one custom code and this code would
2.1 On startup create the min # of objects and store in some collection.
2.2 Everytime this object gets used - set one counter
2.3 When this counter goes beyond min, then create a new instance and add that into the collection and then return to the client.
2.4. Increment the conter.
2.5 Whenever the object is released , return the same thread to the collection.
2.6. Decrement the counter.
2.7. When the counter is less than min and objects are released, then remove them from the colllection (maintain only min)
2.8. When the max level is reached then throttle the new client request by waiting for the time (min_wait_time) and then timing out if no object is available in that time.