Archive for May, 2010

Puzzles


Hycle

FillYourBucket
100x100
MagicPokanSquare

JWS Quiz 4: 26 questions

The SOAP designed to work with specific protocols only.



WSDL represents:





XML schema type system is the default system that mediates between the client's types and service's types.



What is true about Style.DOCUMENT?





What tool generates JAX-WS portable artifacts starting from Java class?





What tool generates JAX-WS portable artifacts starting from WSDL?





What tool generates JAX-WS portable artifacts starting from Java source file?





An Executor may be set on the endpoint in order to gain better control over the threads used to dispatch incoming requests.



What JAX-B stands for?





There is no annotation that would influence how the resulting WSDL will look like.



WSDL defines:





What XSD stands for?





Type section of the WSDL structure is required.



WSDL 2.0 support only XML Schema.



The in/out order of the messages in the message section of the WSDL indicates:





The out/in order of the messages in the message section of the WSDL indicates





The portType section of the WSDL describes:





The binding section of a WSDL provides implementation details of a service defined abstractly in the portType section.



The binding section of a WSDL provides following implementation details:





You can send SOAP over SMTP (Simple Mail Transport Protocol)



The service section of the WSDL defines:





Given the code what is true:
import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService
public interface TestWS
{
@WebMethod
public String testHello();
}

import javax.jws.WebService;

@WebService(endpointInterface="TestWs")
public class TestWSImpl implements TestWS
{
public String testHello()
{
return "Hello";
}

}


import javax.xml.ws.Endpoint;

public class TestWSPublisher
{
public static void main(String args[]) throws Exception
{
Endpoint.publish("http://127.0.0.1:9977/testWS", new TestWSImpl());
}
}





Given the code:
import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService
public interface TestWS
{
@WebMethod
public String testHello();
}


import javax.jws.WebService;

@WebService(endpointInterface="TestWs", targetNamespace="testWs")
public class TestWSImpl implements TestWS
{
public String testHello()
{
return "Hello";
}

}


import javax.xml.ws.Endpoint;

public class TestWSPublisher
{
public static void main(String args[]) throws Exception
{
Endpoint.publish("http://127.0.0.1:9977/testWS", new TestWSImpl());
}
}





Given the code what is true:
import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService
public interface TestWS
{
@WebMethod
public String testHello();
}


import javax.jws.WebService;

@WebService(endpointInterface="TestWS", targetNamespace="testWs")
public class TestWSImpl implements TestWS
{
public String testHello()
{
return "Hello";
}

}


import javax.xml.ws.Endpoint;

public class TestWSPublisher
{
public static void main(String args[]) throws Exception
{
Endpoint.publish("http://127.0.0.1:9977/testWS", new TestWSImpl());
}
}





Given the code what is true:
import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(targetNamespace="testWs")
public interface TestWS
{
@WebMethod
public String testHello();
}


import javax.jws.WebService;

@WebService(endpointInterface="TestWS", targetNamespace="testWs")
public class TestWSImpl implements TestWS
{
public String testHello()
{
return "Hello";
}

}

import javax.xml.ws.Endpoint;

public class TestWSPublisher
{
public static void main(String args[]) throws Exception
{
Endpoint.publish("http://127.0.0.1:9977/testWS", new TestWSImpl());
}
}





To obtain a WSDL for a web service that is published on http://127.0.0.1:9977/testWS you need to navigate a web browser to http://127.0.0.1:9977/testWS?getwsdl





JWS Quiz 3: 6 questions

Please go to JWS Quiz 3: 6 questions to view the quiz

JWS Quiz 2: 8 questions

Please go to JWS Quiz 2: 8 questions to view the quiz

JWS Quiz 1: 7 questions

Please go to JWS Quiz 1: 7 questions to view the quiz

Immortal Emir

Immortal Emir

By Fuzilaga

Once, Emir of Samarkand called for all his wise men.

“I want to be immortal! Tell me how I can become imperishable or die”.

The wise men consulted together, read stellar atlases, and after a while, the oldest of them moved forward reluctantly.

“Oh, my lord,” squeaked the sage “shining with magnificence, the most gracious of all rulers. Ancient books tell us that all processes and events in the universe increase disorder in the place where they occur. All mortal beings are forced to constantly increase internal disorder, as well as disorder around them. Daily increase in disorder leads to an inevitable state of maximum disorder, which is death. Unfortunately, it is impossible to freeze in a state of more or less weak disorder completely, since beside the space there is always time, which is much harder to trick. However it is possible to extract the order from the surrounding environment, in other words – the same disorder but with the opposite sign, to compensate for all the chaos produced”.

“Get to the point!” shouted Emir.

“Yes, yes, my lord. According to the books, all living things live because of continuous absorption and processing of such well-ordered matter as wine, bread and fruits. But this is far not enough for immortality and for the best compensation of the disorder one has to digest the equally well-ordered system”.

“What do you mean?” said perplexed Emir.

“Umm, how shall I put it…? Your majesty has to eat…”

“Eat what?”

“E-e-e-eat y-y-yourself,” the sage said with trembling voice. The rest of wise men held their breath.

“How dare you! Guards, get these idiots out of here!”

One of the sages managed to get loose and fall on his knees before Emir.

“Oh, the wisest of the wise, please let me speak. People say that there is a man in the city who can answer any possible question. His name is Vlaiddin. If you command to bring him into the palace he will tell how one can become immortal”.

An hour later, the guards led Vlaiddin toward the Emir’s throne.

“They say you can answer any question. So, answer how I can become immortal.”

“It’s very simple,” said Vlaiddin. “All you need to do is take your emerald embroidered robe, shirt and pants off, and run around the city completely nude. Certainly, this unusual episode will go down in the annals of history and will be passed down from generation to generation. Your everlasting glory will spread far and wide, making you immortal!”

The End

JME Quiz 2: 12 questions

Please go to JME Quiz 2: 12 questions to view the quiz